Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
human-readable-ids
Advanced tools
Generate human-readable ids from lists of easy-to-spell nouns and adjectives
Use JavaScript to generate human-readable ids from a lists of nouns and adjectives.
Generate ids in the format of adjective-noun-#
such as
My problem is that I often want ids that I can type without having to look at twice (nor telling someone else twice).
I should be able to shout one of these ids across the room to a co-worker or spouse and have them be able to enter it without any confusion.
Currently the id space is about 100,000 ids (100 * 100 * 100).
The goal is to have several billion possible combinations by adding more words as well as expanding the ids to have verbs and adverbs.
npm install --save human-readable-ids
'use strict';
var hri = require('human-readable-ids').hri
, i
;
// generate 100 random ids
for (i = 0; i < 100; i += 1) {
console.log(hri.random());
}
bower install --save human-readable-ids
html
head
script(src="bower_components/knuth-shuffle/index.js")
script(src="bower_components/human-readable-ids/assets/animals.js")
script(src="bower_components/human-readable-ids/assets/adjectives.js")
script(src="bower_components/human-readable-ids/index.js")
<script src="bower_components/knuth-shuffle/index.js"></script>
<script src="bower_components/human-readable-ids/assets/animals.js"></script>
<script src="bower_components/human-readable-ids/assets/adjectives.js"></script>
<script src="bower_components/human-readable-ids/index.js"></script>
;(function (exports) {
'use strict';
var hri = exports.humanReadableIds || require('human-readable-ids').hri
, i
;
for (i = 0; i < 100; i += 1) {
console.log(hri.random());
}
}('undefined' !== typeof exports && exports || new Function('return this')()));
Please add more words that fit these criteria
All of the words are sorted alphabetically (sort -u
) and stored in
the *.txt
files.
The pre-publish script outputs the formatted javascript.
Acheive 1 trillion ids with a combination such as
number adjective noun verb adverb
42-red-foxes-run-quickly
And allow choosing various formats based on the desired number of ids.
adjective noun number
number adjective noun verb
FAQs
Generate human-readable ids from lists of easy-to-spell nouns and adjectives
The npm package human-readable-ids receives a total of 2,084 weekly downloads. As such, human-readable-ids popularity was classified as popular.
We found that human-readable-ids demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.