Skip to content

Commit

Permalink
Move benchmark to ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Jun 7, 2022
1 parent 96f5d56 commit 951dbbb
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions test/benchmark.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
#!/usr/bin/env node

let { uid: uidSecure } = require('uid/secure')
let { v4: lukeed4 } = require('@lukeed/uuid')
let { v4: napiV4 } = require('@napi-rs/uuid')
let { v4: uuid4 } = require('uuid')
let benchmark = require('benchmark')
let shortid = require('shortid')
let uidSafe = require('uid-safe')
let { uid } = require('uid')
let crypto = require('crypto')
let pico = require('picocolors')
let cuid = require('cuid')
let rndm = require('rndm')
let srs = require('secure-random-string')
import { uid as uidSecure } from 'uid/secure'
import { v4 as lukeed4 } from '@lukeed/uuid'
import { v4 as napiV4 } from '@napi-rs/uuid'
import { v4 as uuid4 } from 'uuid'
import benchmark from 'benchmark'
import shortid from 'shortid'
import uidSafe from 'uid-safe'
import { uid } from 'uid'
import crypto from 'crypto'
import pico from 'picocolors'
import cuid from 'cuid'
import rndm from 'rndm'
import srs from 'secure-random-string'

let { nanoid: aNanoid, customAlphabet: aCustomAlphabet } = require('../async')
let { nanoid, customAlphabet } = require('../')
let { nanoid: nonSecure } = require('../non-secure')
import {
customAlphabet as aCustomAlphabet,
nanoid as aNanoid
} from '../async/index.js'
import { nanoid, customAlphabet } from '../index.js'
import { nanoid as nonSecure } from '../non-secure/index.js'

let suite = new benchmark.Suite()

Expand Down

0 comments on commit 951dbbb

Please sign in to comment.