1.0.0 • Published 7 years ago

pure-uuid-generator v1.0.0

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

Pure UUID Generator

Get it

yarn add --dev pure-uuid-generator
# or
npm install --save-dev pure-uuid-generator

API

createWithSeed(seed: number): UuidGenerator

Given a seed value returns a psuedo-random UUID generator.

import { next, createWithSeed } from 'pure-uuid-generator'

const generator = createWithSeed(100)

const { value, nextGenerator } = next(generator)
`next(generator: UuidGenerator): { value: string, nextGenerator: UuidGenerator }

Given a generator it returns a psuedo-random value and the nextGenerator to allow creating other psuedo-random values.

import { next, createWithSeed } from 'pure-uuid-generator'

const generator = createWithSeed(100)

const { value, nextGenerator } = next(generator)