Refactor generateRandomFloat() helper
[benchmarks-js.git] / is-undefined.js
CommitLineData
adad2e80
JB
1const Benchmark = require('benny')
2
3Benchmark.suite(
4 'Is undefined',
5 Benchmark.add('=== undefined', (value = undefined) => {
6 return value === undefined
7 }),
8 Benchmark.add("typeof === 'undefined'", (value = undefined) => {
9 return typeof value === 'undefined'
10 }),
11 Benchmark.cycle(),
12 Benchmark.complete(),
13 Benchmark.save({
14 file: 'is-undefined',
15 format: 'json',
16 details: true
17 }),
18 Benchmark.save({
19 file: 'is-undefined',
20 format: 'chart.html',
21 details: true
22 }),
23 Benchmark.save({
24 file: 'is-undefined',
25 format: 'table.html',
26 details: true
27 })
28)