Skip to content
/ eska Public

☀️ A simple, functional and customizable ID system.

License

Notifications You must be signed in to change notification settings

aidakdev/eska

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Eska

The simple, functional and customizable ID system.
wile.tk »


Install

npm i eska-id

Features

  • Really simple to understand and implement
  • Guaranteed uniqueness
  • Timestamped
  • Shorter than UUIDs
  • Cryptographically secure by design

The ID

Eska IDs consist of 3 sections: the prefix, the Superflake and the tail, which is simply a cryptographically secure random string.

Superflake

Superflake is a revolutionary technology based on Twitter's Snowflake. Superflake is generated by concatenating:

  • a 42-bit timestamp,
  • a 10-bit node ID, and
  • a 12-bit sequential number.

If you want to generate Superflakes without using Eska or implementing your own code, use this library.

Example

import { Eska } from "eska-id";

// Initialize Eska
const eska = new Eska({ prefix: { content: "u" } });

// Generate an Eska ID
eska.generate();
// => u_692461092816395059286eafdfb2a12963b

About

☀️ A simple, functional and customizable ID system.

Resources

License

Stars

Watchers

Forks

Packages