new OCollector()

Descripción

An object based collector

Miembros


length :number

Descripción

Get the size of the collection

Métodos


every( qu ) → {boolean}

Descripción

Returns true if all items match the query. Aliases as all

Parámetros
Nombre Tipo Descripción
qu object

The query to execute

Returns

some( qu ) → {boolean}

Descripción

Returns true if any of the items match the query. Aliases as any

Parámetros
Nombre Tipo Descripción
qu object

The query to execute

Returns

unique( qu ) → {array}

Descripción

Returns the set of unique records that match a query

Parámetros
Nombre Tipo Descripción
qu object

The query to execute.

Returns

all( qu ) → {boolean}

Descripción

Returns true if all items match the query. Aliases as every

Parámetros
Nombre Tipo Descripción
qu object

The query to execute

Returns

any( qu ) → {boolean}

Descripción

Returns true if any of the items match the query. Aliases as all

Parámetros
Nombre Tipo Descripción
qu object

The query to execute

Returns

remove( qu ) → {object|array}

Descripción

Remove all items in the object/array that match the query

Parámetros
Nombre Tipo Descripción
qu object

The query to execute. See module:ink/probe.queryOperators for the operators you can use.

Returns

The array or object as appropriate without the records.


findOneKey( qu ) → {object}

Descripción

Returns the first record that matches the query and returns its key or index depending on whether obj is an object or array respectively.
Aliased as seekKey.

Parámetros
Nombre Tipo Descripción
qu object

The query to execute.

Returns

findOne( qu ) → {object}

Descripción

Returns the first record that matches the query. Aliased as seek.

Parámetros
Nombre Tipo Descripción
qu object

The query to execute.

Returns

findKeys( qu ) → {array}

Descripción

Find all records that match a query and returns the keys for those items. This is similar to module:ink/probe.find but instead of returning
records, returns the keys. If obj is an object it will return the hash key. If 'obj' is an array, it will return the index

Parámetros
Nombre Tipo Descripción
qu object

The query to execute.

Returns

find( qu ) → {array}

Descripción

Find all records that match a query

Parámetros
Nombre Tipo Descripción
qu object

The query to execute.

Returns

The results


update( qu, setDocument )

Descripción

Updates all records in obj that match the query. See module:ink/probe.updateOperators for the operators that are supported.

Parámetros
Nombre Tipo Descripción
qu object

The query which will be used to identify the records to updated

setDocument object

The update operator. See module:ink/probe.updateOperators