Socket
Socket
Sign inDemoInstall

mudnames

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mudnames

Mudnames can generate random names for characters, cities or whatever used in role playing games.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
57.6 kB
Created
Weekly downloads
 

Readme

Source

node-mudnames

Mudnames for NodeJS

For the moment all the functions are synchronous, it will change soon (so the API).

Usage

You can simply use it with the embedded dictionnaries in the ./data directory

var mudnames = require('mudnames');

Get the list of availabe dictionnaries

mudnames.get_file_list();

Get information on a particular dictionnary

mudnames.get_info(dict);

And of couse generate one or more names from available dictionnary (or random)

mudnames.generate_name_from('random');
mudnames.generates_several_names(10, 'random');

Custom dictionnary files

You can also use you own dictionnary files by instanciating a generator and use it as above

var mudnames = require('mudnames').Generator(__dirname + '/mydicts');
mudnames.get_file_list(dict);
mudnames.generates_several_names(10, 'random');

Benchmark against PHP version from xrogaan

The scripts were executed 20 times each and i kept the average on a ubuntu64 core2@3.4Ghz

Generation of 200 000 random names from dicts in the repo directory. NodeJS : 1.164 sec PHP : 182.379 sec PHP (corrected script) : 6.302 sec

License

MIT

Keywords

FAQs

Last updated on 16 Mar 2013

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc