0.5.1 • Published 1 year ago

@relax/async-utils v0.5.1

Weekly downloads
-
License
Unlicense
Repository
-
Last release
1 year ago

@relax/async-utils(1) -- async implementations of common utility functions

don't block

async-utils is designed to work with the async syntax to allow you to write non-blocking code that looks synchronous. functions like Array.prototype.map() are very useful, but operating over large collections will always block. async-utils rethinks a full range of useful tools to work with the event loop rather than against it.

contributors welcome! please email a patch or pull request to a maintainer and we'll get your changes merged as quickly as possible.

Modules

Classes

Functions

checksum

checksum(...input) ⇒ string

Kind: global method of checksum

ParamTypeDescription
...input*any javascript object

forEach

forEach(collection, fn) ⏏

Kind: global method of forEach

ParamType
collectionarray
fnfunction

matchCase

matchCase() ⏏

Kind: global method of matchCase

memoize

Memoize(identity) ⇒ function

Kind: global method of memoize
Returns: function - cache instance
See: checksum

ParamTypeDescription
identityfunctionoptional identity function

Memoize~memoize(fn, args, ttl)

Kind: inner method of Memoize

ParamTypeDescription
fnfunctionthe function that is being memoized
argsarrayarguments that should be passed into fn
ttlnumber | Objecttime to live value and cache group

memoize.clear(cacheGroup)

Kind: static method of memoize

ParamType
cacheGroupstring

microTask

microTask(fn) ⏏

Kind: global method of microTask

ParamType
fnfunction

pipe

pipe(predicate, fns) ⇒ Promise.<any>

Kind: global method of pipe

ParamType
predicateany
fnsArray.<function(value)>

Queue

Queue ⏏

Kind: global class of Queue

to

to() ⏏

Kind: global method of to
See: module:matchCase

0.5.0

1 year ago

0.5.1

1 year ago

0.4.1

2 years ago