Get random names from Transformers characters from 1984-2011.
This package has been completely modernized with:
- Updated to Node.js 18+ - Modern runtime requirements
- ES Modules Support - Full ESM compatibility with dual package support
- Modern Build System - Webpack 5, Babel 7, TypeScript support
- Enhanced Testing - Mocha 10+ with improved test coverage
- Code Quality - ESLint 9, Prettier 3, Husky 9 for git hooks
- Multiple Output Formats - CommonJS, ESM, UMD, and TypeScript definitions
- Modern Dependencies - All dependencies updated to latest stable versions
npm install @cracdev/transformers-namesimport transformers, { all, random } from '@cracdev/transformers-names'
// Get a random name
console.log(random()) // 'Optimus Prime'
// Get multiple random names
console.log(random(3)) // ['Megatron', 'Bumblebee', 'Starscream']
// Access all names
console.log(all.length) // 508const transformers = require('transformers-names-full')
console.log(transformers.random())
console.log(transformers.all)<script src="./dist/index.umd.min.js"></script>
<script>
console.log(transformers.random())
</script>Returns a random transformer name. If number is provided, returns an array of that many random names.
Parameters:
number(optional): Number of random names to return
Returns:
string- Single random name (if no parameter)string[]- Array of random names (if number provided)
Array containing all transformer names.
dist/index.js- CommonJS builddist/index.esm.js- ES Module builddist/index.d.ts- TypeScript definitionsdist/index.umd.js- UMD build for browsersdist/index.umd.min.js- Minified UMD build
# Install dependencies
npm install
# Run tests
npm test
# Build all formats
npm run build
# Run linting and formatting
npm run validate
# Format code
npm run format- Node.js >= 18.0.0
- npm >= 8.0.0
MIT
Originally developed by Andres Castro. Modernized and maintained in 2024.