![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
moniker
Advanced tools
Readme
A random name generator for Node.js.
Moniker provides a default adjective/noun generator. Use it like this:
var Moniker = require('moniker');
console.log(Moniker.choose());
// Example output: murky-hands
You can also make a custom generator. Generators create random names
using dictionaries. Moniker has built-in noun
, verb
, and
adjective
dictionaries, or you can add your own.
var Moniker = require('moniker');
var names = Moniker.generator([Moniker.adjective, Moniker.noun]);
console.log(names.choose());
Install Moniker using NPM:
npm install moniker
generator(dictionaries, options)
Create a new Generator
. When a new name is generated, a word is
chosen from each item in dictionaries
in order.
Each dictionary may be a Dictionary
instance, a string path to a
file of words separated by spaces or newlines, or a function that
should return a Dictionary
when called.
The options
are optional and are passed along to the new
Generator
and any new Dictionary
. They default to:
{
maxSize: undefined,
encoding: 'utf-8',
glue: '-'
}
Generator(options)
A name generator. Be sure to .use()
some dictionaries
afterward. Options may include:
{
glue: '-'
}
generator.use(dictionary, options)
Add a new dictionary to this generator. When a new name is generated, a word is chosen from each dictionary in order.
The dictionary
may be a Dictionary
instance, a string path to a
file of words separated by spaces or newlines, or a function that
should return a Dictionary
when called. The options
are passed
along to each newly-constructed Dictionary
.
generator.choose()
Create a new name.
adjective(options)
Create a Dictionary
of using the builtin adjectives list.
noun(options)
Create a Dictionary
of using the builtin noun list.
verb(options)
Create a Dictionary
of using the builtin verb list.
read(path, options)
Create a Dictionary
by reading words from a file. The file should be
a list of words separated by spaces or newlines.
Dictionary()
A dictionary is a list of words.
dict.read(path, options)
Load words from path
into this dictionary. Options default to:
{
maxSize: undefined,
encoding: 'utf-8',
}
Words larger than maxSize
are ignored.
dict.choose()
Return a random word from this dictionary.
FAQs
Generate random names.
We found that moniker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.