How to use hyperid - 1 common examples

To help you get started, we’ve selected a few hyperid examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tylerlong / subx / benchmark / index.js View on Github external
import Benchmark from 'benchmark'
import * as R from 'ramda'
import hyperid from 'hyperid'

import SubX from '../src/index'

const uuid = hyperid()

const store = SubX.create({
  todos: []
})
const suite1 = new Benchmark.Suite()
suite1
  .add('array push', () => {
    R.range(0, 1000).forEach(i => store.todos.push({ title: i, completed: false }))
  })
  .on('cycle', function (event) {
    console.log(String(event.target))
  })
  .on('complete', function () {
    console.log('Fastest is ' + this.filter('fastest').map('name'))
  })
  .run()

hyperid

Uber-fast unique id generation, for Node.js and the browser

MIT
Latest version published 6 months ago

Package Health Score

71 / 100
Full package analysis

Popular hyperid functions