1.5.0 • Published 10 years ago

@pod-point/utils v1.5.0

Weekly downloads
49
License
MIT
Repository
github
Last release
10 years ago

Common utilities

Import

import { functionName } from '@pod-point/utils';

Functions

each

each(object, callback);

Performant object iteration. callback is provided (value, key, object):

each(object, (value) => console.log(value));

throttle

throttle(callback, limit = 35);

Prevent a function from firing more than once every limit milliseconds. limit defaults to 35 for roughly 30 frames per second.

whenCalm

whenCalm(callback, timeout = 250);

Fires a function only when it hasn't been requested for timeout milliseconds.

1.5.0

10 years ago

1.4.0

10 years ago

1.3.0

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago