open-index/open-npm huggingface dataset:
npm package: @snek/benchmark
Description: benchmark like a pro, wherever you go
Author: snek
Latest version: 0.0.1

[![npm][download-badge]][npm]
[![David][dep-badge]][dep-link]

[![NPM][large-badge]][stats-link]

# benchmark <sup>[![Version Badge][version-badge]][npm]</sup>

#### This package is still very experimental

```javascript
const Benchmark = require('@snek/benchmark');

const s = new Benchmark.Suite();

s.add('RegExp#test', () => { /o/.test('Hello, World!'); });
s.add('String#indexOf', () => { !!'Hello, World'.indexOf('o'); });
s.add('String#includes', () => { 'Hello, World!'.includes('o'); });

s.on('cycle', console.log);

s.run();
```

Also available through [unpkg][unpkg-link] and [jsdelivr][jsdelivr-link].

[npm]: https://npmjs.org/package/@snek/benchmark
[large-badge]: https://nodei.co/npm/@snek/benchmark.png?downloads=true&downloadRank=true&stars=true
[stats-link]: https://nodei.co/npm/@snek/benchmark/
[version-badge]: http://versionbadg.es/devsnek/benchmark.svg
[download-badge]: https://img.shields.io/npm/dt/@snek/benchmark.svg?maxAge=3600
[dep-badge]: https://david-dm.org/guscaplan/benchmark.svg
[dep-link]: https://david-dm.org/guscaplan/benchmark
[unpkg-link]: https://unpkg.com/
[jsdelivr-link]: https://www.jsdelivr.com/
npm package: @snek/fuzzy
Description: super duper fuzzer for javascript
Author: snek
Latest version: 1.0.1

# fuzzy

```javascript
import { fuzzFunction } from 'fuzzy';

const errors = fuzzFunction(fs.writeFileSync);
```

```javascript
import random from 'fuzzy';

console.log(random());
/*
Set {
  Promise { undefined },
  false,
  [AsyncFunction: af],
  Float64Array [ 32, 4, 21, 92, 27, 103, 43, 123, 40, 115 ],
  '蔛匫㪯�쌽抋㕗ᾒ弭',
  WeakSet {} }
*/
```

You can also import all the individual methods
```javascript
import { object } from 'fuzzy';
console.log(object());
/*
{ '䛺늙휠�ꇆ䣽ㄱ慰뜐': [Getter/Setter],
  '鷭랦�㲠幘聩䖾젶쁟': { '콨撐Ὗ쩌㒌쑁顠낓ꞛ䃔': [Getter/Setter] },
  '軁뢧ꉷ偉胕顴䩈ꐃ뮲鯬': Set { undefined } }
*/
```
npm package: @snek/js
Description: The dead simple and extremely fast cli tool for javasript
Author: snek
Latest version: 1.0.4

# js
### The dead simple and extremely fast cli tool for javasript

#### Usage
- evaluate input
  - `js 1 + 1` ➟ `2`
  - `js Math.random()` ➟ `4` (chosen by fair dice roll, guarenteed to be random)
- all the pipes
  - `cat weather.json | js stdin.temperature` ➟ `21c`
  - `curl httpbin.org/get -s | js stdin.origin | toilet -t | lolcat -ti`
npm package: @snek/private
Description: Completely unenumerable symbols that you can use to store private data on any object. Only those with access to the symbol can access the data.
Latest version: 1.0.1

# @snek/private

Completely unenumerable symbols that you can use
to store private data on any object. Only those
with access to the symbol can access the data.

```js
const PS = require('@snek/private');

const mySecret = PS('mySecret');
class MyClass {
  constructor(x) {
    this[mySecret] = x;
  }

  add(y) {
    return this[mySecret] + y;
  }
}

const obj = {};
obj[mySecret] = 5;
```
npm package: @snek/sse
Description: SSE for http and http2
Author: snek
Latest version: 1.0.0

# SSE

### Easy SSE for http and http2

```js
const sse = require('sse');

require('http').createServer((req, res) => {
  const c = sse(res);
  setInterval(() => {
    c.send('time', Date.now());
  }, 1000);
}).listen(80);

// OR

require('http2').createSecureServer({
  key: ...
  cert: ...
}).on('stream', (stream) => {
  const c = sse(stream);
  setInterval(() => {
    c.send('time', Date.now());
  }, 1000);
}).listen(443);
```
npm package: @snek/syncify
Description: a small and fast syncification library
Author: snek
Latest version: 0.0.6
Deprecated: this is just a silly project i made to learn some c++ apis, please don't use it in any serious projects

# syncify

(this is not something you should use in prod)

```javascript
const syncify = require('@snek/syncify');

const p0 = new Promise((r) => {
  setTimeout(() => r('works'), 1000);
});

// blocks for 1000ms
console.log(syncify(p0)); // 'works!'

const p1 = Promise.reject(new Error('aaaa'));

syncify(p1); // Error: 'aaaa'
```
npm package: @snek/wvm
Description: A map where the values are weak.
Author: devsnek
Latest version: 1.0.0

# WeakValueMap

A map where the values are weak.

```js
import WeakValueMap from '@snek/wvm';

const map = new WeakValueMap();
map.set('some key', someBigObject);
```

### `new WeakValueMap([iterable [, options]])`

* `iterable` An Array or other iterable object whose elements are
  key-value pairs (arrays with two elements, e.g. `[[ 1, { a: 1 } ], [ 2, { a: 2 } ]]`).
  Each key-value pair is added to the new Map; `null` values are treated as `undefined`.
* `options`
  * `eager` A boolean option indicating whether collected items should be eagerly tracked
    and removed from the map. If you have concerns about GC pressure, you may want to
    consider disabling this option. **Default**: `true`.