1.0.15 • Published 12 months ago

call-once-fn v1.0.15

Weekly downloads
6
License
MIT
Repository
github
Last release
12 months ago

call-once-fn

Calls a callback only once.

import once from 'call-once-fn';
import assert from 'assert';

const results = [];

const callback1 = once(() => results.push(arguments));
assert.ok(!results.length);
callback1('error', 'value1', 'value2');
assert.equal(results.length, 1);

callback1('error', 'value1', 'value2');
assert.equal(results.length, 1);
1.0.11

12 months ago

1.0.10

12 months ago

1.0.15

12 months ago

1.0.14

12 months ago

1.0.13

12 months ago

1.0.12

12 months ago

1.0.9

12 months ago

1.0.8

12 months ago

1.0.7

12 months ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.1

3 years ago

1.0.0

6 years ago