Skip to content

mock-end/random-unicodes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

random-unicodes

Return a random unicode.

MIT License

build:? coverage:?

Install

$ npm install --save random-unicodes

Usage

For more use-cases see the tests

var randomUnicode = require('random-unicodes');

// API
// - randomUnicode([options]);

// options
// - min
// - max

By default it will return an unicode between 0 and 1114109, unicode ranges:

randomUnicode();
// => '\uaf91'

Can optionally provide min and max:

randomUnicode({ max: '\\uFFFF' });
// => '\u00F4'

randomUnicode({ min: 0, max: 1114109 });
// => '\u2F7FF'

Note: these min and max are inclusive, so they are included in the range.

Related

Contributing

Pull requests and stars are highly welcome.

For bugs and feature requests, please create an issue.

Releases

No releases published

Packages

No packages published