uniki

generate a unique key given any length of string (specific length hash)

Usage no npm install needed!

<script type="module">
  import uniki from 'https://cdn.skypack.dev/uniki';
</script>

README

uniki

Build Status Code Climate Test Coverage Dependency Status devDependency Status Node.js Version NPM Version

matrix-reloaded-keymaster

There are many use cases for unique keys.

Our "itch" is minimizing the bytes occupied in our database by frequent strings.

Like a Hash but shorter.

Usage

Install from NPM

npm install uniki ---save

Use it in your code/script

var uniki = require('uniki');
console.log(uniki('hello world')); // >> MJ7MSJwS    (ALWAYS The Same!)

That's all there is to it. Enjoy!

tl;dr

Hold On, This Sounds Familiar ...

If this looks familiar, its because it is!!
We have built a virtually identical module: https://www.npmjs.com/package/perma
The key (see what we did there...?) difference is that we are not excluding any characters from the population because no humans are going to be typing these keys, they are used exclusively by our database as keys.
Also similar is https://www.npmjs.com/package/aguid but uniki we don't want our keys to be 36 characters long!