asyncawait
- Version 3.0.0
- Published
- 440 kB
- 3 dependencies
- MIT license
Install
npm i asyncawait
yarn add asyncawait
pnpm add asyncawait
Overview
async/await for node.js
Index
Variables
Namespaces
fs
- appendFile()
- appendFileSync()
- chmod()
- chmodSync()
- chown()
- chownSync()
- close()
- closeSync()
- createReadStream()
- createWriteStream()
- exists()
- existsSync()
- fchmod()
- fchmodSync()
- fchown()
- fchownSync()
- fstat()
- fstatSync()
- FSWatcher
- fsync()
- fsyncSync()
- ftruncate()
- ftruncateSync()
- futimes()
- futimesSync()
- lchmod()
- lchmodSync()
- lchown()
- lchownSync()
- link()
- linkSync()
- lstat()
- lstatSync()
- mkdir()
- mkdirSync()
- open()
- openSync()
- read()
- readdir()
- readdirSync()
- readFile()
- readFileSync()
- readlink()
- readlinkSync()
- ReadStream
- readSync()
- realpath()
- realpathSync()
- rename()
- renameSync()
- rmdir()
- rmdirSync()
- stat()
- Stats
- statSync()
- symlink()
- symlinkSync()
- truncate()
- truncateSync()
- unlink()
- unlinkSync()
- unwatchFile()
- utimes()
- utimesSync()
- watch()
- watchFile()
- write()
- writeFile()
- writeFileSync()
- WriteStream
- writeSync()
lodash
- Collection
- DebounceSettings
- Dictionary
- List
- ListIterator
- LoDashArrayWrapper
- LoDashArrayWrapper
- LoDashArrayWrapper
- LoDashArrayWrapper
- LoDashArrayWrapper
- LoDashArrayWrapper
- LoDashArrayWrapper
- LoDashArrayWrapper
- LoDashArrayWrapper
- LoDashArrayWrapper
- LoDashObjectWrapper
- LoDashObjectWrapper
- LoDashObjectWrapper
- LoDashObjectWrapper
- LoDashObjectWrapper
- LoDashObjectWrapper
- LoDashObjectWrapper
- LoDashObjectWrapper
- LoDashObjectWrapper
- LoDashObjectWrapper
- LoDashObjectWrapper
- LoDashObjectWrapper
- LoDashObjectWrapper
- LoDashObjectWrapper
- LoDashObjectWrapper
- LoDashObjectWrapper
- LoDashObjectWrapper
- LoDashObjectWrapper
- LoDashObjectWrapper
- LoDashObjectWrapper
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashStatic
- LoDashWrapper
- LoDashWrapper
- LoDashWrapper
- LoDashWrapperBase
- LoDashWrapperBase
- LoDashWrapperBase
- MemoIterator
- MemoVoidIterator
- ObjectIterator
- Support
- TemplateExecutor
- TemplateSettings
- ThrottleSettings
zlib
- createDeflate()
- createDeflateRaw()
- createGunzip()
- createGzip()
- createInflate()
- createInflateRaw()
- createUnzip()
- deflate()
- Deflate
- deflateRaw()
- DeflateRaw
- gunzip()
- Gunzip
- gzip()
- Gzip
- inflate()
- Inflate
- inflateRaw()
- InflateRaw
- unzip()
- Unzip
- Z_ASCII
- Z_BEST_COMPRESSION
- Z_BEST_SPEED
- Z_BINARY
- Z_BLOCK
- Z_BUF_ERROR
- Z_DATA_ERROR
- Z_DEFAULT_COMPRESSION
- Z_DEFAULT_STRATEGY
- Z_DEFLATED
- Z_ERRNO
- Z_FILTERED
- Z_FINISH
- Z_FIXED
- Z_FULL_FLUSH
- Z_HUFFMAN_ONLY
- Z_MEM_ERROR
- Z_NEED_DICT
- Z_NO_COMPRESSION
- Z_NO_FLUSH
- Z_NULL
- Z_OK
- Z_PARTIAL_FLUSH
- Z_RLE
- Z_STREAM_END
- Z_STREAM_ERROR
- Z_SYNC_FLUSH
- Z_TEXT
- Z_TREES
- Z_UNKNOWN
- Z_VERSION_ERROR
- ZlibOptions
Variables
variable async
var async: types.Async;
Creates a suspendable function. Suspendable functions may use the await() function internally to suspend execution at arbitrary points, pending the results of internal asynchronous operations.
Parameter fn
Contains the body of the suspendable function. Calls to await() may appear inside this function.
Returns
{Function} A function of the form
(...args) --> Promise
. Any arguments passed to this function are passed through to fn. The returned promise is resolved when fn returns, or rejected if fn throws.
Namespaces
namespace assert
module 'assert' {}
variable doesNotThrow
var doesNotThrow: { (block: Function, message?: string): void; (block: Function, error: Function, message?: string): void; (block: Function, error: RegExp, message?: string): void; (block: Function, error: (err: any) => boolean, message?: string): void;};
variable throws
var throws: { (block: Function, message?: string): void; (block: Function, error: Function, message?: string): void; (block: Function, error: RegExp, message?: string): void; (block: Function, error: (err: any) => boolean, message?: string): void;};
function deepEqual
deepEqual: (actual: any, expected: any, message?: string) => void;
function equal
equal: (actual: any, expected: any, message?: string) => void;
function fail
fail: ( actual?: any, expected?: any, message?: string, operator?: string) => void;
function ifError
ifError: (value: any) => void;
function internal
internal: typeof internal;
function notDeepEqual
notDeepEqual: (acutal: any, expected: any, message?: string) => void;
function notEqual
notEqual: (actual: any, expected: any, message?: string) => void;
function notStrictEqual
notStrictEqual: (actual: any, expected: any, message?: string) => void;
function ok
ok: (value: any, message?: string) => void;
function strictEqual
strictEqual: (actual: any, expected: any, message?: string) => void;
class AssertionError
class AssertionError implements Error {}
constructor
constructor(options?: { message?: string; actual?: any; expected?: any; operator?: string; stackStartFunction?: Function;});
property actual
actual: any;
property expected
expected: any;
property generatedMessage
generatedMessage: boolean;
property message
message: string;
property name
name: string;
property operator
operator: string;
namespace bluebird
module 'bluebird' {}
variable Promise
var Promise: PromiseConstructor;
interface Promise
interface Promise<T> {}
method catch
catch: <TResult = never>( onrejected?: (reason: any) => TResult | PromiseLike<TResult>) => Promise<T | TResult>;
method then
then: <TResult1 = T, TResult2 = never>( onfulfilled?: (value: T) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>;
interface Promise
interface Promise<T> {}
interface Promise
interface Promise<T> {}
property [Symbol.toStringTag]
readonly [Symbol.toStringTag]: string;
namespace chai
module 'chai' {}
variable assert
var assert: Assert;
variable config
var config: Config;
function expect
expect: (target: any, message?: string) => Expect;
function use
use: (fn: (chai: any, utils: any) => void) => any;
class AssertionError
class AssertionError {}
constructor
constructor(message: string, _props?: any, ssf?: Function);
property message
message: string;
property name
name: string;
property showDiff
showDiff: boolean;
property stack
stack: string;
interface Assert
interface Assert {}
method closeTo
closeTo: (act: number, exp: number, delta: number, msg?: string) => void;
method deepEqual
deepEqual: (act: any, exp: any, msg?: string) => void;
method deepProperty
deepProperty: (obj: Object, prop: string, msg?: string) => void;
method deepPropertyNotVal
deepPropertyNotVal: (obj: Object, prop: string, val: any, msg?: string) => void;
method deepPropertyVal
deepPropertyVal: (obj: Object, prop: string, val: any, msg?: string) => void;
method doesNotThrow
doesNotThrow: { (fn: Function, msg?: string): void; (fn: Function, regExp: RegExp): void; (fn: Function, errType: Function, msg?: string): void; (fn: Function, errType: Function, regExp: RegExp): void;};
method equal
equal: (act: any, exp: any, msg?: string) => void;
method fail
fail: (actual?: any, expected?: any, msg?: string, operator?: string) => void;
method ifError
ifError: (val: any, msg?: string) => void;
method include
include: { (exp: string, inc: any, msg?: string): void; (exp: any[], inc: any, msg?: string): void;};
method includeMembers
includeMembers: (set1: any[], set2: any[], msg?: string) => void;
method instanceOf
instanceOf: (val: any, type: Function, msg?: string) => void;
method isArray
isArray: (val: any, msg?: string) => void;
method isBoolean
isBoolean: (val: any, msg?: string) => void;
method isDefined
isDefined: (val: any, msg?: string) => void;
method isFalse
isFalse: (val: any, msg?: string) => void;
method isFunction
isFunction: (val: any, msg?: string) => void;
method isNotArray
isNotArray: (val: any, msg?: string) => void;
method isNotBoolean
isNotBoolean: (val: any, msg?: string) => void;
method isNotFunction
isNotFunction: (val: any, msg?: string) => void;
method isNotNull
isNotNull: (val: any, msg?: string) => void;
method isNotNumber
isNotNumber: (val: any, msg?: string) => void;
method isNotObject
isNotObject: (val: any, msg?: string) => void;
method isNotString
isNotString: (val: any, msg?: string) => void;
method isNull
isNull: (val: any, msg?: string) => void;
method isNumber
isNumber: (val: any, msg?: string) => void;
method isObject
isObject: (val: any, msg?: string) => void;
method isString
isString: (val: any, msg?: string) => void;
method isTrue
isTrue: (val: any, msg?: string) => void;
method isUndefined
isUndefined: (val: any, msg?: string) => void;
method lengthOf
lengthOf: (exp: any, len: number, msg?: string) => void;
method match
match: (exp: any, re: RegExp, msg?: string) => void;
method notDeepEqual
notDeepEqual: (act: any, exp: any, msg?: string) => void;
method notDeepProperty
notDeepProperty: (obj: Object, prop: string, msg?: string) => void;
method notEqual
notEqual: (act: any, exp: any, msg?: string) => void;
method notInclude
notInclude: { (exp: string, inc: any, msg?: string): void; (exp: any[], inc: any, msg?: string): void;};
method notInstanceOf
notInstanceOf: (val: any, type: Function, msg?: string) => void;
method notMatch
notMatch: (exp: any, re: RegExp, msg?: string) => void;
method notOk
notOk: (val: any, msg?: string) => void;
method notProperty
notProperty: (obj: Object, prop: string, msg?: string) => void;
method notStrictEqual
notStrictEqual: (act: any, exp: any, msg?: string) => void;
method notTypeOf
notTypeOf: (val: any, type: string, msg?: string) => void;
method ok
ok: (val: any, msg?: string) => void;
method operator
operator: (val: any, operator: string, val2: any, msg?: string) => void;
method property
property: (obj: Object, prop: string, msg?: string) => void;
method propertyNotVal
propertyNotVal: (obj: Object, prop: string, val: any, msg?: string) => void;
method propertyVal
propertyVal: (obj: Object, prop: string, val: any, msg?: string) => void;
method sameMembers
sameMembers: (set1: any[], set2: any[], msg?: string) => void;
method strictEqual
strictEqual: (act: any, exp: any, msg?: string) => void;
method throw
throw: { (fn: Function, msg?: string): void; (fn: Function, regExp: RegExp): void; (fn: Function, errType: Function, msg?: string): void; (fn: Function, errType: Function, regExp: RegExp): void;};
method Throw
Throw: { (fn: Function, msg?: string): void; (fn: Function, regExp: RegExp): void; (fn: Function, errType: Function, msg?: string): void; (fn: Function, errType: Function, regExp: RegExp): void;};
method throws
throws: { (fn: Function, msg?: string): void; (fn: Function, regExp: RegExp): void; (fn: Function, errType: Function, msg?: string): void; (fn: Function, errType: Function, regExp: RegExp): void;};
method typeOf
typeOf: (val: any, type: string, msg?: string) => void;
call signature
(express: any, msg?: string): void;
interface Assertions
interface Assertions {}
property checked
checked: any;
property disabled
disabled: any;
property empty
empty: any;
property exist
exist: any;
property hidden
hidden: any;
property selected
selected: any;
property visible
visible: any;
method attr
attr: (name: string, value?: string) => any;
method class
class: (className: string) => any;
method css
css: (name: string, value?: string) => any;
method data
data: (name: string, value?: string) => any;
method html
html: (html: string) => any;
method id
id: (id: string) => any;
method text
text: (text: string) => any;
method value
value: (value: string) => any;
interface Config
interface Config {}
property includeStack
includeStack: boolean;
interface Equal
interface Equal {}
call signature
(value: any, message?: string): Expect;
interface Expect
interface Expect extends LanguageChains, NumericComparison, TypeComparison, Assertions {}
property a
a: TypeComparison;
property an
an: TypeComparison;
property arguments
arguments: Expect;
property Arguments
Arguments: Expect;
property contain
contain: Include;
property deep
deep: Deep;
property empty
empty: Expect;
property eq
eq: Equal;
property eql
eql: Equal;
property eqls
eqls: Equal;
property equal
equal: Equal;
property equals
equals: Equal;
property exist
exist: Expect;
property false
false: Expect;
property haveOwnProperty
haveOwnProperty: OwnProperty;
property include
include: Include;
property itself
itself: Expect;
property keys
keys: Keys;
property length
length: Length;
property lengthOf
lengthOf: Length;
property members
members: Members;
property not
not: Expect;
property null
null: Expect;
property ok
ok: Expect;
property ownProperty
ownProperty: OwnProperty;
property property
property: Property;
property throw
throw: Throw;
property Throw
Throw: Throw;
property throws
throws: Throw;
property true
true: Expect;
property undefined
undefined: Expect;
method closeTo
closeTo: (expected: number, delta: number, message?: string) => Expect;
method key
key: (string: string) => Expect;
method match
match: (RegularExpression: RegExp, message?: string) => Expect;
method respondTo
respondTo: (method: string, message?: string) => Expect;
method satisfy
satisfy: (matcher: Function, message?: string) => Expect;
method string
string: (string: string, message?: string) => Expect;
interface ExpectStatic
interface ExpectStatic {}
call signature
(target: any): Expect;
interface Include
interface Include {}
property keys
keys: Keys;
property members
members: Members;
call signature
(value: Object, message?: string): Expect;
call signature
(value: string, message?: string): Expect;
call signature
(value: number, message?: string): Expect;
interface InstanceOf
interface InstanceOf {}
call signature
(constructor: Object, message?: string): Expect;
interface Keys
interface Keys {}
call signature
(...keys: string[]): Expect;
call signature
(keys: any[]): Expect;
interface LanguageChains
interface LanguageChains {}
interface Length
interface Length extends LanguageChains, NumericComparison {}
call signature
(length: number, message?: string): Expect;
interface Members
interface Members {}
call signature
(set: any[], message?: string): Expect;
interface NumberComparer
interface NumberComparer {}
call signature
(value: number, message?: string): Expect;
interface NumericComparison
interface NumericComparison {}
property above
above: NumberComparer;
property below
below: NumberComparer;
property greaterThan
greaterThan: NumberComparer;
property gt
gt: NumberComparer;
property gte
gte: NumberComparer;
property least
least: NumberComparer;
property lessThan
lessThan: NumberComparer;
property lt
lt: NumberComparer;
property lte
lte: NumberComparer;
property most
most: NumberComparer;
method within
within: (start: number, finish: number, message?: string) => Expect;
interface OwnProperty
interface OwnProperty {}
call signature
(name: string, message?: string): Expect;
interface Property
interface Property {}
call signature
(name: string, value?: any, message?: string): Expect;
interface Throw
interface Throw {}
call signature
(): Expect;
call signature
(expected: string, message?: string): Expect;
call signature
(expected: RegExp, message?: string): Expect;
call signature
(constructor: Error, expected?: string, message?: string): Expect;
call signature
(constructor: Error, expected?: RegExp, message?: string): Expect;
call signature
(constructor: Function, expected?: string, message?: string): Expect;
call signature
(constructor: Function, expected?: RegExp, message?: string): Expect;
interface TypeComparison
interface TypeComparison {}
property instanceof
instanceof: InstanceOf;
property instanceOf
instanceOf: InstanceOf;
call signature
(type: string, message?: string): Expect;
namespace child_process
module 'child_process' {}
function exec
exec: { ( command: string, options: { cwd?: string; stdio?: any; customFds?: any; env?: any; encoding?: string; timeout?: number; maxBuffer?: number; killSignal?: string; }, callback: (error: Error, stdout: NodeBuffer, stderr: NodeBuffer) => void ): ChildProcess; ( command: string, callback: (error: Error, stdout: NodeBuffer, stderr: NodeBuffer) => void ): ChildProcess;};
function execFile
execFile: ( file: string, args: string[], options: { cwd?: string; stdio?: any; customFds?: any; env?: any; encoding?: string; timeout?: number; maxBuffer?: string; killSignal?: string; }, callback: (error: Error, stdout: NodeBuffer, stderr: NodeBuffer) => void) => ChildProcess;
function fork
fork: ( modulePath: string, args?: string[], options?: { cwd?: string; env?: any; encoding?: string }) => ChildProcess;
function spawn
spawn: ( command: string, args?: string[], options?: { cwd?: string; stdio?: any; custom?: any; env?: any; detached?: boolean; }) => ChildProcess;
interface ChildProcess
interface ChildProcess extends NodeEventEmitter {}
namespace cluster
module 'cluster' {}
variable isMaster
var isMaster: boolean;
variable isWorker
var isWorker: boolean;
variable settings
var settings: ClusterSettings;
variable worker
var worker: Worker;
variable workers
var workers: Worker[];
function addListener
addListener: (event: string, listener: Function) => void;
function disconnect
disconnect: (callback?: Function) => void;
function emit
emit: (event: string, ...args: any[]) => boolean;
function fork
fork: (env?: any) => Worker;
function listeners
listeners: (event: string) => Function[];
function on
on: (event: string, listener: Function) => any;
function once
once: (event: string, listener: Function) => void;
function removeAllListeners
removeAllListeners: (event?: string) => void;
function removeListener
removeListener: (event: string, listener: Function) => void;
function setMaxListeners
setMaxListeners: (n: number) => void;
function setupMaster
setupMaster: (settings?: ClusterSettings) => void;
class Worker
class Worker extends events.EventEmitter {}
interface ClusterSettings
interface ClusterSettings {}
namespace crypto
module 'crypto' {}
function createCipher
createCipher: (algorithm: string, password: any) => Cipher;
function createCipheriv
createCipheriv: (algorithm: string, key: any, iv: any) => Cipher;
function createCredentials
createCredentials: (details: CredentialDetails) => Credentials;
function createDiffieHellman
createDiffieHellman: { (prime_length: number): DiffieHellman; (prime: number, encoding?: string): DiffieHellman;};
function createHash
createHash: (algorithm: string) => Hash;
function createHmac
createHmac: (algorithm: string, key: string) => Hmac;
function createSign
createSign: (algorithm: string) => Signer;
function createVerify
createVerify: (algorith: string) => Verify;
function getDiffieHellman
getDiffieHellman: (group_name: string) => DiffieHellman;
function pbkdf2
pbkdf2: ( password: string, salt: string, iterations: number, keylen: number, callback: (err: Error, derivedKey: string) => any) => void;
function pseudoRandomBytes
pseudoRandomBytes: { (size: number): NodeBuffer; (size: number, callback: (err: Error, buf: NodeBuffer) => void): void;};
function randomBytes
randomBytes: { (size: number): NodeBuffer; (size: number, callback: (err: Error, buf: NodeBuffer) => void): void;};
interface Cipher
interface Cipher {}
method createDecipher
createDecipher: (algorithm: string, password: any) => Decipher;
method createDecipheriv
createDecipheriv: (algorithm: string, key: any, iv: any) => Decipher;
method final
final: (output_encoding?: string) => string;
method setAutoPadding
setAutoPadding: (auto_padding: boolean) => void;
method update
update: (data: any, input_encoding?: string, output_encoding?: string) => string;
interface CredentialDetails
interface CredentialDetails {}
interface Credentials
interface Credentials {}
property context
context?: any;
interface Decipher
interface Decipher {}
method final
final: (output_encoding?: string) => string;
method setAutoPadding
setAutoPadding: (auto_padding: boolean) => void;
method update
update: (data: any, input_encoding?: string, output_encoding?: string) => void;
interface DiffieHellman
interface DiffieHellman {}
method computeSecret
computeSecret: ( other_public_key: string, input_encoding?: string, output_encoding?: string) => string;
method generateKeys
generateKeys: (encoding?: string) => string;
method getGenerator
getGenerator: (encoding: string) => string;
method getPrime
getPrime: (encoding?: string) => string;
method getPrivateKey
getPrivateKey: (encoding?: string) => string;
method getPublicKey
getPublicKey: (encoding?: string) => string;
method setPrivateKey
setPrivateKey: (public_key: string, encoding?: string) => void;
method setPublicKey
setPublicKey: (public_key: string, encoding?: string) => void;
interface Hash
interface Hash {}
interface Hmac
interface Hmac {}
interface Signer
interface Signer {}
namespace dgram
module 'dgram' {}
function createSocket
createSocket: (type: string, callback?: Function) => Socket;
interface Socket
interface Socket extends NodeEventEmitter {}
property address
address: { address: string; family: string; port: number };
method addMembership
addMembership: (multicastAddress: string, multicastInterface?: string) => void;
method bind
bind: (port: number, address?: string) => void;
method close
close: () => void;
method dropMembership
dropMembership: (multicastAddress: string, multicastInterface?: string) => void;
method send
send: ( buf: NodeBuffer, offset: number, length: number, port: number, address: string, callback?: Function) => void;
method setBroadcast
setBroadcast: (flag: boolean) => void;
method setMulticastLoopback
setMulticastLoopback: (flag: boolean) => void;
method setMulticastTTL
setMulticastTTL: (ttl: number) => void;
namespace dns
module 'dns' {}
function lookup
lookup: { ( domain: string, family: number, callback: (err: Error, address: string, family: number) => void ): string; ( domain: string, callback: (err: Error, address: string, family: number) => void ): string;};
function resolve
resolve: { ( domain: string, rrtype: string, callback: (err: Error, addresses: string[]) => void ): string[]; (domain: string, callback: (err: Error, addresses: string[]) => void): string[];};
function resolve4
resolve4: ( domain: string, callback: (err: Error, addresses: string[]) => void) => string[];
function resolve6
resolve6: ( domain: string, callback: (err: Error, addresses: string[]) => void) => string[];
function resolveCname
resolveCname: ( domain: string, callback: (err: Error, addresses: string[]) => void) => string[];
function resolveMx
resolveMx: ( domain: string, callback: (err: Error, addresses: string[]) => void) => string[];
function resolveNs
resolveNs: ( domain: string, callback: (err: Error, addresses: string[]) => void) => string[];
function resolveSrv
resolveSrv: ( domain: string, callback: (err: Error, addresses: string[]) => void) => string[];
function resolveTxt
resolveTxt: ( domain: string, callback: (err: Error, addresses: string[]) => void) => string[];
function reverse
reverse: ( ip: string, callback: (err: Error, domains: string[]) => void) => string[];
namespace domain
module 'domain' {}
function create
create: () => Domain;
class Domain
class Domain extends events.EventEmitter {}
method add
add: (emitter: NodeEventEmitter) => void;
method addListener
addListener: (event: string, listener: Function) => Domain;
method bind
bind: (cb: (err: Error, data: any) => any) => any;
method dispose
dispose: () => void;
method intercept
intercept: (cb: (data: any) => any) => any;
method on
on: (event: string, listener: Function) => Domain;
method once
once: (event: string, listener: Function) => Domain;
method remove
remove: (emitter: NodeEventEmitter) => void;
method removeAllListeners
removeAllListeners: (event?: string) => Domain;
method removeListener
removeListener: (event: string, listener: Function) => Domain;
method run
run: (fn: Function) => void;
namespace events
module 'events' {}
class EventEmitter
class EventEmitter implements NodeEventEmitter {}
method addListener
addListener: (event: string, listener: Function) => EventEmitter;
method emit
emit: (event: string, ...args: any[]) => boolean;
method listenerCount
static listenerCount: (emitter: EventEmitter, event: string) => number;
method listeners
listeners: (event: string) => Function[];
method on
on: (event: string, listener: Function) => EventEmitter;
method once
once: (event: string, listener: Function) => EventEmitter;
method removeAllListeners
removeAllListeners: (event?: string) => EventEmitter;
method removeListener
removeListener: (event: string, listener: Function) => EventEmitter;
method setMaxListeners
setMaxListeners: (n: number) => void;
namespace fibers
module 'fibers' {}
variable current
var current: Fiber;
variable fibersCreated
var fibersCreated: number;
variable poolSize
var poolSize: number;
function Fiber
Fiber: typeof Fiber;
function yield
yield: (value?: any) => any;
namespace fibers/future
module 'fibers/future' {}
class Future
class Future {}
constructor
constructor();
method detach
detach: () => void;
method get
get: () => any;
method isResolved
isResolved: () => boolean;
method proxy
proxy: (future: Future) => void;
method proxyErrors
proxyErrors: (futureOrList: any) => Future;
method resolve
resolve: (fn: Function) => void;
method resolver
resolver: () => Function;
method resolveSuccess
resolveSuccess: (fn: Function) => void;
method return
return: (result?: any) => void;
method throw
throw: (error: any) => void;
method wait
static wait: { (future: Future): any; (future_list: Future[]): any };
method wrap
static wrap: (fn: Function) => Future;
namespace fs
module 'fs' {}
function appendFile
appendFile: { ( filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string }, callback?: (err: ErrnoException) => void ): void; ( filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string }, callback?: (err: ErrnoException) => void ): void; (filename: string, data: any, callback?: (err: ErrnoException) => void): void;};
function appendFileSync
appendFileSync: { ( filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string } ): void; ( filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string } ): void;};
function chmod
chmod: { (path: string, mode: number, callback?: (err?: ErrnoException) => void): void; (path: string, mode: string, callback?: (err?: ErrnoException) => void): void;};
function chmodSync
chmodSync: { (path: string, mode: number): void; (path: string, mode: string): void;};
function chown
chown: ( path: string, uid: number, gid: number, callback?: (err?: ErrnoException) => void) => void;
function chownSync
chownSync: (path: string, uid: number, gid: number) => void;
function close
close: (fd: number, callback?: (err?: ErrnoException) => void) => void;
function closeSync
closeSync: (fd: number) => void;
function createReadStream
createReadStream: { ( path: string, options?: { flags?: string; encoding?: string; fd?: string; mode?: number; bufferSize?: number; } ): ReadStream; ( path: string, options?: { flags?: string; encoding?: string; fd?: string; mode?: string; bufferSize?: number; } ): ReadStream;};
function createWriteStream
createWriteStream: ( path: string, options?: { flags?: string; encoding?: string; string?: string }) => WriteStream;
function exists
exists: (path: string, callback?: (exists: boolean) => void) => void;
function existsSync
existsSync: (path: string) => boolean;
function fchmod
fchmod: { (fd: number, mode: number, callback?: (err?: ErrnoException) => void): void; (fd: number, mode: string, callback?: (err?: ErrnoException) => void): void;};
function fchmodSync
fchmodSync: { (fd: number, mode: number): void; (fd: number, mode: string): void;};
function fchown
fchown: ( fd: number, uid: number, gid: number, callback?: (err?: ErrnoException) => void) => void;
function fchownSync
fchownSync: (fd: number, uid: number, gid: number) => void;
function fstat
fstat: ( fd: number, callback?: (err: ErrnoException, stats: Stats) => any) => void;
function fstatSync
fstatSync: (fd: number) => Stats;
function fsync
fsync: (fd: number, callback?: (err?: ErrnoException) => void) => void;
function fsyncSync
fsyncSync: (fd: number) => void;
function ftruncate
ftruncate: { (fd: number, callback?: (err?: ErrnoException) => void): void; (fd: number, len: number, callback?: (err?: ErrnoException) => void): void;};
function ftruncateSync
ftruncateSync: (fd: number, len?: number) => void;
function futimes
futimes: ( fd: number, atime: number, mtime: number, callback?: (err?: ErrnoException) => void) => void;
function futimesSync
futimesSync: (fd: number, atime: number, mtime: number) => void;
function lchmod
lchmod: { (path: string, mode: number, callback?: (err?: ErrnoException) => void): void; (path: string, mode: string, callback?: (err?: ErrnoException) => void): void;};
function lchmodSync
lchmodSync: { (path: string, mode: number): void; (path: string, mode: string): void;};
function lchown
lchown: ( path: string, uid: number, gid: number, callback?: (err?: ErrnoException) => void) => void;
function lchownSync
lchownSync: (path: string, uid: number, gid: number) => void;
function link
link: ( srcpath: string, dstpath: string, callback?: (err?: ErrnoException) => void) => void;
function linkSync
linkSync: (srcpath: string, dstpath: string) => void;
function lstat
lstat: ( path: string, callback?: (err: ErrnoException, stats: Stats) => any) => void;
function lstatSync
lstatSync: (path: string) => Stats;
function mkdir
mkdir: { (path: string, callback?: (err?: ErrnoException) => void): void; (path: string, mode: number, callback?: (err?: ErrnoException) => void): void; (path: string, mode: string, callback?: (err?: ErrnoException) => void): void;};
function mkdirSync
mkdirSync: { (path: string, mode?: number): void; (path: string, mode?: string): void;};
function open
open: { ( path: string, flags: string, callback?: (err: ErrnoException, fd: number) => any ): void; ( path: string, flags: string, mode: number, callback?: (err: ErrnoException, fd: number) => any ): void; ( path: string, flags: string, mode: string, callback?: (err: ErrnoException, fd: number) => any ): void;};
function openSync
openSync: { (path: string, flags: string, mode?: number): number; (path: string, flags: string, mode?: string): number;};
function read
read: ( fd: number, buffer: NodeBuffer, offset: number, length: number, position: number, callback?: (err: ErrnoException, bytesRead: number, buffer: NodeBuffer) => void) => void;
function readdir
readdir: ( path: string, callback?: (err: ErrnoException, files: string[]) => void) => void;
function readdirSync
readdirSync: (path: string) => string[];
function readFile
readFile: { ( filename: string, options: { encoding?: string; flag?: string }, callback: (err: ErrnoException, data: any) => void ): void; ( filename: string, callback: (err: ErrnoException, data: NodeBuffer) => void ): void;};
function readFileSync
readFileSync: { (filename: string, options?: { flag?: string }): NodeBuffer; (filename: string, options: { encoding: string; flag?: string }): string;};
function readlink
readlink: ( path: string, callback?: (err: ErrnoException, linkString: string) => any) => void;
function readlinkSync
readlinkSync: (path: string) => string;
function readSync
readSync: ( fd: number, buffer: NodeBuffer, offset: number, length: number, position: number) => number;
function realpath
realpath: { ( path: string, callback?: (err: ErrnoException, resolvedPath: string) => any ): void; ( path: string, cache: { [path: string]: string }, callback: (err: ErrnoException, resolvedPath: string) => any ): void;};
function realpathSync
realpathSync: (path: string, cache?: { [path: string]: string }) => void;
function rename
rename: ( oldPath: string, newPath: string, callback?: (err?: ErrnoException) => void) => void;
function renameSync
renameSync: (oldPath: string, newPath: string) => void;
function rmdir
rmdir: (path: string, callback?: (err?: ErrnoException) => void) => void;
function rmdirSync
rmdirSync: (path: string) => void;
function stat
stat: ( path: string, callback?: (err: ErrnoException, stats: Stats) => any) => void;
function statSync
statSync: (path: string) => Stats;
function symlink
symlink: ( srcpath: string, dstpath: string, type?: string, callback?: (err?: ErrnoException) => void) => void;
function symlinkSync
symlinkSync: (srcpath: string, dstpath: string, type?: string) => void;
function truncate
truncate: { (path: string, callback?: (err?: ErrnoException) => void): void; (path: string, len: number, callback?: (err?: ErrnoException) => void): void;};
function truncateSync
truncateSync: (path: string, len?: number) => void;
function unlink
unlink: (path: string, callback?: (err?: ErrnoException) => void) => void;
function unlinkSync
unlinkSync: (path: string) => void;
function unwatchFile
unwatchFile: ( filename: string, listener?: (curr: Stats, prev: Stats) => void) => void;
function utimes
utimes: ( path: string, atime: number, mtime: number, callback?: (err?: ErrnoException) => void) => void;
function utimesSync
utimesSync: (path: string, atime: number, mtime: number) => void;
function watch
watch: { ( filename: string, listener?: (event: string, filename: string) => any ): FSWatcher; ( filename: string, options: { persistent?: boolean }, listener?: (event: string, filename: string) => any ): FSWatcher;};
function watchFile
watchFile: { (filename: string, listener: (curr: Stats, prev: Stats) => void): void; ( filename: string, options: { persistent?: boolean; interval?: number }, listener: (curr: Stats, prev: Stats) => void ): void;};
function write
write: ( fd: number, buffer: NodeBuffer, offset: number, length: number, position: number, callback?: (err: ErrnoException, written: number, buffer: NodeBuffer) => void) => void;
function writeFile
writeFile: { (filename: string, data: any, callback?: (err: ErrnoException) => void): void; ( filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string }, callback?: (err: ErrnoException) => void ): void; ( filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string }, callback?: (err: ErrnoException) => void ): void;};
function writeFileSync
writeFileSync: { ( filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string } ): void; ( filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string } ): void;};
function writeSync
writeSync: ( fd: number, buffer: NodeBuffer, offset: number, length: number, position: number) => number;
interface ReadStream
interface ReadStream extends ReadableStream {}
interface Stats
interface Stats {}
property atime
atime: Date;
property blksize
blksize: number;
property blocks
blocks: number;
property ctime
ctime: Date;
property dev
dev: number;
property gid
gid: number;
property ino
ino: number;
property mode
mode: number;
property mtime
mtime: Date;
property nlink
nlink: number;
property rdev
rdev: number;
property size
size: number;
property uid
uid: number;
method isBlockDevice
isBlockDevice: () => boolean;
method isCharacterDevice
isCharacterDevice: () => boolean;
method isDirectory
isDirectory: () => boolean;
method isFIFO
isFIFO: () => boolean;
method isFile
isFile: () => boolean;
method isSocket
isSocket: () => boolean;
method isSymbolicLink
isSymbolicLink: () => boolean;
interface WriteStream
interface WriteStream extends WritableStream {}
namespace http
module 'http' {}
variable globalAgent
var globalAgent: Agent;
variable STATUS_CODES
var STATUS_CODES: any;
function createClient
createClient: (port?: number, host?: string) => any;
function createServer
createServer: ( requestListener?: (request: ServerRequest, response: ServerResponse) => void) => Server;
function get
get: (options: any, callback?: Function) => ClientRequest;
function request
request: (options: any, callback?: Function) => ClientRequest;
interface Agent
interface Agent {}
interface ClientRequest
interface ClientRequest extends NodeEventEmitter, WritableStream {}
method abort
abort: () => void;
method end
end: { (): void; (buffer: NodeBuffer, cb?: Function): void; (str: string, cb?: Function): void; (str: string, encoding?: string, cb?: Function): void; (data?: any, encoding?: string): void;};
method setNoDelay
setNoDelay: (noDelay?: Function) => void;
method setSocketKeepAlive
setSocketKeepAlive: (enable?: boolean, initialDelay?: number) => void;
method setTimeout
setTimeout: (timeout: number, callback?: Function) => void;
method write
write: { (buffer: NodeBuffer): boolean; (buffer: NodeBuffer, cb?: Function): boolean; (str: string, cb?: Function): boolean; (str: string, encoding?: string, cb?: Function): boolean; (str: string, encoding?: string, fd?: string): boolean; (chunk: any, encoding?: string): void;};
interface ClientResponse
interface ClientResponse extends NodeEventEmitter, ReadableStream {}
property headers
headers: any;
property httpVersion
httpVersion: string;
property statusCode
statusCode: number;
property trailers
trailers: any;
method pause
pause: () => void;
method resume
resume: () => void;
method setEncoding
setEncoding: (encoding?: string) => void;
interface Server
interface Server extends NodeEventEmitter {}
property maxHeadersCount
maxHeadersCount: number;
method close
close: (cb?: any) => void;
method listen
listen: { ( port: number, hostname?: string, backlog?: number, callback?: Function ): void; (path: string, callback?: Function): void; (handle: any, listeningListener?: Function): void;};
interface ServerRequest
interface ServerRequest extends NodeEventEmitter, ReadableStream {}
property connection
connection: net.NodeSocket;
property headers
headers: any;
property httpVersion
httpVersion: string;
property method
method: string;
property trailers
trailers: string;
property url
url: string;
method pause
pause: () => void;
method resume
resume: () => void;
method setEncoding
setEncoding: (encoding?: string) => void;
interface ServerResponse
interface ServerResponse extends NodeEventEmitter, WritableStream {}
property sendDate
sendDate: boolean;
property statusCode
statusCode: number;
method addTrailers
addTrailers: (headers: any) => void;
method end
end: { (): void; (buffer: NodeBuffer, cb?: Function): void; (str: string, cb?: Function): void; (str: string, encoding?: string, cb?: Function): void; (data?: any, encoding?: string): void;};
method getHeader
getHeader: (name: string) => string;
method removeHeader
removeHeader: (name: string) => void;
method setHeader
setHeader: (name: string, value: string) => void;
method write
write: { (buffer: NodeBuffer): boolean; (buffer: NodeBuffer, cb?: Function): boolean; (str: string, cb?: Function): boolean; (str: string, encoding?: string, cb?: Function): boolean; (str: string, encoding?: string, fd?: string): boolean; (chunk: any, encoding?: string): any;};
method writeContinue
writeContinue: () => void;
method writeHead
writeHead: { (statusCode: number, reasonPhrase?: string, headers?: any): void; (statusCode: number, headers?: any): void;};
namespace https
module 'https' {}
variable Agent
var Agent: new (options?: RequestOptions) => NodeAgent;
variable globalAgent
var globalAgent: NodeAgent;
function createServer
createServer: (options: ServerOptions, requestListener?: Function) => Server;
function get
get: ( options: RequestOptions, callback?: (res: NodeEventEmitter) => void) => http.ClientRequest;
function request
request: ( options: RequestOptions, callback?: (res: NodeEventEmitter) => void) => http.ClientRequest;
interface NodeAgent
interface NodeAgent {}
interface RequestOptions
interface RequestOptions {}
property agent
agent?: any;
property auth
auth?: string;
property ca
ca?: any;
property cert
cert?: any;
property ciphers
ciphers?: string;
property headers
headers?: any;
property host
host?: string;
property hostname
hostname?: string;
property key
key?: any;
property method
method?: string;
property passphrase
passphrase?: string;
property path
path?: string;
property pfx
pfx?: any;
property port
port?: number;
property rejectUnauthorized
rejectUnauthorized?: boolean;
interface Server
interface Server extends tls.Server {}
interface ServerOptions
interface ServerOptions {}
property ca
ca?: any;
property cert
cert?: any;
property ciphers
ciphers?: string;
property crl
crl?: any;
property honorCipherOrder
honorCipherOrder?: boolean;
property key
key?: any;
property NPNProtocols
NPNProtocols?: any;
property passphrase
passphrase?: string;
property pfx
pfx?: any;
property rejectUnauthorized
rejectUnauthorized?: boolean;
property requestCert
requestCert?: boolean;
property SNICallback
SNICallback?: (servername: string) => any;
namespace lodash
module 'lodash' {}
interface Collection
interface Collection<T> {}
interface DebounceSettings
interface DebounceSettings {}
interface Dictionary
interface Dictionary<T> extends Collection<T> {}
index signature
[index: string]: T;
interface List
interface List<T> extends Collection<T> {}
property length
length: number;
index signature
[index: number]: T;
interface ListIterator
interface ListIterator<T, TResult> {}
call signature
(value: T, index: number, list: T[]): TResult;
interface LoDashArrayWrapper
interface LoDashArrayWrapper<T> extends LoDashWrapperBase<T[], LoDashArrayWrapper<T>> {}
method concat
concat: (...items: T[]) => LoDashArrayWrapper<T>;
method join
join: (seperator?: string) => LoDashWrapper<string>;
method pop
pop: () => LoDashWrapper<T>;
method push
push: (...items: T[]) => void;
method reverse
reverse: () => LoDashArrayWrapper<T>;
method shift
shift: () => LoDashWrapper<T>;
method slice
slice: (start: number, end?: number) => LoDashArrayWrapper<T>;
method sort
sort: (compareFn?: (a: T, b: T) => number) => LoDashArrayWrapper<T>;
method splice
splice: { (start: number): LoDashArrayWrapper<T>; (start: number, deleteCount: number, ...items: any[]): LoDashArrayWrapper<T>;};
method unshift
unshift: (...items: any[]) => LoDashWrapper<number>;
interface LoDashArrayWrapper
interface LoDashArrayWrapper<T> {}
method compact
compact: <T>() => LoDashArrayWrapper<T>;
See Also
_.compact
interface LoDashArrayWrapper
interface LoDashArrayWrapper<T> {}
method difference
difference: (...others: List<T>[]) => LoDashArrayWrapper<T>;
See Also
_.difference
interface LoDashArrayWrapper
interface LoDashArrayWrapper<T> {}
method flatten
flatten: { <Flat>(isShallow?: boolean): LoDashArrayWrapper<Flat>; <Flat>( isShallow: boolean, callback: ListIterator<T, Flat>, thisArg?: any ): LoDashArrayWrapper<Flat>; <Flat>( callback: ListIterator<T, Flat>, thisArg?: any ): LoDashArrayWrapper<Flat>; <Flat>(isShallow: boolean, pluckValue: string): LoDashArrayWrapper<Flat>; <Flat>(pluckValue: string): LoDashArrayWrapper<Flat>; <Flat, W>(isShallow: boolean, whereValue: W): LoDashArrayWrapper<Flat>; <Flat, W>(whereValue: W): LoDashArrayWrapper<Flat>;};
See Also
_.flatten
interface LoDashArrayWrapper
interface LoDashArrayWrapper<T> {}
method countBy
countBy: { <T>(callback?: ListIterator<T, any>, thisArg?: any): LoDashObjectWrapper< Dictionary<number> >; <T>(callback: string, thisArg?: any): LoDashObjectWrapper< Dictionary<number> >;};
See Also
_.countBy
Parameter callback
Function name
See Also
_.countBy
interface LoDashArrayWrapper
interface LoDashArrayWrapper<T> {}
method filter
filter: { <T>( callback: ListIterator<T, boolean>, thisArg?: any ): LoDashArrayWrapper<T>; <T>(pluckValue: string): LoDashArrayWrapper<T>; <W, T>(whereValue: W): LoDashArrayWrapper<T>;};
See Also
_.filter
Parameter pluckValue
_.pluck style callback
See Also
_.filter
method select
select: { <T>( callback: ListIterator<T, boolean>, thisArg?: any ): LoDashArrayWrapper<T>; <T>(pluckValue: string): LoDashArrayWrapper<T>; <W, T>(whereValue: W): LoDashArrayWrapper<T>;};
See Also
_.filter
Parameter pluckValue
_.pluck style callback
See Also
_.filter
interface LoDashArrayWrapper
interface LoDashArrayWrapper<T> {}
interface LoDashArrayWrapper
interface LoDashArrayWrapper<T> {}
method eachRight
eachRight: <T>( callback: ListIterator<T, void>, thisArg?: any) => LoDashArrayWrapper<T>;
See Also
_.forEachRight
method forEachRight
forEachRight: <T>( callback: ListIterator<T, void>, thisArg?: any) => LoDashArrayWrapper<T>;
See Also
_.forEachRight
interface LoDashArrayWrapper
interface LoDashArrayWrapper<T> {}
method groupBy
groupBy: { <T>(callback: ListIterator<T, any>, thisArg?: any): _.LoDashObjectWrapper< Dictionary<T[]> >; <T>(pluckValue: string): LoDashObjectWrapper<Dictionary<T[]>>; <W, T>(whereValue: W): LoDashObjectWrapper<Dictionary<T[]>>;};
See Also
_.groupBy
interface LoDashArrayWrapper
interface LoDashArrayWrapper<T> {}
method collect
collect: { <T, TResult>( callback: ListIterator<T, TResult>, thisArg?: any ): LoDashArrayWrapper<TResult>; <T, TResult>(pluckValue: string): LoDashArrayWrapper<TResult>;};
See Also
_.map
method map
map: { <T, TResult>( callback: ListIterator<T, TResult>, thisArg?: any ): LoDashArrayWrapper<TResult>; <T, TResult>(pluckValue: string): LoDashArrayWrapper<TResult>;};
See Also
_.map
Parameter pluckValue
_.pluck style callback
See Also
_.map
interface LoDashObjectWrapper
interface LoDashObjectWrapper<T> extends LoDashWrapperBase<T, LoDashObjectWrapper<T>> {}
interface LoDashObjectWrapper
interface LoDashObjectWrapper<T> {}
interface LoDashObjectWrapper
interface LoDashObjectWrapper<T> {}
method eachRight
eachRight: <T extends {}>( callback: ObjectIterator<T, void>, thisArg?: any) => LoDashObjectWrapper<Dictionary<T>>;
Parameter object
The object to iterate over
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback.
See Also
_.forEachRight
method forEachRight
forEachRight: <T extends {}>( callback: ObjectIterator<T, void>, thisArg?: any) => LoDashObjectWrapper<Dictionary<T>>;
See Also
_.forEachRight
interface LoDashObjectWrapper
interface LoDashObjectWrapper<T> {}
interface LoDashObjectWrapper
interface LoDashObjectWrapper<T> {}
method bind
bind: (thisArg: any, ...args: any[]) => LoDashObjectWrapper<() => any>;
See Also
_.bind
interface LoDashObjectWrapper
interface LoDashObjectWrapper<T> {}
method bindAll
bindAll: <T>(...methodNames: string[]) => LoDashWrapper<T>;
See Also
_.bindAll
interface LoDashObjectWrapper
interface LoDashObjectWrapper<T> {}
method bindKey
bindKey: (key: string, ...args: any[]) => LoDashObjectWrapper<Function>;
See Also
_.bindKey
interface LoDashObjectWrapper
interface LoDashObjectWrapper<T> {}
method compose
compose: (...funcs: Function[]) => LoDashObjectWrapper<Function>;
See Also
_.compose
interface LoDashObjectWrapper
interface LoDashObjectWrapper<T> {}
method createCallback
createCallback: ( thisArg?: any, argCount?: number) => LoDashObjectWrapper<() => any>;
See Also
_.createCallback
interface LoDashObjectWrapper
interface LoDashObjectWrapper<T> {}
method curry
curry: (arity?: number) => LoDashObjectWrapper<Function>;
See Also
_.curry
interface LoDashObjectWrapper
interface LoDashObjectWrapper<T> {}
method debounce
debounce: ( wait: number, options?: DebounceSettings) => LoDashObjectWrapper<Function>;
See Also
_.debounce
interface LoDashObjectWrapper
interface LoDashObjectWrapper<T> {}
method defer
defer: (...args: any[]) => LoDashWrapper<number>;
See Also
_.defer
interface LoDashObjectWrapper
interface LoDashObjectWrapper<T> {}
method delay
delay: (wait: number, ...args: any[]) => LoDashWrapper<number>;
See Also
_.delay
interface LoDashObjectWrapper
interface LoDashObjectWrapper<T> {}
method assign
assign: { <S1, Value, TResult>( s1: S1, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): TResult; <S1, S2, Value, TResult>( s1: S1, s2: S2, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): TResult; <S1, S2, S3, Value, TResult>( s1: S1, s2: S2, s3: S3, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): TResult; <S1, S2, S3, S4, Value, TResult>( s1: S1, s2: S2, s3: S3, s4: S4, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): TResult; <S1, S2, S3, S4, S5, Value, TResult>( s1: S1, s2: S2, s3: S3, s4: S4, s5: S5, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): TResult;};
See Also
_.assign
method extend
extend: { <S1, Value, TResult>( s1: S1, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): TResult; <S1, S2, Value, TResult>( s1: S1, s2: S2, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): TResult; <S1, S2, S3, Value, TResult>( s1: S1, s2: S2, s3: S3, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): TResult; <S1, S2, S3, S4, Value, TResult>( s1: S1, s2: S2, s3: S3, s4: S4, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): TResult; <S1, S2, S3, S4, S5, Value, TResult>( s1: S1, s2: S2, s3: S3, s4: S4, s5: S5, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): TResult;};
See Also
_.assign
interface LoDashObjectWrapper
interface LoDashObjectWrapper<T> {}
method defaults
defaults: <T, TResult>(...sources: any[]) => LoDashObjectWrapper<TResult>;
See Also
_.defaults
interface LoDashObjectWrapper
interface LoDashObjectWrapper<T> {}
method forIn
forIn: <T extends {}>( callback: ObjectIterator<T, void>, thisArg?: any) => _.LoDashObjectWrapper<T>;
See Also
_.forIn
interface LoDashObjectWrapper
interface LoDashObjectWrapper<T> {}
method forInRight
forInRight: <T extends {}>( callback: ObjectIterator<T, void>, thisArg?: any) => _.LoDashObjectWrapper<T>;
See Also
_.forInRight
interface LoDashObjectWrapper
interface LoDashObjectWrapper<T> {}
method forOwn
forOwn: <T extends {}>( callback: ObjectIterator<T, void>, thisArg?: any) => _.LoDashObjectWrapper<T>;
See Also
_.forOwn
interface LoDashObjectWrapper
interface LoDashObjectWrapper<T> {}
method forOwnRight
forOwnRight: <T extends {}>( callback: ObjectIterator<T, void>, thisArg?: any) => _.LoDashObjectWrapper<T>;
See Also
_.forOwnRight
interface LoDashObjectWrapper
interface LoDashObjectWrapper<T> {}
interface LoDashStatic
interface LoDashStatic {}
property support
support: Support;
An object used to flag environments features.
property templateSettings
templateSettings: TemplateSettings;
By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby (ERB). Change the following template settings to use alternative delimiters.
property VERSION
VERSION: string;
The semantic version number.
call signature
(value: number): LoDashWrapper<number>;
Creates a lodash object which wraps the given value to enable intuitive method chaining.
In addition to Lo-Dash methods, wrappers also have the following Array methods: concat, join, pop, push, reverse, shift, slice, sort, splice, and unshift
Chaining is supported in custom builds as long as the value method is implicitly or explicitly included in the build.
The chainable wrapper functions are: after, assign, bind, bindAll, bindKey, chain, compact, compose, concat, countBy, createCallback, curry, debounce, defaults, defer, delay, difference, filter, flatten, forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, functions, groupBy, indexBy, initial, intersection, invert, invoke, keys, map, max, memoize, merge, min, object, omit, once, pairs, partial, partialRight, pick, pluck, pull, push, range, reject, remove, rest, reverse, shuffle, slice, sort, sortBy, splice, tap, throttle, times, toArray, transform, union, uniq, unshift, unzip, values, where, without, wrap, and zip
The non-chainable wrapper functions are: clone, cloneDeep, contains, escape, every, find, findIndex, findKey, findLast, findLastIndex, findLastKey, has, identity, indexOf, isArguments, isArray, isBoolean, isDate, isElement, isEmpty, isEqual, isFinite, isFunction, isNaN, isNull, isNumber, isObject, isPlainObject, isRegExp, isString, isUndefined, join, lastIndexOf, mixin, noConflict, parseInt, pop, random, reduce, reduceRight, result, shift, size, some, sortedIndex, runInContext, template, unescape, uniqueId, and value
The wrapper functions first and last return wrapped values when n is provided, otherwise they return unwrapped values.
Explicit chaining can be enabled by using the _.chain method.
call signature
(value: string): LoDashWrapper<string>;
call signature
(value: boolean): LoDashWrapper<boolean>;
call signature
<T>(value: Array<T>): LoDashArrayWrapper<T>;
call signature
<T extends {}>(value: T): LoDashObjectWrapper<T>;
call signature
(value: any): LoDashWrapper<any>;
interface LoDashStatic
interface LoDashStatic {}
method chain
chain: { (value: number): LoDashWrapper<number>; (value: string): LoDashWrapper<string>; (value: boolean): LoDashWrapper<boolean>; <T>(value: T[]): LoDashArrayWrapper<T>; <T extends {}>(value: T): LoDashObjectWrapper<T>; (value: any): LoDashWrapper<any>;};
Creates a lodash object that wraps the given value with explicit method chaining enabled.
Parameter value
The value to wrap. The wrapper object.
interface LoDashStatic
interface LoDashStatic {}
method tap
tap: <T>(value: T, interceptor: (value: T) => void) => T;
Invokes interceptor with the value as the first argument and then returns value. The purpose of this method is to "tap into" a method chain in order to perform operations on intermediate results within the chain.
Parameter value
The value to provide to interceptor
Parameter interceptor
The function to invoke. value
interface LoDashStatic
interface LoDashStatic {}
******* Arrays * ********
method compact
compact: <T>(array: List<T>) => T[];
Returns a copy of the array with all falsy values removed. In JavaScript, false, null, 0, "", undefined and NaN are all falsy.
Parameter array
Array to compact. (Array) Returns a new array of filtered values.
interface LoDashStatic
interface LoDashStatic {}
method difference
difference: <T>(array: List<T>, ...others: List<T>[]) => T[];
Creates an array excluding all values of the provided arrays using strict equality for comparisons , i.e. ===.
Parameter array
The array to process
Parameter others
The arrays of values to exclude. Returns a new array of filtered values.
interface LoDashStatic
interface LoDashStatic {}
method findIndex
findIndex: { <T>( array: List<T>, callback: ListIterator<T, boolean>, thisArg?: any ): number; <T>(array: List<T>, pluckValue: string): number; <W, T>(array: List<T>, whereDictionary: W): number;};
This method is like _.find except that it returns the index of the first element that passes the callback check, instead of the element itself.
Parameter array
The array to search.
Parameter callback
The function called per iteration. If a property name or object is provided it will be used to create a ".pluck" or ".where" style callback, respectively.
Parameter thisArg
The this binding of callback. Returns the index of the found element, else -1.
See Also
_.findIndex
interface LoDashStatic
interface LoDashStatic {}
method findLastIndex
findLastIndex: { <T>( array: List<T>, callback: ListIterator<T, boolean>, thisArg?: any ): number; <T>(array: List<T>, pluckValue: string): number; <T>(array: List<T>, whereDictionary: Dictionary<any>): number;};
This method is like _.findIndex except that it iterates over elements of a collection from right to left.
Parameter array
The array to search.
Parameter callback
The function called per iteration. If a property name or object is provided it will be used to create a ".pluck" or ".where" style callback, respectively.
Parameter thisArg
The this binding of callback. Returns the index of the found element, else -1.
See Also
_.findLastIndex
interface LoDashStatic
interface LoDashStatic {}
method first
first: { <T>(array: List<T>): T; <T>(array: List<T>, n: number): T[]; <T>(array: List<T>, callback: ListIterator<T, boolean>, thisArg?: any): T[]; <T>(array: List<T>, pluckValue: string): T[]; <W, T>(array: List<T>, whereValue: W): T[];};
Gets the first element or first n elements of an array. If a callback is provided elements at the beginning of the array are returned as long as the callback returns truey. The callback is bound to thisArg and invoked with three arguments; (value, index, array).
If a property name is provided for callback the created "_.pluck" style callback will return the property value of the given element.
If an object is provided for callback the created "_.where" style callback will return ] true for elements that have the properties of the given object, else false.
Parameter array
Retrieves the first element of this array. Returns the first element of
array
.Parameter n
The number of elements to return.
See Also
_.first
Parameter callback
The function called per element.
Parameter thisArg
The this binding of callback.
See Also
_.first
Parameter pluckValue
"_.pluck" style callback value
See Also
_.first
Parameter whereValue
"_.where" style callback value
See Also
_.first
method head
head: { <T>(array: List<T>): T; <T>(array: List<T>, n: number): T[]; <T>(array: List<T>, callback: ListIterator<T, boolean>, thisArg?: any): T[]; <T>(array: List<T>, pluckValue: string): T[]; <W, T>(array: List<T>, whereValue: W): T[];};
See Also
_.first
method take
take: { <T>(array: List<T>): T; <T>(array: List<T>, n: number): T[]; <T>(array: List<T>, callback: ListIterator<T, boolean>, thisArg?: any): T[]; <T>(array: List<T>, pluckValue: string): T[]; <W, T>(array: List<T>, whereValue: W): T[];};
See Also
_.first
interface LoDashStatic
interface LoDashStatic {}
method flatten
flatten: { <T>(array: List<any>, isShallow?: boolean): T[]; <T>( array: List<any>, isShallow: boolean, callback: ListIterator<any, T>, thisArg?: any ): T[]; <T>(array: List<any>, callback: ListIterator<any, T>, thisArg?: any): T[]; <W, T>(array: List<any>, isShallow: boolean, whereValue: W): T[]; <W, T>(array: List<any>, whereValue: W): T[]; <T>(array: List<any>, isShallow: boolean, pluckValue: string): T[]; <T>(array: List<any>, pluckValue: string): T[];};
Flattens a nested array (the nesting can be to any depth). If isShallow is truey, the array will only be flattened a single level. If a callback is provided each element of the array is passed through the callback before flattening. The callback is bound to thisArg and invoked with three arguments; (value, index, array).
If a property name is provided for callback the created "_.pluck" style callback will return the property value of the given element.
If an object is provided for callback the created "_.where" style callback will return true for elements that have the properties of the given object, else false.
Parameter array
The array to flatten.
Parameter shallow
If true then only flatten one level, optional, default = false.
array
flattened.
interface LoDashStatic
interface LoDashStatic {}
method indexOf
indexOf: { <T>(array: List<T>, value: T): number; <T>(array: List<T>, value: T, fromIndex: number): number; <T>(array: List<T>, value: T, isSorted: boolean): number;};
Gets the index at which the first occurrence of value is found using strict equality for comparisons, i.e. ===. If the array is already sorted providing true for fromIndex will run a faster binary search.
Parameter array
The array to search.
Parameter value
The value to search for.
Parameter fromIndex
The index to search from. The index of
value
withinarray
.Parameter fromIndex
The index to search from
See Also
_.indexOf
Parameter isSorted
True to perform a binary search on a sorted array.
See Also
_.indexOf
interface LoDashStatic
interface LoDashStatic {}
method initial
initial: { <T>(array: List<T>): T[]; <T>(array: List<T>, n: number): T[]; <T>(array: List<T>, callback: ListIterator<T, boolean>): T[]; <T>(array: List<T>, pluckValue: string): T[]; <W, T>(array: List<T>, whereValue: W): T[];};
Gets all but the last element or last n elements of an array. If a callback is provided elements at the end of the array are excluded from the result as long as the callback returns truey. The callback is bound to thisArg and invoked with three arguments; (value, index, array).
If a property name is provided for callback the created "_.pluck" style callback will return the property value of the given element.
If an object is provided for callback the created "_.where" style callback will return true for elements that have the properties of the given object, else false.
Parameter array
The array to query.
Parameter n
Leaves this many elements behind, optional. Returns everything but the last
n
elements ofarray
.Parameter n
The number of elements to exclude.
See Also
_.initial
Parameter callback
The function called per element
See Also
_.initial
Parameter pluckValue
_.pluck style callback
See Also
_.initial
Parameter whereValue
_.where style callback
See Also
_.initial
interface LoDashStatic
interface LoDashStatic {}
method intersection
intersection: <T>(...arrays: List<T>[]) => T[];
Creates an array of unique values present in all provided arrays using strict equality for comparisons, i.e. ===.
Parameter arrays
The arrays to inspect. Returns an array of composite values.
interface LoDashStatic
interface LoDashStatic {}
method last
last: { <T>(array: List<T>): T; <T>(array: List<T>, n: number): T[]; <T>(array: List<T>, callback: ListIterator<T, boolean>, thisArg?: any): T[]; <T>(array: List<T>, pluckValue: string): T[]; <W, T>(array: List<T>, whereValue: W): T[];};
Gets the last element or last n elements of an array. If a callback is provided elements at the end of the array are returned as long as the callback returns truey. The callback is bound to thisArg and invoked with three arguments; (value, index, array).
If a property name is provided for callback the created "_.pluck" style callback will return the property value of the given element.
If an object is provided for callback the created "_.where" style callback will return true for elements that have the properties of the given object, else false.
Parameter array
The array to query. Returns the last element(s) of array.
Parameter n
The number of elements to return
See Also
_.last
Parameter callback
The function called per element
See Also
_.last
Parameter pluckValue
_.pluck style callback
See Also
_.last
Parameter whereValue
_.where style callback
See Also
_.last
interface LoDashStatic
interface LoDashStatic {}
method lastIndexOf
lastIndexOf: <T>(array: List<T>, value: T, fromIndex?: number) => number;
Gets the index at which the last occurrence of value is found using strict equality for comparisons, i.e. ===. If fromIndex is negative, it is used as the offset from the end of the collection.
Parameter array
The array to search.
Parameter value
The value to search for.
Parameter fromIndex
The index to search from. The index of the matched value or -1.
interface LoDashStatic
interface LoDashStatic {}
method pull
pull: (array: List<any>, ...values: any[]) => any[];
Removes all provided values from the given array using strict equality for comparisons, i.e. ===.
Parameter array
The array to modify.
Parameter values
The values to remove. array.
interface LoDashStatic
interface LoDashStatic {}
method range
range: { (start: number, stop: number, step?: number): number[]; (stop: number): number[];};
Creates an array of numbers (positive and/or negative) progressing from start up to but not including end. If start is less than stop a zero-length range is created unless a negative step is specified.
Parameter start
The start of the range.
Parameter end
The end of the range.
Parameter step
The value to increment or decrement by. Returns a new range array.
Parameter end
The end of the range. Returns a new range array. If start is not specified the implementation will never pull the step (step = arguments[2] || 0)
See Also
_.range
interface LoDashStatic
interface LoDashStatic {}
method remove
remove: { ( array: List<any>, callback?: ListIterator<any, boolean>, thisArg?: any ): any[]; (array: List<any>, pluckValue?: string): any[]; (array: List<any>, wherealue?: Dictionary<any>): any[];};
Removes all elements from an array that the callback returns truey for and returns an array of removed elements. The callback is bound to thisArg and invoked with three arguments; (value, index, array).
If a property name is provided for callback the created "_.pluck" style callback will return the property value of the given element.
If an object is provided for callback the created "_.where" style callback will return true for elements that have the properties of the given object, else false.
Parameter array
The array to modify.
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback. A new array of removed elements.
Parameter pluckValue
_.pluck style callback
See Also
_.remove
Parameter whereValue
_.where style callback
See Also
_.remove
interface LoDashStatic
interface LoDashStatic {}
method drop
drop: { <T>(array: List<T>): T[]; <T>(array: List<T>, callback: ListIterator<T, boolean>, thisArg?: any): T[]; <T>(array: List<T>, n: number): T[]; <T>(array: List<T>, pluckValue: string): T[]; <W, T>(array: List<T>, whereValue: W): T[];};
See Also
_.rest
method rest
rest: { <T>(array: List<T>): T[]; <T>(array: List<T>, callback: ListIterator<T, boolean>, thisArg?: any): T[]; <T>(array: List<T>, n: number): T[]; <T>(array: List<T>, pluckValue: string): T[]; <W, T>(array: List<T>, whereValue: W): T[];};
The opposite of _.initial this method gets all but the first element or first n elements of an array. If a callback function is provided elements at the beginning of the array are excluded from the result as long as the callback returns truey. The callback is bound to thisArg and invoked with three arguments; (value, index, array).
If a property name is provided for callback the created "_.pluck" style callback will return the property value of the given element.
If an object is provided for callback the created "_.where" style callback will return true for elements that have the properties of the given object, else false.
Parameter array
The array to query.
Parameter callback
The function called per element or the number of elements to exclude. If a property name or object is provided it will be used to create a ".pluck" or ".where" style callback, respectively.
Parameter thisArg
The this binding of callback. Returns a slice of array.
See Also
_.rest
method tail
tail: { <T>(array: List<T>): T[]; <T>(array: List<T>, callback: ListIterator<T, boolean>, thisArg?: any): T[]; <T>(array: List<T>, n: number): T[]; <T>(array: List<T>, pluckValue: string): T[]; <W, T>(array: List<T>, whereValue: W): T[];};
See Also
_.rest
interface LoDashStatic
interface LoDashStatic {}
method sortedIndex
sortedIndex: { <T, TSort>( array: List<T>, value: T, callback?: (x: T) => TSort, thisArg?: any ): number; <T>(array: List<T>, value: T, pluckValue: string): number; <W, T>(array: List<T>, value: T, whereValue: W): number;};
Uses a binary search to determine the smallest index at which a value should be inserted into a given sorted array in order to maintain the sort order of the array. If a callback is provided it will be executed for value and each element of array to compute their sort ranking. The callback is bound to thisArg and invoked with one argument; (value).
If a property name is provided for callback the created "_.pluck" style callback will return the property value of the given element.
If an object is provided for callback the created "_.where" style callback will return true for elements that have the properties of the given object, else false.
Parameter array
The sorted list.
Parameter value
The value to determine its index within
list
.Parameter callback
Iterator to compute the sort ranking of each value, optional. The index at which value should be inserted into array.
Parameter pluckValue
the _.pluck style callback
See Also
_.sortedIndex
Parameter pluckValue
the _.where style callback
See Also
_.sortedIndex
interface LoDashStatic
interface LoDashStatic {}
method union
union: <T>(...arrays: List<T>[]) => T[];
Creates an array of unique values, in order, of the provided arrays using strict equality for comparisons, i.e. ===.
Parameter arrays
The arrays to inspect. Returns an array of composite values.
interface LoDashStatic
interface LoDashStatic {}
method uniq
uniq: { <T, TSort>(array: List<T>, isSorted?: boolean): T[]; <T, TSort>( array: List<T>, isSorted: boolean, callback: ListIterator<T, TSort>, thisArg?: any ): T[]; <T, TSort>( array: List<T>, callback: ListIterator<T, TSort>, thisArg?: any ): T[]; <T>(array: List<T>, isSorted: boolean, pluckValue: string): T[]; <T>(array: List<T>, pluckValue: string): T[]; <W, T>(array: List<T>, isSorted: boolean, whereValue: W): T[]; <W, T>(array: List<T>, whereValue: W): T[];};
Creates a duplicate-value-free version of an array using strict equality for comparisons, i.e. ===. If the array is sorted, providing true for isSorted will use a faster algorithm. If a callback is provided each element of array is passed through the callback before uniqueness is computed. The callback is bound to thisArg and invoked with three arguments; (value, index, array).
If a property name is provided for callback the created "_.pluck" style callback will return the property value of the given element.
If an object is provided for callback the created "_.where" style callback will return true for elements that have the properties of the given object, else false.
Parameter array
Array to remove duplicates from.
Parameter isSorted
True if
array
is already sorted, optiona, default = false.Parameter iterator
Transform the elements of
array
before comparisons for uniqueness.Parameter context
'this' object in
iterator
, optional. Copy ofarray
where all elements are unique.See Also
_.uniq
Parameter pluckValue
_.pluck style callback
See Also
_.uniq
Parameter whereValue
_.where style callback
See Also
_.uniq
method unique
unique: { <T>(array: List<T>, isSorted?: boolean): T[]; <T, TSort>( array: List<T>, callback: ListIterator<T, TSort>, thisArg?: any ): T[]; <T, TSort>( array: List<T>, isSorted: boolean, callback: ListIterator<T, TSort>, thisArg?: any ): T[]; <T>(array: List<T>, isSorted: boolean, pluckValue: string): T[]; <T>(array: List<T>, pluckValue: string): T[]; <W, T>(array: List<T>, whereValue?: W): T[]; <W, T>(array: List<T>, isSorted: boolean, whereValue?: W): T[];};
See Also
_.uniq
Parameter pluckValue
_.pluck style callback
See Also
_.uniq
Parameter whereValue
_.where style callback
See Also
_.uniq
interface LoDashStatic
interface LoDashStatic {}
method without
without: <T>(array: List<T>, ...values: T[]) => T[];
Creates an array excluding all provided values using strict equality for comparisons, i.e. ===.
Parameter array
The array to filter.
Parameter values
The value(s) to exclude. A new array of filtered values.
interface LoDashStatic
interface LoDashStatic {}
method unzip
unzip: { (...arrays: any[][]): any[][]; (...arrays: any[]): any[] };
See Also
_.zip
method zip
zip: { (...arrays: any[][]): any[][]; (...arrays: any[]): any[] };
Creates an array of grouped elements, the first of which contains the first elements of the given arrays, the second of which contains the second elements of the given arrays, and so on.
Parameter arrays
Arrays to process. A new array of grouped elements.
See Also
_.zip
interface LoDashStatic
interface LoDashStatic {}
method object
object: <TResult extends {}>(keys: List<string>, values: List<any>) => TResult;
See Also
_.object
method zipObject
zipObject: <TResult extends {}>( keys: List<string>, values: List<any>) => TResult;
Creates an object composed from arrays of keys and values. Provide either a single two dimensional array, i.e. [[key1, value1], [key2, value2]] or two arrays, one of keys and one of corresponding values.
Parameter keys
The array of keys.
Parameter values
The array of values. An object composed of the given keys and corresponding values.
interface LoDashStatic
interface LoDashStatic {}
method at
at: { <T>(collection: Collection<T>, indexes: number[]): T[]; <T>(collection: Collection<T>, ...indexes: number[]): T[];};
Creates an array of elements from the specified indexes, or keys, of the collection. Indexes may be specified as individual arguments or as arrays of indexes.
Parameter collection
The collection to iterate over.
Parameter indexes
The indexes of collection to retrieve, specified as individual indexes or arrays of indexes. A new array of elements corresponding to the provided indexes.
See Also
_.at
interface LoDashStatic
interface LoDashStatic {}
method contains
contains: { <T>(collection: Collection<T>, target: T, fromIndex?: number): boolean; <T>(dictionary: Dictionary<T>, key: string, fromIndex?: number): boolean; (searchString: string, targetString: string, fromIndex?: number): boolean;};
Checks if a given value is present in a collection using strict equality for comparisons, i.e. ===. If fromIndex is negative, it is used as the offset from the end of the collection.
Parameter collection
The collection to iterate over.
Parameter target
The value to check for.
Parameter fromIndex
The index to search from. True if the target element is found, else false.
Parameter dictionary
The dictionary to iterate over.
Parameter key
The key in the dictionary to search for.
See Also
_.contains
Parameter searchString
the string to search
Parameter targetString
the string to search for
See Also
_.contains
method include
include: { <T>(collection: Collection<T>, target: T, fromIndex?: number): boolean; <T>(dictionary: Dictionary<T>, key: string, fromIndex?: number): boolean; (searchString: string, targetString: string, fromIndex?: number): boolean;};
See Also
_.contains
interface LoDashStatic
interface LoDashStatic {}
method countBy
countBy: { <T>( collection: Collection<T>, callback?: ListIterator<T, any>, thisArg?: any ): Dictionary<number>; <T>( collection: Collection<T>, callback: string, thisArg?: any ): Dictionary<number>;};
Creates an object composed of keys generated from the results of running each element of collection through the callback. The corresponding value of each key is the number of times the key was returned by the callback. The callback is bound to thisArg and invoked with three arguments; (value, index|key, collection).
If a property name is provided for callback the created "_.pluck" style callback will return the property value of the given element.
If an object is provided for callback the created "_.where" style callback will return true for elements that have the properties of the given object, else false.
Parameter collection
The collection to iterate over.
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback. Returns the composed aggregate object.
Parameter callback
Function name
See Also
_.countBy
interface LoDashStatic
interface LoDashStatic {}
method all
all: { <T>( collection: Collection<T>, callback?: ListIterator<T, boolean>, thisArg?: any ): boolean; <T>(collection: Collection<T>, pluckValue: string): boolean; <W, T>(collection: Collection<T>, whereValue: W): boolean;};
See Also
_.every
Parameter pluckValue
_.pluck style callback
See Also
_.every
Parameter whereValue
_.where style callback
See Also
_.every
method every
every: { <T>( collection: Collection<T>, callback?: ListIterator<T, boolean>, thisArg?: any ): boolean; <T>(collection: Collection<T>, pluckValue: string): boolean; <W, T>(collection: Collection<T>, whereValue: W): boolean;};
Checks if the given callback returns truey value for all elements of a collection. The callback is bound to thisArg and invoked with three arguments; (value, index|key, collection).
If a property name is provided for callback the created "_.pluck" style callback will return the property value of the given element.
If an object is provided for callback the created "_.where" style callback will return true for elements that have the properties of the given object, else false.
Parameter collection
The collection to iterate over.
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback. True if all elements passed the callback check, else false.
Parameter pluckValue
_.pluck style callback
See Also
_.every
Parameter whereValue
_.where style callback
See Also
_.every
interface LoDashStatic
interface LoDashStatic {}
method filter
filter: { <T>( collection: Collection<T>, callback: ListIterator<T, boolean>, thisArg?: any ): T[]; <T>(collection: Collection<T>, pluckValue: string): T[]; <W, T>(collection: Collection<T>, whereValue: W): T[];};
Iterates over elements of a collection, returning an array of all elements the callback returns truey for. The callback is bound to thisArg and invoked with three arguments; (value, index|key, collection).
If a property name is provided for callback the created "_.pluck" style callback will return the property value of the given element.
If an object is provided for callback the created "_.where" style callback will return true for elements that have the properties of the given object, else false.
Parameter collection
The collection to iterate over.
Parameter callback
The function called per iteration.
Parameter context
The this binding of callback. Returns a new array of elements that passed the callback check.
Parameter pluckValue
_.pluck style callback
See Also
_.filter
method select
select: { <T>( collection: Collection<T>, callback: ListIterator<T, boolean>, thisArg?: any ): T[]; <T>(collection: Collection<T>, pluckValue: string): T[]; <W, T>(collection: Collection<T>, whereValue: W): T[];};
See Also
_.filter
Parameter pluckValue
_.pluck style callback
See Also
_.filter
interface LoDashStatic
interface LoDashStatic {}
method detect
detect: { <T>( collection: Collection<T>, callback: ListIterator<T, boolean>, thisArg?: any ): T; <W, T>(collection: Collection<T>, whereValue: W): T; <T>(collection: Collection<T>, pluckValue: string): T;};
See Also
_.find
Parameter
_.pluck style callback
See Also
_.find
Parameter
_.where style callback
See Also
_.find
method find
find: { <T>( collection: Collection<T>, callback: ListIterator<T, boolean>, thisArg?: any ): T; <W, T>(collection: Collection<T>, whereValue: W): T; <T>(collection: Collection<T>, pluckValue: string): T;};
Iterates over elements of a collection, returning the first element that the callback returns truey for. The callback is bound to thisArg and invoked with three arguments; (value, index|key, collection).
If a property name is provided for callback the created "_.pluck" style callback will return the property value of the given element.
If an object is provided for callback the created "_.where" style callback will return true for elements that have the properties of the given object, else false.
Parameter collection
Searches for a value in this list.
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback. The found element, else undefined.
Parameter
_.pluck style callback
See Also
_.find
Parameter
_.where style callback
See Also
_.find
method findWhere
findWhere: { <T>( collection: Collection<T>, callback: ListIterator<T, boolean>, thisArg?: any ): T; <W, T>(collection: Collection<T>, whereValue: W): T; <T>(collection: Collection<T>, pluckValue: string): T;};
See Also
_.find
Parameter
_.pluck style callback
See Also
_.find
Parameter
_.where style callback
See Also
_.find
interface LoDashStatic
interface LoDashStatic {}
method findLast
findLast: { <T>( collection: Collection<T>, callback: ListIterator<T, boolean>, thisArg?: any ): T; <W, T>(collection: Collection<T>, whereValue: W): T; <T>(collection: Collection<T>, pluckValue: string): T;};
This method is like _.find except that it iterates over elements of a collection from right to left.
Parameter collection
Searches for a value in this list.
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback. The found element, else undefined.
Parameter
_.pluck style callback
See Also
_.find
Parameter
_.where style callback
See Also
_.find
interface LoDashStatic
interface LoDashStatic {}
method each
each: { <T>( collection: List<T>, callback: ListIterator<T, void>, thisArg?: any ): List<T>; <T extends {}>( object: Dictionary<T>, callback: ObjectIterator<T, void>, thisArg?: any ): Dictionary<T>;};
See Also
_.forEach
Parameter object
The object to iterate over
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback.
See Also
_.forEach
method forEach
forEach: { <T>( collection: List<T>, callback: ListIterator<T, void>, thisArg?: any ): List<T>; <T extends {}>( object: Dictionary<T>, callback: ObjectIterator<T, void>, thisArg?: any ): Dictionary<T>;};
Iterates over elements of a collection, executing the callback for each element. The callback is bound to thisArg and invoked with three arguments; (value, index|key, collection). Callbacks may exit iteration early by explicitly returning false.
Parameter collection
The collection to iterate over.
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback.
See Also
_.forEach
interface LoDashStatic
interface LoDashStatic {}
method eachRight
eachRight: { <T>( collection: List<T>, callback: ListIterator<T, void>, thisArg?: any ): List<T>; <T extends {}>( object: Dictionary<T>, callback: ObjectIterator<T, void>, thisArg?: any ): Dictionary<T>;};
See Also
_.forEachRight
Parameter object
The object to iterate over
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback.
See Also
_.forEachRight
method forEachRight
forEachRight: { <T>( collection: List<T>, callback: ListIterator<T, void>, thisArg?: any ): List<T>; <T extends {}>( object: Dictionary<T>, callback: ObjectIterator<T, void>, thisArg?: any ): Dictionary<T>;};
This method is like _.forEach except that it iterates over elements of a collection from right to left.
Parameter collection
The collection to iterate over.
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback.
See Also
_.forEachRight
interface LoDashStatic
interface LoDashStatic {}
method groupBy
groupBy: { <T>( collection: List<T>, callback?: ListIterator<T, any>, thisArg?: any ): Dictionary<T[]>; <T>(collection: List<T>, pluckValue: string): Dictionary<T[]>; <W, T>(collection: List<T>, whereValue: W): Dictionary<T[]>;};
Creates an object composed of keys generated from the results of running each element of a collection through the callback. The corresponding value of each key is an array of the elements responsible for generating the key. The callback is bound to thisArg and invoked with three arguments; (value, index|key, collection).
If a property name is provided for callback the created "_.pluck" style callback will return the property value of the given element. If an object is provided for callback the created "_.where" style callback will return true for elements that have the properties of the given object, else false
Parameter collection
The collection to iterate over.
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback. Returns the composed aggregate object.
Parameter pluckValue
_.pluck style callback
See Also
_.groupBy
Parameter whereValue
_.where style callback
See Also
_.groupBy
interface LoDashStatic
interface LoDashStatic {}
method indexBy
indexBy: { <T>( list: List<T>, iterator: ListIterator<T, any>, context?: any ): Dictionary<T>; <T>(collection: List<T>, pluckValue: string): Dictionary<T>; <W, T>(collection: List<T>, whereValue: W): Dictionary<T>;};
Creates an object composed of keys generated from the results of running each element of the collection through the given callback. The corresponding value of each key is the last element responsible for generating the key. The callback is bound to thisArg and invoked with three arguments; (value, index|key, collection).
If a property name is provided for callback the created "_.pluck" style callback will return the property value of the given element.
If an object is provided for callback the created "_.where" style callback will return true for elements that have the properties of the given object, else false.
Parameter collection
The collection to iterate over.
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback. Returns the composed aggregate object.
Parameter pluckValue
_.pluck style callback
See Also
_.indexBy
Parameter whereValue
_.where style callback
See Also
_.indexBy
interface LoDashStatic
interface LoDashStatic {}
method invoke
invoke: { <T extends {}>( collection: Collection<T>, methodName: string, ...args: any[] ): any; <T extends {}>( collection: Collection<T>, method: Function, ...args: any[] ): any;};
Invokes the method named by methodName on each element in the collection returning an array of the results of each invoked method. Additional arguments will be provided to each invoked method. If methodName is a function it will be invoked for, and this bound to, each element in the collection.
Parameter collection
The collection to iterate over.
Parameter methodName
The name of the method to invoke.
Parameter args
Arguments to invoke the method with.
See Also
_.invoke
interface LoDashStatic
interface LoDashStatic {}
method collect
collect: { <T, TResult>( collection: List<T>, callback: ListIterator<T, TResult>, thisArg?: any ): TResult[]; <T extends {}, TResult>( object: Dictionary<T>, callback: ObjectIterator<T, TResult>, thisArg?: any ): TResult[]; <T, TResult>(collection: List<T>, pluckValue: string): TResult[];};
See Also
_.map
method map
map: { <T, TResult>( collection: List<T>, callback: ListIterator<T, TResult>, thisArg?: any ): TResult[]; <T extends {}, TResult>( object: Dictionary<T>, callback: ObjectIterator<T, TResult>, thisArg?: any ): TResult[]; <T, TResult>(collection: List<T>, pluckValue: string): TResult[];};
Creates an array of values by running each element in the collection through the callback. The callback is bound to thisArg and invoked with three arguments; (value, index|key, collection).
If a property name is provided for callback the created "_.pluck" style callback will return the property value of the given element.
If an object is provided for callback the created "_.where" style callback will return true for elements that have the properties of the given object, else false.
Parameter collection
The collection to iterate over.
Parameter callback
The function called per iteration.
Parameter theArg
The this binding of callback. The mapped array result.
Parameter object
The object to iterate over.
Parameter callback
The function called per iteration.
Parameter thisArg
this
object initerator
, optional. The mapped object result.See Also
_.map
Parameter pluckValue
_.pluck style callback
See Also
_.map
interface LoDashStatic
interface LoDashStatic {}
method max
max: { <T>( collection: Collection<T>, callback?: ListIterator<T, any>, thisArg?: any ): T; <T>(collection: Collection<T>, pluckValue: string): T; <W, T>(collection: Collection<T>, whereValue: W): T;};
Retrieves the maximum value of a collection. If the collection is empty or falsey -Infinity is returned. If a callback is provided it will be executed for each value in the collection to generate the criterion by which the value is ranked. The callback is bound to thisArg and invoked with three arguments; (value, index, collection).
If a property name is provided for callback the created "_.pluck" style callback will return the property value of the given element.
If an object is provided for callback the created "_.where" style callback will return true for elements that have the properties of the given object, else false.
Parameter collection
The collection to iterate over.
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback. Returns the maximum value.
Parameter pluckValue
_.pluck style callback
See Also
_.max
Parameter whereValue
_.where style callback
See Also
_.max
interface LoDashStatic
interface LoDashStatic {}
method min
min: { <T>( collection: Collection<T>, callback?: ListIterator<T, any>, thisArg?: any ): T; <T>(collection: Collection<T>, pluckValue: string): T; <W, T>(collection: Collection<T>, whereValue: W): T;};
Retrieves the minimum value of a collection. If the collection is empty or falsey Infinity is returned. If a callback is provided it will be executed for each value in the collection to generate the criterion by which the value is ranked. The callback is bound to thisArg and invoked with three arguments; (value, index, collection).
If a property name is provided for callback the created "_.pluck" style callback will return the property value of the given element.
If an object is provided for callback the created "_.where" style callback will return true for elements that have the properties of the given object, else false.
Parameter collection
The collection to iterate over.
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback. Returns the maximum value.
Parameter pluckValue
_.pluck style callback
See Also
_.min
Parameter whereValue
_.where style callback
See Also
_.min
interface LoDashStatic
interface LoDashStatic {}
method pluck
pluck: <T extends {}>(collection: Collection<T>, property: string) => any[];
Retrieves the value of a specified property from all elements in the collection.
Parameter collection
The collection to iterate over.
Parameter property
The property to pluck. A new array of property values.
interface LoDashStatic
interface LoDashStatic {}
method foldl
foldl: { <T, TResult>( collection: Collection<T>, callback: MemoIterator<T, TResult>, accumulator: TResult, thisArg?: any ): TResult; <T, TResult>( collection: Collection<T>, callback: MemoIterator<T, TResult>, thisArg?: any ): TResult;};
See Also
_.reduce
method inject
inject: { <T, TResult>( collection: Collection<T>, callback: MemoIterator<T, TResult>, accumulator: TResult, thisArg?: any ): TResult; <T, TResult>( collection: Collection<T>, callback: MemoIterator<T, TResult>, thisArg?: any ): TResult;};
See Also
_.reduce
method reduce
reduce: { <T, TResult>( collection: Collection<T>, callback: MemoIterator<T, TResult>, accumulator: TResult, thisArg?: any ): TResult; <T, TResult>( collection: Collection<T>, callback: MemoIterator<T, TResult>, thisArg?: any ): TResult;};
Reduces a collection to a value which is the accumulated result of running each element in the collection through the callback, where each successive callback execution consumes the return value of the previous execution. If accumulator is not provided the first element of the collection will be used as the initial accumulator value. The callback is bound to thisArg and invoked with four arguments; (accumulator, value, index|key, collection).
Parameter collection
The collection to iterate over.
Parameter callback
The function called per iteration.
Parameter accumulator
Initial value of the accumulator.
Parameter thisArg
The this binding of callback. Returns the accumulated value.
See Also
_.reduce
interface LoDashStatic
interface LoDashStatic {}
method foldr
foldr: { <T, TResult>( collection: Collection<T>, callback: MemoIterator<T, TResult>, accumulator: TResult, thisArg?: any ): TResult; <T, TResult>( collection: Collection<T>, callback: MemoIterator<T, TResult>, thisArg?: any ): TResult;};
See Also
_.reduceRight
method reduceRight
reduceRight: { <T, TResult>( collection: Collection<T>, callback: MemoIterator<T, TResult>, accumulator: TResult, thisArg?: any ): TResult; <T, TResult>( collection: Collection<T>, callback: MemoIterator<T, TResult>, thisArg?: any ): TResult;};
This method is like _.reduce except that it iterates over elements of a collection from right to left.
Parameter collection
The collection to iterate over.
Parameter callback
The function called per iteration.
Parameter accumulator
Initial value of the accumulator.
Parameter thisArg
The this binding of callback. The accumulated value.
See Also
_.reduceRight
interface LoDashStatic
interface LoDashStatic {}
method reject
reject: { <T>( collection: Collection<T>, callback: ListIterator<T, boolean>, thisArg?: any ): T[]; <T>(collection: Collection<T>, pluckValue: string): T[]; <W, T>(collection: Collection<T>, whereValue: W): T[];};
The opposite of _.filter this method returns the elements of a collection that the callback does not return truey for.
If a property name is provided for callback the created "_.pluck" style callback will return the property value of the given element.
If an object is provided for callback the created "_.where" style callback will return true for elements that have the properties of the given object, else false.
Parameter collection
The collection to iterate over.
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback. A new array of elements that failed the callback check.
Parameter pluckValue
_.pluck style callback
See Also
_.reject
Parameter whereValue
_.where style callback
See Also
_.reject
interface LoDashStatic
interface LoDashStatic {}
method sample
sample: { <T>(collection: Collection<T>): T; <T>(collection: Collection<T>, n: number): T[];};
Retrieves a random element or n random elements from a collection.
Parameter collection
The collection to sample. Returns the random sample(s) of collection.
Parameter n
The number of elements to sample.
See Also
_.sample
interface LoDashStatic
interface LoDashStatic {}
method shuffle
shuffle: <T>(collection: Collection<T>) => T[];
Creates an array of shuffled values, using a version of the Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle.
Parameter collection
The collection to shuffle. Returns a new shuffled collection.
interface LoDashStatic
interface LoDashStatic {}
method size
size: { <T>(collection: List<T>): number; <T extends {}>(object: T): number; (aString: string): number;};
Gets the size of the collection by returning collection.length for arrays and array-like objects or the number of own enumerable properties for objects.
Parameter collection
The collection to inspect. collection.length
Parameter object
The object to inspect The number of own enumerable properties.
See Also
_.size
Parameter aString
The string to inspect The length of aString
See Also
_.size
interface LoDashStatic
interface LoDashStatic {}
method any
any: { <T>( collection: Collection<T>, callback?: ListIterator<T, boolean>, thisArg?: any ): boolean; <T>(collection: Collection<T>, pluckValue: string): boolean; <W, T>(collection: Collection<T>, whereValue: W): boolean;};
See Also
_.some
Parameter pluckValue
_.pluck style callback
See Also
_.some
Parameter whereValue
_.where style callback
See Also
_.some
method some
some: { <T>( collection: Collection<T>, callback?: ListIterator<T, boolean>, thisArg?: any ): boolean; <T>(collection: Collection<T>, pluckValue: string): boolean; <W, T>(collection: Collection<T>, whereValue: W): boolean;};
Checks if the callback returns a truey value for any element of a collection. The function returns as soon as it finds a passing value and does not iterate over the entire collection. The callback is bound to thisArg and invoked with three arguments; (value, index|key, collection).
If a property name is provided for callback the created "_.pluck" style callback will return the property value of the given element.
If an object is provided for callback the created "_.where" style callback will return true for elements that have the properties of the given object, else false.
Parameter collection
The collection to iterate over.
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback. True if any element passed the callback check, else false.
Parameter pluckValue
_.pluck style callback
See Also
_.some
Parameter whereValue
_.where style callback
See Also
_.some
interface LoDashStatic
interface LoDashStatic {}
method sortBy
sortBy: { <T, TSort>( collection: List<T>, callback?: ListIterator<T, TSort>, thisArg?: any ): T[]; <T>(collection: List<T>, pluckValue: string): T[]; <W, T>(collection: List<T>, whereValue: W): T[];};
Creates an array of elements, sorted in ascending order by the results of running each element in a collection through the callback. This method performs a stable sort, that is, it will preserve the original sort order of equal elements. The callback is bound to thisArg and invoked with three arguments; (value, index|key, collection).
If a property name is provided for callback the created "_.pluck" style callback will return the property value of the given element.
If an object is provided for callback the created "_.where" style callback will return true for elements that have the properties of the given object, else false.
Parameter collection
The collection to iterate over.
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback. A new array of sorted elements.
Parameter pluckValue
_.pluck style callback
See Also
_.sortBy
Parameter whereValue
_.where style callback
See Also
_.sortBy
interface LoDashStatic
interface LoDashStatic {}
method toArray
toArray: <T>(collection: Collection<T>) => T[];
Converts the collection to an array.
Parameter collection
The collection to convert. The new converted array.
interface LoDashStatic
interface LoDashStatic {}
method where
where: <T, U extends {}>(list: Collection<T>, properties: U) => T[];
Performs a deep comparison of each element in a collection to the given properties object, returning an array of all elements that have equivalent property values.
Parameter collection
The collection to iterate over.
Parameter properties
The object of property values to filter by. A new array of elements that have the given properties.
interface LoDashStatic
interface LoDashStatic {}
*********** Functions * ***********
method after
after: (n: number, func: Function) => Function;
Creates a function that executes func, with the this binding and arguments of the created function, only after being called n times.
Parameter n
The number of times the function must be called before func is executed.
Parameter func
The function to restrict. The new restricted function.
interface LoDashStatic
interface LoDashStatic {}
method bind
bind: (func: Function, thisArg: any, ...args: any[]) => () => any;
Creates a function that, when called, invokes func with the this binding of thisArg and prepends any additional bind arguments to those provided to the bound function.
Parameter func
The function to bind.
Parameter thisArg
The this binding of func.
Parameter args
Arguments to be partially applied. The new bound function.
interface LoDashStatic
interface LoDashStatic {}
method bindAll
bindAll: <T>(object: T, ...methodNames: string[]) => T;
Binds methods of an object to the object itself, overwriting the existing method. Method names may be specified as individual arguments or as arrays of method names. If no method names are provided all the function properties of object will be bound.
Parameter object
The object to bind and assign the bound methods to.
Parameter methodNames
The object method names to bind, specified as individual method names or arrays of method names. object
interface LoDashStatic
interface LoDashStatic {}
method bindKey
bindKey: <T>(object: T, key: string, ...args: any[]) => Function;
Creates a function that, when called, invokes the method at object[key] and prepends any additional bindKey arguments to those provided to the bound function. This method differs from _.bind by allowing bound functions to reference methods that will be redefined or don't yet exist. See http://michaux.ca/articles/lazy-function-definition-pattern.
Parameter object
The object the method belongs to.
Parameter key
The key of the method.
Parameter args
Arguments to be partially applied. The new bound function.
interface LoDashStatic
interface LoDashStatic {}
method compose
compose: (...funcs: Function[]) => Function;
Creates a function that is the composition of the provided functions, where each function consumes the return value of the function that follows. For example, composing the functions f(), g(), and h() produces f(g(h())). Each function is executed with the this binding of the composed function.
Parameter funcs
Functions to compose. The new composed function.
interface LoDashStatic
interface LoDashStatic {}
method createCallback
createCallback: { (func: string, thisArg?: any, argCount?: number): () => any; (func: Dictionary<any>, thisArg?: any, argCount?: number): () => boolean;};
Produces a callback bound to an optional thisArg. If func is a property name the created callback will return the property value for a given element. If func is an object the created callback will return true for elements that contain the equivalent object properties, otherwise it will return false.
Parameter func
The value to convert to a callback.
Parameter thisArg
The this binding of the created callback.
Parameter argCount
The number of arguments the callback accepts. A callback function.
See Also
_.createCallback
interface LoDashStatic
interface LoDashStatic {}
method curry
curry: (func: Function, arity?: number) => Function;
Creates a function which accepts one or more arguments of func that when invoked either executes func returning its result, if all func arguments have been provided, or returns a function that accepts one or more of the remaining func arguments, and so on. The arity of func can be specified if func.length is not sufficient.
Parameter func
The function to curry.
Parameter arity
The arity of func. The new curried function.
interface LoDashStatic
interface LoDashStatic {}
method debounce
debounce: <T extends Function>( func: T, wait: number, options?: DebounceSettings) => T;
Creates a function that will delay the execution of func until after wait milliseconds have elapsed since the last time it was invoked. Provide an options object to indicate that func should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent calls to the debounced function will return the result of the last func call.
Note: If leading and trailing options are true func will be called on the trailing edge of the timeout only if the the debounced function is invoked more than once during the wait timeout.
Parameter func
The function to debounce.
Parameter wait
The number of milliseconds to delay.
Parameter options
The options object.
Parameter
options.leading Specify execution on the leading edge of the timeout.
Parameter
options.maxWait The maximum time func is allowed to be delayed before it’s called.
Parameter
options.trailing Specify execution on the trailing edge of the timeout. The new debounced function.
interface LoDashStatic
interface LoDashStatic {}
method defer
defer: (func: Function, ...args: any[]) => number;
Defers executing the func function until the current call stack has cleared. Additional arguments will be provided to func when it is invoked.
Parameter func
The function to defer.
Parameter args
Arguments to invoke the function with. The timer id.
interface LoDashStatic
interface LoDashStatic {}
method delay
delay: (func: Function, wait: number, ...args: any[]) => number;
Executes the func function after wait milliseconds. Additional arguments will be provided to func when it is invoked.
Parameter func
The function to delay.
Parameter wait
The number of milliseconds to delay execution.
Parameter args
Arguments to invoke the function with. The timer id.
interface LoDashStatic
interface LoDashStatic {}
method memoize
memoize: <T extends Function>(func: T, resolver?: Function) => T;
Creates a function that memoizes the result of func. If resolver is provided it will be used to determine the cache key for storing the result based on the arguments provided to the memoized function. By default, the first argument provided to the memoized function is used as the cache key. The func is executed with the this binding of the memoized function. The result cache is exposed as the cache property on the memoized function.
Parameter func
Computationally expensive function that will now memoized results.
Parameter resolver
Hash function for storing the result of
fn
. Returns the new memoizing function.
interface LoDashStatic
interface LoDashStatic {}
method once
once: <T extends Function>(func: T) => T;
Creates a function that is restricted to execute func once. Repeat calls to the function will return the value of the first call. The func is executed with the this binding of the created function.
Parameter func
Function to only execute once. The new restricted function.
interface LoDashStatic
interface LoDashStatic {}
method partial
partial: (func: Function, ...args: any[]) => Function;
Creates a function that, when called, invokes func with any additional partial arguments prepended to those provided to the new function. This method is similar to _.bind except it does not alter the this binding.
Parameter func
The function to partially apply arguments to.
Parameter args
Arguments to be partially applied. The new partially applied function.
interface LoDashStatic
interface LoDashStatic {}
method partialRight
partialRight: (func: Function, ...args: any[]) => Function;
This method is like _.partial except that partial arguments are appended to those provided to the new function.
Parameter func
The function to partially apply arguments to.
Parameter args
Arguments to be partially applied. The new partially applied function.
interface LoDashStatic
interface LoDashStatic {}
method throttle
throttle: <T extends Function>( func: T, wait: number, options?: ThrottleSettings) => T;
Creates a function that, when executed, will only call the func function at most once per every wait milliseconds. Provide an options object to indicate that func should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent calls to the throttled function will return the result of the last func call.
Note: If leading and trailing options are true func will be called on the trailing edge of the timeout only if the the throttled function is invoked more than once during the wait timeout.
Parameter func
The function to throttle.
Parameter wait
The number of milliseconds to throttle executions to.
Parameter options
The options object.
Parameter
options.leading Specify execution on the leading edge of the timeout.
Parameter
options.trailing Specify execution on the trailing edge of the timeout. The new throttled function.
interface LoDashStatic
interface LoDashStatic {}
method wrap
wrap: (value: any, wrapper: (func: Function, ...args: any[]) => any) => Function;
Creates a function that provides value to the wrapper function as its first argument. Additional arguments provided to the function are appended to those provided to the wrapper function. The wrapper is executed with the this binding of the created function.
Parameter value
The value to wrap.
Parameter wrapper
The wrapper function. The new function.
interface LoDashStatic
interface LoDashStatic {}
*********** Objects * ***********
method assign
assign: { <P, T, S1, Value, Result>( object: T, s1: S1, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): Result; <P, T, S1, S2, Value, Result>( object: T, s1: S1, s2: S2, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): Result; <P, T, S1, S2, S3, Value, Result>( object: T, s1: S1, s2: S2, s3: S3, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): Result; <P, T, S1, S2, S3, S4, Value, Result>( object: T, s1: S1, s2: S2, s3: S3, s4: S4, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): Result;};
Assigns own enumerable properties of source object(s) to the destination object. Subsequent sources will overwrite property assignments of previous sources. If a callback is provided it will be executed to produce the assigned values. The callback is bound to thisArg and invoked with two arguments; (objectValue, sourceValue).
Parameter object
The destination object.
Parameter s1
8 The source object(s)
Parameter callback
The function to customize merging properties.
Parameter thisArg
The this binding of callback. The destination object.
See Also
_.assign
method extend
extend: { <P, T, S1, Value, Result>( object: T, s1: S1, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): Result; <P, T, S1, S2, Value, Result>( object: T, s1: S1, s2: S2, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): Result; <P, T, S1, S2, S3, Value, Result>( object: T, s1: S1, s2: S2, s3: S3, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): Result; <P, T, S1, S2, S3, S4, Value, Result>( object: T, s1: S1, s2: S2, s3: S3, s4: S4, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): Result;};
See Also
_.assign
interface LoDashStatic
interface LoDashStatic {}
method clone
clone: <T>( value: T, deep?: boolean, callback?: (value: any) => any, thisArg?: any) => T;
Creates a clone of value. If deep is true nested objects will also be cloned, otherwise they will be assigned by reference. If a callback is provided it will be executed to produce the cloned values. If the callback returns undefined cloning will be handled by the method instead. The callback is bound to thisArg and invoked with one argument; (value).
Parameter value
The value to clone.
Parameter deep
Specify a deep clone.
Parameter callback
The function to customize cloning values.
Parameter thisArg
The this binding of callback. The cloned value.
interface LoDashStatic
interface LoDashStatic {}
method cloneDeep
cloneDeep: <T>(value: T, callback?: (value: any) => any, thisArg?: any) => T;
Creates a deep clone of value. If a callback is provided it will be executed to produce the cloned values. If the callback returns undefined cloning will be handled by the method instead. The callback is bound to thisArg and invoked with one argument; (value).
Note: This method is loosely based on the structured clone algorithm. Functions and DOM nodes are not cloned. The enumerable properties of arguments objects and objects created by constructors other than Object are cloned to plain Object objects. See http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm.
Parameter value
The value to clone.
Parameter callback
The function to customize cloning values.
Parameter thisArg
The this binding of callback. The cloned value.
interface LoDashStatic
interface LoDashStatic {}
method defaults
defaults: <T, TResult>(object: T, ...sources: any[]) => TResult;
Assigns own enumerable properties of source object(s) to the destination object for all destination properties that resolve to undefined. Once a property is set, additional defaults of the same property will be ignored.
Parameter object
The destination object.
Parameter sources
The source objects. The destination object.
interface LoDashStatic
interface LoDashStatic {}
method findKey
findKey: { (object: any, callback: (value: any) => boolean, thisArg?: any): string; (object: any, pluckValue: string): string; <W extends Dictionary<any>, T>(object: T, whereValue: W): string;};
This method is like _.findIndex except that it returns the key of the first element that passes the callback check, instead of the element itself.
Parameter object
The object to search.
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback. The key of the found element, else undefined.
Parameter pluckValue
_.pluck style callback
See Also
_.findKey
Parameter whereValue
_.where style callback
See Also
_.findKey
interface LoDashStatic
interface LoDashStatic {}
method findLastKey
findLastKey: { (object: any, callback: (value: any) => boolean, thisArg?: any): string; (object: any, pluckValue: string): string; <W extends Dictionary<any>, T>(object: T, whereValue: W): string;};
This method is like _.findKey except that it iterates over elements of a collection in the opposite order.
Parameter object
The object to search.
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback. The key of the found element, else undefined.
Parameter pluckValue
_.pluck style callback
See Also
_.findLastKey
Parameter whereValue
_.where style callback
See Also
_.findLastKey
interface LoDashStatic
interface LoDashStatic {}
method forIn
forIn: <T>( object: Dictionary<T>, callback?: ObjectIterator<T, void>, thisArg?: any) => Dictionary<T>;
Iterates over own and inherited enumerable properties of an object, executing the callback for each property. The callback is bound to thisArg and invoked with three arguments; (value, key, object). Callbacks may exit iteration early by explicitly returning false.
Parameter object
The object to iterate over.
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback. object
interface LoDashStatic
interface LoDashStatic {}
method forInRight
forInRight: <T extends {}>( object: Dictionary<T>, callback?: ObjectIterator<T, void>, thisArg?: any) => Dictionary<T>;
This method is like _.forIn except that it iterates over elements of a collection in the opposite order.
Parameter object
The object to iterate over.
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback. object
interface LoDashStatic
interface LoDashStatic {}
method forOwn
forOwn: <T extends {}>( object: Dictionary<T>, callback?: ObjectIterator<T, void>, thisArg?: any) => Dictionary<T>;
Iterates over own enumerable properties of an object, executing the callback for each property. The callback is bound to thisArg and invoked with three arguments; (value, key, object). Callbacks may exit iteration early by explicitly returning false.
Parameter object
The object to iterate over.
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback. object
interface LoDashStatic
interface LoDashStatic {}
method forOwnRight
forOwnRight: <T extends {}>( object: Dictionary<T>, callback?: ObjectIterator<T, void>, thisArg?: any) => Dictionary<T>;
This method is like _.forOwn except that it iterates over elements of a collection in the opposite order.
Parameter object
The object to iterate over.
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback. object
interface LoDashStatic
interface LoDashStatic {}
method functions
functions: (object: any) => string[];
Creates a sorted array of property names of all enumerable properties, own and inherited, of object that have function values.
Parameter object
The object to inspect. An array of property names that have function values.
method methods
methods: (object: any) => string[];
See Also
_functions
interface LoDashStatic
interface LoDashStatic {}
method has
has: (object: any, property: string) => boolean;
Checks if the specified object property exists and is a direct property, instead of an inherited property.
Parameter object
The object to check.
Parameter property
The property to check for. True if key is a direct property, else false.
interface LoDashStatic
interface LoDashStatic {}
method invert
invert: (object: any) => any;
Creates an object composed of the inverted keys and values of the given object.
Parameter object
The object to invert. The created inverted object.
interface LoDashStatic
interface LoDashStatic {}
method isArguments
isArguments: (value: any) => boolean;
Checks if value is an arguments object.
Parameter value
The value to check. True if the value is an arguments object, else false.
interface LoDashStatic
interface LoDashStatic {}
method isArray
isArray: (value: any) => boolean;
Checks if value is an array.
Parameter value
The value to check. True if the value is an array, else false.
interface LoDashStatic
interface LoDashStatic {}
method isBoolean
isBoolean: (value: any) => boolean;
Checks if value is a boolean value.
Parameter value
The value to check. True if the value is a boolean value, else false.
interface LoDashStatic
interface LoDashStatic {}
method isDate
isDate: (value: any) => boolean;
Checks if value is a date.
Parameter value
The value to check. True if the value is a date, else false.
interface LoDashStatic
interface LoDashStatic {}
method isElement
isElement: (value: any) => boolean;
Checks if value is a DOM element.
Parameter value
The value to check. True if the value is a DOM element, else false.
interface LoDashStatic
interface LoDashStatic {}
method isEmpty
isEmpty: { (value: any[]): boolean; (value: Dictionary<any>): boolean; (value: string): boolean; (value: any): boolean;};
Checks if value is empty. Arrays, strings, or arguments objects with a length of 0 and objects with no own enumerable properties are considered "empty".
Parameter value
The value to inspect. True if the value is empty, else false.
See Also
_.isEmpty
interface LoDashStatic
interface LoDashStatic {}
method isEqual
isEqual: ( a: any, b: any, callback?: (a: any, b: any) => boolean, thisArg?: any) => boolean;
Performs a deep comparison between two values to determine if they are equivalent to each other. If a callback is provided it will be executed to compare values. If the callback returns undefined comparisons will be handled by the method instead. The callback is bound to thisArg and invoked with two arguments; (a, b).
Parameter a
The value to compare.
Parameter b
The other value to compare.
Parameter callback
The function to customize comparing values.
Parameter thisArg
The this binding of callback. True if the values are equivalent, else false.
interface LoDashStatic
interface LoDashStatic {}
method isFinite
isFinite: (value: any) => boolean;
Checks if value is, or can be coerced to, a finite number.
Note: This is not the same as native isFinite which will return true for booleans and empty strings. See http://es5.github.io/#x15.1.2.5.
Parameter value
The value to check. True if the value is finite, else false.
interface LoDashStatic
interface LoDashStatic {}
method isFunction
isFunction: (value: any) => boolean;
Checks if value is a function.
Parameter value
The value to check. True if the value is a function, else false.
interface LoDashStatic
interface LoDashStatic {}
method isNaN
isNaN: (value: any) => boolean;
Checks if value is NaN.
Note: This is not the same as native isNaN which will return true for undefined and other non-numeric values. See http://es5.github.io/#x15.1.2.4.
Parameter value
The value to check. True if the value is NaN, else false.
interface LoDashStatic
interface LoDashStatic {}
method isNull
isNull: (value: any) => boolean;
Checks if value is null.
Parameter value
The value to check. True if the value is null, else false.
interface LoDashStatic
interface LoDashStatic {}
method isNumber
isNumber: (value: any) => boolean;
Checks if value is a number.
Note: NaN is considered a number. See http://es5.github.io/#x8.5.
Parameter value
The value to check. True if the value is a number, else false.
interface LoDashStatic
interface LoDashStatic {}
method isObject
isObject: (value: any) => boolean;
Checks if value is the language type of Object. (e.g. arrays, functions, objects, regexes, new Number(0), and new String(''))
Parameter value
The value to check. True if the value is an object, else false.
interface LoDashStatic
interface LoDashStatic {}
method isPlainObject
isPlainObject: (value: any) => boolean;
Checks if value is an object created by the Object constructor.
Parameter value
The value to check. True if value is a plain object, else false.
interface LoDashStatic
interface LoDashStatic {}
method isRegExp
isRegExp: (value: any) => boolean;
Checks if value is a regular expression.
Parameter value
The value to check. True if the value is a regular expression, else false.
interface LoDashStatic
interface LoDashStatic {}
method isString
isString: (value: any) => boolean;
Checks if value is a string.
Parameter value
The value to check. True if the value is a string, else false.
interface LoDashStatic
interface LoDashStatic {}
method isUndefined
isUndefined: (value: any) => boolean;
Checks if value is undefined.
Parameter value
The value to check. True if the value is undefined, else false.
interface LoDashStatic
interface LoDashStatic {}
method keys
keys: (object: any) => string[];
Creates an array composed of the own enumerable property names of an object.
Parameter object
The object to inspect. An array of property names.
interface LoDashStatic
interface LoDashStatic {}
method mapValues
mapValues: { <T, TResult>( obj: Dictionary<T>, callback: ObjectIterator<T, TResult>, thisArg?: any ): Dictionary<TResult>; <T>(obj: Dictionary<T>, where: Dictionary<T>): Dictionary<boolean>; <T, TMapped>(obj: T, pluck: string): TMapped; <T>(obj: T, callback: ObjectIterator<any, any>, thisArg?: any): T;};
Creates an object with the same keys as object and values generated by running each own enumerable property of object through the callback. The callback is bound to thisArg and invoked with three arguments; (value, key, object).
If a property name is provided for callback the created "_.pluck" style callback will return the property value of the given element.
If an object is provided for callback the created "_.where" style callback will return true for elements that have the properties of the given object, else false.
Parameter object
The object to iterate over.
Parameter callback
The function called per iteration.
Parameter thisArg
this
object initerator
, optional. Returns a new object with values of the results of each callback execution.
interface LoDashStatic
interface LoDashStatic {}
method merge
merge: { <P, T, S1, Value, Result>( object: T, s1: S1, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): Result; <P, T, S1, S2, Value, Result>( object: T, s1: S1, s2: S2, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): Result; <P, T, S1, S2, S3, Value, Result>( object: T, s1: S1, s2: S2, s3: S3, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): Result; <P, T, S1, S2, S3, S4, Value, Result>( object: T, s1: S1, s2: S2, s3: S3, s4: S4, callback?: (objectValue: Value, sourceValue: Value) => Value, thisArg?: any ): Result;};
Recursively merges own enumerable properties of the source object(s), that don't resolve to undefined into the destination object. Subsequent sources will overwrite property assignments of previous sources. If a callback is provided it will be executed to produce the merged values of the destination and source properties. If the callback returns undefined merging will be handled by the method instead. The callback is bound to thisArg and invoked with two arguments; (objectValue, sourceValue).
Parameter object
The destination object.
Parameter s1
8 The source object(s)
Parameter callback
The function to customize merging properties.
Parameter thisArg
The this binding of callback. The destination object.
See Also
_.merge
interface LoDashStatic
interface LoDashStatic {}
method omit
omit: { <Omitted, T>(object: T, ...keys: string[]): Omitted; <Omitted, T>(object: T, keys: string[]): Omitted; <Omitted, T>( object: T, callback: ObjectIterator<any, boolean>, thisArg?: any ): Omitted;};
Creates a shallow clone of object excluding the specified properties. Property names may be specified as individual arguments or as arrays of property names. If a callback is provided it will be executed for each property of object omitting the properties the callback returns truey for. The callback is bound to thisArg and invoked with three arguments; (value, key, object).
Parameter object
The source object.
Parameter keys
The properties to omit. An object without the omitted properties.
See Also
_.omit
interface LoDashStatic
interface LoDashStatic {}
method pairs
pairs: (object: any) => any[][];
Creates a two dimensional array of an object’s key-value pairs, i.e. [[key1, value1], [key2, value2]].
Parameter object
The object to inspect. Aew array of key-value pairs.
interface LoDashStatic
interface LoDashStatic {}
method pick
pick: { <Picked, T>(object: T, ...keys: string[]): Picked; <Picked, T>(object: T, keys: string[]): Picked; <Picked, T>( object: T, callback: ObjectIterator<any, boolean>, thisArg?: any ): Picked;};
Creates a shallow clone of object composed of the specified properties. Property names may be specified as individual arguments or as arrays of property names. If a callback is provided it will be executed for each property of object picking the properties the callback returns truey for. The callback is bound to thisArg and invoked with three arguments; (value, key, object).
Parameter object
Object to strip unwanted key/value pairs.
Parameter keys
Property names to pick An object composed of the picked properties.
See Also
_.pick
interface LoDashStatic
interface LoDashStatic {}
method transform
transform: { <T, Acc>( collection: Collection<T>, callback: MemoVoidIterator<T, Acc>, accumulator: Acc, thisArg?: any ): Acc; <T, Acc>( collection: Collection<T>, callback?: MemoVoidIterator<T, Acc>, thisArg?: any ): Acc;};
An alternative to _.reduce this method transforms object to a new accumulator object which is the result of running each of its elements through a callback, with each callback execution potentially mutating the accumulator object. The callback is bound to thisArg and invoked with four arguments; (accumulator, value, key, object). Callbacks may exit iteration early by explicitly returning false.
Parameter collection
The collection to iterate over.
Parameter callback
The function called per iteration.
Parameter accumulator
The custom accumulator value.
Parameter thisArg
The this binding of callback. The accumulated value.
See Also
_.transform
interface LoDashStatic
interface LoDashStatic {}
method values
values: (object: any) => any[];
Creates an array composed of the own enumerable property values of object.
Parameter object
The object to inspect. Returns an array of property values.
interface LoDashStatic
interface LoDashStatic {}
*********** Utilities * ***********
method escape
escape: (str: string) => string;
Converts the characters &, <, >, ", and ' in string to their corresponding HTML entities.
Parameter string
The string to escape. The escaped string.
interface LoDashStatic
interface LoDashStatic {}
method identity
identity: <T>(value: T) => T;
This method returns the first argument provided to it.
Parameter value
Any value. value.
interface LoDashStatic
interface LoDashStatic {}
method mixin
mixin: (object: Dictionary<(value: any) => any>) => void;
Adds function properties of a source object to the lodash function and chainable wrapper.
Parameter object
The object of function properties to add to lodash.
interface LoDashStatic
interface LoDashStatic {}
method noConflict
noConflict: () => typeof _;
Reverts the '_' variable to its previous value and returns a reference to the lodash function. The lodash function.
interface LoDashStatic
interface LoDashStatic {}
method parseInt
parseInt: (value: string) => number;
Converts the given value into an integer of the specified radix. If radix is undefined or 0 a radix of 10 is used unless the value is a hexadecimal, in which case a radix of 16 is used.
Note: This method avoids differences in native ES3 and ES5 parseInt implementations. See http://es5.github.io/#E.
Parameter value
The value to parse.
Parameter radix
The radix used to interpret the value to parse. The new integer value.
interface LoDashStatic
interface LoDashStatic {}
method random
random: { (max: number, floating?: boolean): number; (min: number, max: number, floating?: boolean): number;};
Produces a random number between min and max (inclusive). If only one argument is provided a number between 0 and the given number will be returned. If floating is truey or either min or max are floats a floating-point number will be returned instead of an integer.
Parameter max
The maximum possible value.
Parameter floating
Specify returning a floating-point number. A random number.
Parameter min
The minimum possible value. A random number between
min
andmax
.See Also
_.random
interface LoDashStatic
interface LoDashStatic {}
method result
result: (object: any, property: string) => any;
Resolves the value of property on object. If property is a function it will be invoked with the this binding of object and its result returned, else the property value is returned. If object is falsey then undefined is returned.
Parameter object
The object to inspect.
Parameter property
The property to get the value of. The resolved value.
interface LoDashStatic
interface LoDashStatic {}
method runInContext
runInContext: (context: any) => typeof _;
Create a new lodash function using the given context object.
Parameter context
The context object
Returns
The lodash function.
interface LoDashStatic
interface LoDashStatic {}
method template
template: { (text: string): TemplateExecutor; ( text: string, data: any, options?: TemplateSettings, sourceURL?: string, variable?: string ): any;};
A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code.
Note: In the development build, _.template utilizes sourceURLs for easier debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl
For more information on precompiling templates see: http://lodash.com/#custom-builds
For more information on Chrome extension sandboxes see: http://developer.chrome.com/stable/extensions/sandboxingEval.html
Parameter text
The template text.
Parameter data
The data object used to populate the text.
Parameter options
The options object.
Parameter
options.escape The "escape" delimiter.
Parameter
options.evaluate The "evaluate" delimiter.
Parameter
options.import An object to import into the template as local variables.
Parameter
options.interpolate The "interpolate" delimiter.
Parameter sourceURL
The sourceURL of the template’s compiled source.
Parameter variable
The data object variable name. Returns the compiled Lo-Dash HTML template or a TemplateExecutor if no data is passed.
See Also
_.template
interface LoDashStatic
interface LoDashStatic {}
method times
times: <TResult>( n: number, callback: (num: number) => TResult, context?: any) => TResult[];
Executes the callback n times, returning an array of the results of each callback execution. The callback is bound to thisArg and invoked with one argument; (index).
Parameter n
The number of times to execute the callback.
Parameter callback
The function called per iteration.
Parameter thisArg
The this binding of callback.
interface LoDashStatic
interface LoDashStatic {}
method unescape
unescape: (string: string) => string;
The inverse of _.escape this method converts the HTML entities &, <, >, ", and ' in string to their corresponding characters.
Parameter string
The string to unescape. The unescaped string.
interface LoDashStatic
interface LoDashStatic {}
method uniqueId
uniqueId: (prefix?: string) => string;
Generates a unique ID. If prefix is provided the ID will be appended to it.
Parameter prefix
The value to prefix the ID with. Returns the unique ID.
interface LoDashWrapper
interface LoDashWrapper<T> extends LoDashWrapperBase<T, LoDashWrapper<T>> {}
interface LoDashWrapper
interface LoDashWrapper<T> {}
method after
after: (func: Function) => LoDashObjectWrapper<Function>;
See Also
_.after
interface LoDashWrapper
interface LoDashWrapper<T> {}
method createCallback
createCallback: ( thisArg?: any, argCount?: number) => LoDashObjectWrapper<() => any>;
See Also
_.createCallback
interface LoDashWrapperBase
interface LoDashWrapperBase<T, TWrapper> {}
interface LoDashWrapperBase
interface LoDashWrapperBase<T, TWrapper> {}
method chain
chain: () => TWrapper;
Enables explicit method chaining on the wrapper object.
See Also
_.chain The wrapper object.
interface LoDashWrapperBase
interface LoDashWrapperBase<T, TWrapper> {}
method tap
tap: (interceptor: (value: T) => void) => TWrapper;
See Also
_.tap
interface MemoIterator
interface MemoIterator<T, TResult> {}
call signature
(prev: TResult, curr: T, indexOrKey: any, list?: T[]): TResult;
interface MemoVoidIterator
interface MemoVoidIterator<T, TResult> {}
call signature
(prev: TResult, curr: T, indexOrKey: any, list?: T[]): void;
interface ObjectIterator
interface ObjectIterator<T, TResult> {}
call signature
(element: T, key: string, list: any): TResult;
interface Support
interface Support {}
An object used to flag environments features.
property argsClass
argsClass: boolean;
Detect if an arguments object’s [[Class]] is resolvable (all but Firefox < 4, IE < 9).
property argsObject
argsObject: boolean;
Detect if arguments objects are Object objects (all but Narwhal and Opera < 10.5).
property enumErrorProps
enumErrorProps: boolean;
Detect if name or message properties of Error.prototype are enumerable by default. (IE < 9, Safari < 5.1)
property fastBind
fastBind: boolean;
Detect if Function#bind exists and is inferred to be fast (all but V8).
property funcDecomp
funcDecomp: boolean;
Detect if functions can be decompiled by Function#toString (all but PS3 and older Opera mobile browsers & avoided in Windows 8 apps).
property funcNames
funcNames: boolean;
Detect if Function#name is supported (all but IE).
property nonEnumArgs
nonEnumArgs: boolean;
Detect if arguments object indexes are non-enumerable (Firefox < 4, IE < 9, PhantomJS, Safari < 5.1).
property nonEnumShadows
nonEnumShadows: boolean;
Detect if properties shadowing those on Object.prototype are non-enumerable.
In IE < 9 an objects own properties, shadowing non-enumerable ones, are made non-enumerable as well (a.k.a the JScript [[DontEnum]] bug).
property ownLast
ownLast: boolean;
Detect if own properties are iterated after inherited properties (all but IE < 9).
property spliceObjects
spliceObjects: boolean;
Detect if Array#shift and Array#splice augment array-like objects correctly.
Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array shift() and splice() functions that fail to remove the last element, value[0], of array-like objects even though the length property is set to 0. The shift() method is buggy in IE 8 compatibility mode, while splice() is buggy regardless of mode in IE < 9 and buggy in compatibility mode in IE 9.
property unindexedChars
unindexedChars: boolean;
Detect lack of support for accessing string characters by index.
IE < 8 can't access characters by index and IE 8 can only access characters by index on string literals.
interface TemplateExecutor
interface TemplateExecutor {}
property source
source: string;
call signature
(...data: any[]): string;
interface TemplateSettings
interface TemplateSettings {}
By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby (ERB). Change the following template settings to use alternative delimiters.
property escape
escape?: RegExp;
The "escape" delimiter.
property evaluate
evaluate?: RegExp;
The "evaluate" delimiter.
property imports
imports?: Dictionary<any>;
An object to import into the template as local variables.
property interpolate
interpolate?: RegExp;
The "interpolate" delimiter.
property variable
variable?: string;
Used to reference the data object in the template text.
interface ThrottleSettings
interface ThrottleSettings {}
namespace net
module 'net' {}
variable Socket
var Socket: new (options?: { fd?: string; type?: string; allowHalfOpen?: boolean;}) => NodeSocket;
function connect
connect: { ( options: { allowHalfOpen?: boolean }, connectionListener?: Function ): NodeSocket; (port: number, host?: string, connectionListener?: Function): NodeSocket; (path: string, connectionListener?: Function): NodeSocket;};
function createConnection
createConnection: { ( options: { allowHalfOpen?: boolean }, connectionListener?: Function ): NodeSocket; (port: number, host?: string, connectionListener?: Function): NodeSocket; (path: string, connectionListener?: Function): NodeSocket;};
function createServer
createServer: { (connectionListener?: (socket: NodeSocket) => void): Server; ( options?: { allowHalfOpen?: boolean }, connectionListener?: (socket: NodeSocket) => void ): Server;};
function isIP
isIP: (input: string) => number;
function isIPv4
isIPv4: (input: string) => boolean;
function isIPv6
isIPv6: (input: string) => boolean;
interface NodeSocket
interface NodeSocket extends ReadWriteStream {}
property bufferSize
bufferSize: number;
property bytesRead
bytesRead: number;
property bytesWritten
bytesWritten: number;
property remoteAddress
remoteAddress: string;
property remotePort
remotePort: number;
method address
address: () => { port: number; family: string; address: string };
method connect
connect: { (port: number, host?: string, connectionListener?: Function): void; (path: string, connectionListener?: Function): void;};
method destroy
destroy: () => void;
method end
end: { (): void; (buffer: NodeBuffer, cb?: Function): void; (str: string, cb?: Function): void; (str: string, encoding?: string, cb?: Function): void; (data?: any, encoding?: string): void;};
method pause
pause: () => void;
method resume
resume: () => void;
method setEncoding
setEncoding: (encoding?: string) => void;
method setKeepAlive
setKeepAlive: (enable?: boolean, initialDelay?: number) => void;
method setNoDelay
setNoDelay: (noDelay?: boolean) => void;
method setTimeout
setTimeout: (timeout: number, callback?: Function) => void;
method write
write: { (buffer: NodeBuffer): boolean; (buffer: NodeBuffer, cb?: Function): boolean; (str: string, cb?: Function): boolean; (str: string, encoding?: string, cb?: Function): boolean; (str: string, encoding?: string, fd?: string): boolean; (data: any, encoding?: string, callback?: Function): void;};
interface Server
interface Server extends NodeSocket {}
property connections
connections: number;
property maxConnections
maxConnections: number;
method address
address: () => { port: number; family: string; address: string };
method close
close: (callback?: Function) => void;
method listen
listen: { ( port: number, host?: string, backlog?: number, listeningListener?: Function ): void; (path: string, listeningListener?: Function): void; (handle: any, listeningListener?: Function): void;};
namespace os
module 'os' {}
variable EOL
var EOL: string;
function arch
arch: () => string;
function cpus
cpus: () => { model: string; speed: number; times: { user: number; nice: number; sys: number; idle: number; irq: number };}[];
function freemem
freemem: () => number;
function hostname
hostname: () => string;
function loadavg
loadavg: () => number[];
function networkInterfaces
networkInterfaces: () => any;
function platform
platform: () => string;
function release
release: () => string;
function tmpDir
tmpDir: () => string;
function totalmem
totalmem: () => number;
function type
type: () => string;
function uptime
uptime: () => number;
namespace path
module 'path' {}
variable sep
var sep: string;
function basename
basename: (p: string, ext?: string) => string;
function dirname
dirname: (p: string) => string;
function extname
extname: (p: string) => string;
function join
join: (...paths: any[]) => string;
function normalize
normalize: (p: string) => string;
function relative
relative: (from: string, to: string) => string;
function resolve
resolve: (...pathSegments: any[]) => string;
namespace punycode
module 'punycode' {}
namespace querystring
module 'querystring' {}
********************************************** * MODULES * * **********************************************
namespace readline
module 'readline' {}
function createInterface
createInterface: (options: ReadLineOptions) => ReadLine;
interface ReadLine
interface ReadLine extends NodeEventEmitter {}
method close
close: () => void;
method pause
pause: () => void;
method prompt
prompt: (preserveCursor?: boolean) => void;
method question
question: (query: string, callback: Function) => void;
method resume
resume: () => void;
method setPrompt
setPrompt: (prompt: string, length: number) => void;
method write
write: (data: any, key?: any) => void;
interface ReadLineOptions
interface ReadLineOptions {}
namespace repl
module 'repl' {}
function start
start: (options: ReplOptions) => NodeEventEmitter;
interface ReplOptions
interface ReplOptions {}
property eval
eval?: Function;
property ignoreUndefined
ignoreUndefined?: boolean;
property input
input?: ReadableStream;
property output
output?: WritableStream;
property prompt
prompt?: string;
property terminal
terminal?: boolean;
property useColors
useColors?: boolean;
property useGlobal
useGlobal?: boolean;
property writer
writer?: Function;
namespace stream
module 'stream' {}
class Duplex
class Duplex extends Readable implements ReadWriteStream {}
constructor
constructor(opts?: DuplexOptions);
property writable
writable: boolean;
method end
end: { (): void; (buffer: NodeBuffer, cb?: Function): void; (str: string, cb?: Function): void; (str: string, encoding?: string, cb?: Function): void;};
method write
write: { (buffer: NodeBuffer, cb?: Function): boolean; (str: string, cb?: Function): boolean; (str: string, encoding?: string, cb?: Function): boolean;};
class PassThrough
class PassThrough extends Transform {}
class Readable
class Readable extends events.EventEmitter implements ReadableStream {}
constructor
constructor(opts?: ReadableOptions);
property readable
readable: boolean;
method pause
pause: () => void;
method pipe
pipe: <T extends WritableStream<any>>( destination: T, options?: { end?: boolean }) => T;
method push
push: (chunk: any, encoding?: string) => boolean;
method read
read: (size?: number) => any;
method resume
resume: () => void;
method setEncoding
setEncoding: (encoding: string) => void;
method unpipe
unpipe: <T extends WritableStream<any>>(destination?: T) => void;
method unshift
unshift: { (chunk: string): void; (chunk: NodeBuffer): void };
method wrap
wrap: (oldStream: ReadableStream) => ReadableStream;
class Transform
class Transform extends events.EventEmitter implements ReadWriteStream {}
constructor
constructor(opts?: TransformOptions);
property readable
readable: boolean;
property writable
writable: boolean;
method end
end: { (): void; (buffer: NodeBuffer, cb?: Function): void; (str: string, cb?: Function): void; (str: string, encoding?: string, cb?: Function): void;};
method pause
pause: () => void;
method pipe
pipe: <T extends WritableStream<any>>( destination: T, options?: { end?: boolean }) => T;
method push
push: (chunk: any, encoding?: string) => boolean;
method read
read: (size?: number) => any;
method resume
resume: () => void;
method setEncoding
setEncoding: (encoding: string) => void;
method unpipe
unpipe: <T extends WritableStream<any>>(destination?: T) => void;
method unshift
unshift: { (chunk: string): void; (chunk: NodeBuffer): void };
method wrap
wrap: (oldStream: ReadableStream) => ReadableStream;
method write
write: { (buffer: NodeBuffer, cb?: Function): boolean; (str: string, cb?: Function): boolean; (str: string, encoding?: string, cb?: Function): boolean;};
class Writable
class Writable extends events.EventEmitter implements WritableStream {}
constructor
constructor(opts?: WritableOptions);
property writable
writable: boolean;
method end
end: { (): void; (buffer: NodeBuffer, cb?: Function): void; (str: string, cb?: Function): void; (str: string, encoding?: string, cb?: Function): void;};
method write
write: { (buffer: NodeBuffer, cb?: Function): boolean; (str: string, cb?: Function): boolean; (str: string, encoding?: string, cb?: Function): boolean;};
interface DuplexOptions
interface DuplexOptions extends ReadableOptions, WritableOptions {}
property allowHalfOpen
allowHalfOpen?: boolean;
interface ReadableOptions
interface ReadableOptions {}
property encoding
encoding?: string;
property highWaterMark
highWaterMark?: number;
property objectMode
objectMode?: boolean;
interface TransformOptions
interface TransformOptions extends ReadableOptions, WritableOptions {}
interface WritableOptions
interface WritableOptions {}
property decodeStrings
decodeStrings?: boolean;
property highWaterMark
highWaterMark?: number;
namespace string_decoder
module 'string_decoder' {}
variable StringDecoder
var StringDecoder: new (encoding: string) => NodeStringDecoder;
interface NodeStringDecoder
interface NodeStringDecoder {}
method detectIncompleteChar
detectIncompleteChar: (buffer: NodeBuffer) => number;
method write
write: (buffer: NodeBuffer) => string;
namespace tls
module 'tls' {}
variable CLIENT_RENEG_LIMIT
var CLIENT_RENEG_LIMIT: number;
variable CLIENT_RENEG_WINDOW
var CLIENT_RENEG_WINDOW: number;
function connect
connect: { (options: TlsOptions, secureConnectionListener?: () => void): ClearTextStream; ( port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void ): ClearTextStream; ( port: number, options?: ConnectionOptions, secureConnectListener?: () => void ): ClearTextStream;};
function createSecurePair
createSecurePair: ( credentials?: crypto.Credentials, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean) => SecurePair;
function createServer
createServer: ( options: TlsOptions, secureConnectionListener?: (cleartextStream: ClearTextStream) => void) => Server;
interface ClearTextStream
interface ClearTextStream extends ReadWriteStream {}
property address
address: { port: number; family: string; address: string;};
property authorizationError
authorizationError: Error;
property authorized
authorized: boolean;
property getCipher
getCipher: { name: string; version: string;};
property remoteAddress
remoteAddress: string;
property remotePort
remotePort: number;
method getPeerCertificate
getPeerCertificate: () => any;
interface ConnectionOptions
interface ConnectionOptions {}
property ca
ca?: any;
property cert
cert?: any;
property host
host?: string;
property key
key?: any;
property NPNProtocols
NPNProtocols?: any;
property passphrase
passphrase?: string;
property pfx
pfx?: any;
property port
port?: number;
property rejectUnauthorized
rejectUnauthorized?: boolean;
property servername
servername?: string;
property socket
socket?: net.NodeSocket;
interface SecurePair
interface SecurePair {}
interface Server
interface Server extends net.Server {}
property connections
connections: number;
property maxConnections
maxConnections: number;
method addContext
addContext: ( hostName: string, credentials: { key: string; cert: string; ca: string }) => void;
method address
address: () => { port: number; family: string; address: string };
method close
close: () => void;
method listen
listen: { ( port: number, host?: string, backlog?: number, listeningListener?: Function ): void; (path: string, listeningListener?: Function): void; (handle: any, listeningListener?: Function): void; (port: number, host?: string, callback?: Function): void;};
interface TlsOptions
interface TlsOptions {}
property ca
ca?: any;
property cert
cert?: any;
property ciphers
ciphers?: string;
property crl
crl?: any;
property honorCipherOrder
honorCipherOrder?: any;
property key
key?: any;
property NPNProtocols
NPNProtocols?: any;
property passphrase
passphrase?: string;
property pfx
pfx?: any;
property rejectUnauthorized
rejectUnauthorized?: boolean;
property requestCert
requestCert?: boolean;
property SNICallback
SNICallback?: (servername: string) => any;
namespace tty
module 'tty' {}
function isatty
isatty: (fd: number) => boolean;
interface ReadStream
interface ReadStream extends net.NodeSocket {}
property isRaw
isRaw: boolean;
method setRawMode
setRawMode: (mode: boolean) => void;
interface WriteStream
interface WriteStream extends net.NodeSocket {}
namespace url
module 'url' {}
namespace util
module 'util' {}
function debug
debug: (string: string) => void;
function error
error: (...param: any[]) => void;
function format
format: (format: any, ...param: any[]) => string;
function inherits
inherits: (constructor: any, superConstructor: any) => void;
function inspect
inspect: { (object: any, showHidden?: boolean, depth?: number, color?: boolean): string; (object: any, options: InspectOptions): string;};
function isArray
isArray: (object: any) => boolean;
function isDate
isDate: (object: any) => boolean;
function isError
isError: (object: any) => boolean;
function isRegExp
isRegExp: (object: any) => boolean;
function log
log: (string: string) => void;
function print
print: (...param: any[]) => void;
function puts
puts: (...param: any[]) => void;
interface InspectOptions
interface InspectOptions {}
property colors
colors?: boolean;
property customInspect
customInspect?: boolean;
property depth
depth?: number;
property showHidden
showHidden?: boolean;
namespace vm
module 'vm' {}
function createContext
createContext: (initSandbox?: Context) => Context;
function createScript
createScript: (code: string, filename?: string) => Script;
function runInContext
runInContext: (code: string, context: Context, filename?: string) => void;
function runInNewContext
runInNewContext: (code: string, sandbox?: Context, filename?: string) => void;
function runInThisContext
runInThisContext: (code: string, filename?: string) => void;
interface Context
interface Context {}
interface Script
interface Script {}
method runInNewContext
runInNewContext: (sandbox?: Context) => void;
method runInThisContext
runInThisContext: () => void;
namespace zlib
module 'zlib' {}
variable Z_ASCII
var Z_ASCII: number;
variable Z_BEST_COMPRESSION
var Z_BEST_COMPRESSION: number;
variable Z_BEST_SPEED
var Z_BEST_SPEED: number;
variable Z_BINARY
var Z_BINARY: number;
variable Z_BLOCK
var Z_BLOCK: number;
variable Z_BUF_ERROR
var Z_BUF_ERROR: number;
variable Z_DATA_ERROR
var Z_DATA_ERROR: number;
variable Z_DEFAULT_COMPRESSION
var Z_DEFAULT_COMPRESSION: number;
variable Z_DEFAULT_STRATEGY
var Z_DEFAULT_STRATEGY: number;
variable Z_DEFLATED
var Z_DEFLATED: number;
variable Z_ERRNO
var Z_ERRNO: number;
variable Z_FILTERED
var Z_FILTERED: number;
variable Z_FINISH
var Z_FINISH: number;
variable Z_FIXED
var Z_FIXED: number;
variable Z_FULL_FLUSH
var Z_FULL_FLUSH: number;
variable Z_HUFFMAN_ONLY
var Z_HUFFMAN_ONLY: number;
variable Z_MEM_ERROR
var Z_MEM_ERROR: number;
variable Z_NEED_DICT
var Z_NEED_DICT: number;
variable Z_NO_COMPRESSION
var Z_NO_COMPRESSION: number;
variable Z_NO_FLUSH
var Z_NO_FLUSH: number;
variable Z_NULL
var Z_NULL: number;
variable Z_OK
var Z_OK: number;
variable Z_PARTIAL_FLUSH
var Z_PARTIAL_FLUSH: number;
variable Z_RLE
var Z_RLE: number;
variable Z_STREAM_END
var Z_STREAM_END: number;
variable Z_STREAM_ERROR
var Z_STREAM_ERROR: number;
variable Z_SYNC_FLUSH
var Z_SYNC_FLUSH: number;
variable Z_TEXT
var Z_TEXT: number;
variable Z_TREES
var Z_TREES: number;
variable Z_UNKNOWN
var Z_UNKNOWN: number;
variable Z_VERSION_ERROR
var Z_VERSION_ERROR: number;
function createDeflate
createDeflate: (options?: ZlibOptions) => Deflate;
function createDeflateRaw
createDeflateRaw: (options?: ZlibOptions) => DeflateRaw;
function createGunzip
createGunzip: (options?: ZlibOptions) => Gunzip;
function createGzip
createGzip: (options?: ZlibOptions) => Gzip;
function createInflate
createInflate: (options?: ZlibOptions) => Inflate;
function createInflateRaw
createInflateRaw: (options?: ZlibOptions) => InflateRaw;
function createUnzip
createUnzip: (options?: ZlibOptions) => Unzip;
function deflate
deflate: ( buf: NodeBuffer, callback: (error: Error, result: any) => void) => void;
function deflateRaw
deflateRaw: ( buf: NodeBuffer, callback: (error: Error, result: any) => void) => void;
function gunzip
gunzip: (buf: NodeBuffer, callback: (error: Error, result: any) => void) => void;
function gzip
gzip: (buf: NodeBuffer, callback: (error: Error, result: any) => void) => void;
function inflate
inflate: ( buf: NodeBuffer, callback: (error: Error, result: any) => void) => void;
function inflateRaw
inflateRaw: ( buf: NodeBuffer, callback: (error: Error, result: any) => void) => void;
function unzip
unzip: (buf: NodeBuffer, callback: (error: Error, result: any) => void) => void;
interface Deflate
interface Deflate extends ReadWriteStream {}
interface DeflateRaw
interface DeflateRaw extends ReadWriteStream {}
interface Gunzip
interface Gunzip extends ReadWriteStream {}
interface Gzip
interface Gzip extends ReadWriteStream {}
interface Inflate
interface Inflate extends ReadWriteStream {}
interface InflateRaw
interface InflateRaw extends ReadWriteStream {}
interface Unzip
interface Unzip extends ReadWriteStream {}
interface ZlibOptions
interface ZlibOptions {}
property chunkSize
chunkSize?: number;
property dictionary
dictionary?: any;
property level
level?: number;
property memLevel
memLevel?: number;
property strategy
strategy?: number;
property windowBits
windowBits?: number;
Package Files (11)
- node_modules/typescript/lib/lib.es2015.iterable.d.ts
- node_modules/typescript/lib/lib.es2015.promise.d.ts
- node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts
- node_modules/typescript/lib/lib.es2018.promise.d.ts
- node_modules/typescript/lib/lib.es5.d.ts
- src/async/index.ts
- src/typings/bluebird/bluebird.d.ts
- src/typings/chai/chai.d.ts
- src/typings/lodash/lodash.d.ts
- src/typings/node-fibers/node-fibers.d.ts
- src/typings/node/node.d.ts
Dependencies (3)
Dev Dependencies (8)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/asyncawait
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/asyncawait)
- HTML<a href="https://www.jsdocs.io/package/asyncawait"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 15179 ms. - Missing or incorrect documentation? Open an issue for this package.