@websinatra/cyan v0.1.1
@websinatra/cyan
Cyan is an async iterable object for performing async array operations on values sourced from the object with concurrency control.
Table of contents
- Installation
- Usage
[Cyan()](#cyan)
- Cyan.chunk()
- Cyan.from()
- Cyan.prototype.concat()
- Cyan.prototype.constructor
- Cyan.prototype.entries()
- Cyan.prototype.filter()
- Cyan.prototype.flat()
- Cyan.prototype.flatMap()
- Cyan.prototype.keys()
- Cyan.prototype.map()
- Cyan.prototype.slice()
- Cyan.prototype.toArray()
- Cyan.prototype.values()
- Cyan.prototype[@@asyncIterator]()
- Cyan.prototype[@@toStringTag]
- Cyan[@@species]
- Authors
- License
Installation
Install Cyan using your favorite package manager.
$ npm install @websinatra/cyan
Usage
Cyan()
Creates a new Cyan object with a new operator. Async iterable objects will be flattened unless Sinatra.cyanFlattenable property is set to false.
Cyan.chunk()
Creates a new Cyan instance containing array chunks from iterable the length of length.
- iterable
{number}
length=Number.MAX_SAFE_INTEGER
Cyan.from()
Creates a new Cyan instance from an array-like object, an async iterable object or an async iterator object.
{!{}}
obj
Cyan.prototype.concat()
Returns a new Cyan instance that is the calling Cyan object joined with values. Async iterable objects will be flattened unless Sinatra.cyanFlattenable property is set to false.
{...*}
values
Cyan.prototype.constructor
Constructor function that created the instance object.
Cyan.prototype.entries()
Returns a new Cyan instance that contains key/ value pairs for each index in the calling Cyan object.
Cyan.prototype.filter()
Returns a new Cyan instance containing all values of the calling Cyan object for which the provided callbackFn returns true.
{function}
callbackFn{number}
concurrency=Number.MAX_SAFE_INTEGER
Cyan.prototype.flat()
Returns a new Cyan instance with all values of the calling Cyan object that are iterable objects are flattened to specified depth, unless Sinatra.cyanFlattenable property is set to false.
{number}
depth=1
Cyan.prototype.flatMap()
Returns a new Cyan instance formed by applying Cyan.prototype.map.apply().flat(1) to values of the calling Cyan object.
{function}
callbackFn{number}
concurrency=Number.MAX_SAFE_INTEGER
Cyan.prototype.keys()
Returns a new Cyan instance that contains the keys for each index in the calling Cyan object.
Cyan.prototype.map()
Returns a new Cyan instance containing the results of invoking callbackFn on every value in the calling Cyan object.
{function}
callbackFn{number}
concurrency=Number.MAX_SAFE_INTEGER
Cyan.prototype.slice()
Returns a new Cyan instance by extracting a section of the calling Cyan object.
{number}
start=0{number}
end=Number.POSITIVE_INFINITY
Cyan.prototype.toArray()
Returns a Promise that is an array of fulfillment values of the calling Cyan object.
Cyan.prototype.values()
Returns a new Cyan instance that contains the values of the calling Cyan object.
Cyan.prototype[@@asyncIterator]()
Returns an async iterator object.
Cyan.prototype@@toStringTag
Returns "Cyan". Property is used in Object.prototype.toString().
Cyan@@species
Returns Cyan constructor.
Authors
Aziz Da azizdawhat@gmail.com