### Install HaikunatorJS with npm Source: https://github.com/atrox/haikunatorjs/blob/master/README.md Installs the HaikunatorJS library using npm for Node.js projects. ```bash npm install --save haikunator ``` -------------------------------- ### HaikunatorJS Usage Examples Source: https://github.com/atrox/haikunatorjs/blob/master/README.md Demonstrates how to instantiate HaikunatorJS with default and custom options, and how to generate random names with various configurations like token length, hex tokens, custom characters, delimiters, and disabling tokens. ```javascript import Haikunator from 'haikunator' // Instantiate Haikunator without options var haikunator = new Haikunator() // Instantiate Haikunator with default options var customHaikunator = new Haikunator({ adjectives: ['custom', 'adjectives'], nouns: ['custom', 'nouns'], seed: 'custom-seed', // class defaults defaults: { tokenLength: 8, tokenChars: 'HAIKUNATOR', // ... }, }) // default usage haikunator.haikunate() // => "wispy-dust-1337" // custom length (default=4) haikunator.haikunate({ tokenLength: 6 }) // => "patient-king-887265" // use hex instead of numbers haikunator.haikunate({ tokenHex: true }) // => "purple-breeze-98e1" // use custom chars instead of numbers/hex haikunator.haikunate({ tokenChars: 'HAIKUNATE' }) // => "summer-atom-IHEA" // don't include a token haikunator.haikunate({ tokenLength: 0 }) // => "cold-wildflower" // use a different delimiter haikunator.haikunate({ delimiter: '.' }) // => "restless.sea.7976" // no token, space delimiter haikunator.haikunate({ tokenLength: 0, delimiter: ' ' }) // => "delicate haze" // no token, empty delimiter haikunator.haikunate({ tokenLength: 0, delimiter: '' }) // => "billowingleaf" ``` -------------------------------- ### HaikunatorJS Options Configuration Source: https://github.com/atrox/haikunatorjs/blob/master/README.md Illustrates how to configure HaikunatorJS options during instantiation and also how these same options can be passed directly to the `haikunate` method for specific generations. ```javascript import Haikunator from 'haikunator' var haikunator = new Haikunator({ adjectives: ['custom', 'adjectives'], nouns: ['custom', 'nouns'], seed: 'custom-seed', // Custom seed // Class wide defaults, can get overridden by haikunate(options) defaults: { delimiter: '-', tokenLength: 4, tokenHex: false, tokenChars: '0123456789', }, }) // Same options are also available on the haikunate method haikunator.haikunate({ delimiter: '-', tokenLength: 4, tokenHex: false, tokenChars: '0123456789', }) // Note: If `tokenHex` is true, any tokens specified in `tokenChars` are ignored. ``` -------------------------------- ### Add HaikunatorJS for Deno Source: https://github.com/atrox/haikunatorjs/blob/master/README.md Adds the HaikunatorJS library for use in Deno projects. ```bash deno add @atrox/haikunator ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.