1.3.0 • Published 2 years ago

huid v1.3.0

Weekly downloads
21
License
MIT
Repository
github
Last release
2 years ago

HUID

Hash Unique ID

HUID is a basic utility for generating, checking or hashing UUIDs.

Setup

yarn add huid

or

npm install --save huid

Usage

Before you start import the functions from the library

import { create, check, hash } from 'huid'

Basic usage

// Create random UUIDs
const randomUuid = create() // c6a4e73f-e60a-497e-a58b-f6b12c894090

// Create consitent UUIDs
const hashedUuid = hash('Hash') // 684cceb8-0d75-4727-87b8-06e91cd88cb7

// Any string can be passed and will generate consistent values
hash('Hash') === hash('Hash') // true
hash('Hash1') !== hash('Hash2') // true

// Check for valid UUIDs
check('684cceb8-0d75-4727-87b8-06e91cd88cb7') // true
check('c6e60a97e586b12c894090') // false

License

MIT

1.3.0

2 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago