pure-uuid-generator
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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)

Readme

Keywords

none

Package Sidebar

Install

npm i pure-uuid-generator

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • tylors