Standard library utilities.
var utils = require( '@stdlib/utils' );
Standard library utilities.
var o = utils;
// returns {...}
any( collection )
: test whether at least one element in a collection is truthy.anyBy( collection, predicate[, thisArg ] )
: test whether at least one element in a collection passes a test implemented by a predicate function.anyByAsync( collection, [options,] predicate, done )
: test whether at least one element in a collection passes a test implemented by a predicate function.anyByRight( collection, predicate[, thisArg ] )
: test whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left.anyByRightAsync( collection, [options,] predicate, done )
: test whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left.append( collection1, collection2 )
: add elements from one collection to the end of another collection.bifurcate( collection, [options,] filter )
: split values into two groups.bifurcateBy( collection, [options,] predicate )
: split values into two groups according to a predicate function.bifurcateByAsync( collection, [options,] predicate, done )
: split values into two groups according to a predicate function.bifurcateIn( obj, [options,] predicate )
: split an object's own and inherited property values into two groups according to a predicate function.bifurcateOwn( obj, [options,] predicate )
: split an object's own property values into two groups according to a predicate function.countBy( collection, [options,] indicator )
: group values according to an indicator function and return group counts.countByAsync( collection, [options,] indicator, done )
: group values according to an indicator function and return group counts.every( collection )
: test whether all elements in a collection are truthy.everyBy( collection, predicate[, thisArg ] )
: test whether all elements in a collection pass a test implemented by a predicate function.everyByAsync( collection, [options,] predicate, done )
: test whether all elements in a collection pass a test implemented by a predicate function.everyByRight( collection, predicate[, thisArg ] )
: test whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left.everyByRightAsync( collection, [options,] predicate, done )
: test whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left.forEach( collection, fcn[, thisArg ] )
: invoke a function for each element in a collection.forEachAsync( collection, [options,] fcn, done )
: invoke a function once for each element in a collection.forEachRight( collection, fcn[, thisArg ] )
: invoke a function for each element in a collection, iterating from the right to left.forEachRightAsync( collection, [options,] fcn, done )
: invoke a function once for each element in a collection, iterating from right to left.group( collection, [options,] groups )
: group values as arrays associated with distinct keys.groupBy( collection, [options,] indicator )
: group values according to an indicator function.groupByAsync( collection, [options,] indicator, done )
: group values according to an indicator function.groupIn( obj, [options,] indicator )
: group an object's own and inherited property values according to an indicator function.groupOwn( obj, [options,] indicator )
: group an object's own property values according to an indicator function.inmap( collection, fcn[, thisArg ] )
: invoke a function for each element in a collection and update the collection in-place.inmapAsync( collection, [options,] fcn, done )
: invoke a function for each element in a collection and update the collection in-place.inmapRight( collection, fcn[, thisArg ] )
: invoke a function for each element in a collection and update the collection in-place, iterating from right to left.inmapRightAsync( collection, [options,] fcn, done )
: invoke a function for each element in a collection and update the collection in-place, iterating from right to left.keyBy( collection, fcn[, thisArg ] )
: convert a collection to an object whose keys are determined by a provided function and whose values are the collection values.keyByRight( collection, fcn[, thisArg ] )
: convert a collection to an object whose keys are determined by a provided function and whose values are the collection values, iterating from right to left.none( collection )
: test whether all elements in a collection are falsy.noneBy( collection, predicate[, thisArg ] )
: test whether all elements in a collection fail a test implemented by a predicate function.noneByAsync( collection, [options,] predicate, done )
: test whether all elements in a collection fail a test implemented by a predicate function.noneByRight( collection, predicate[, thisArg ] )
: test whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left.noneByRightAsync( collection, [options,] predicate, done )
: test whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left.pop( collection )
: remove and return the last element of a collection.prepend( collection1, collection2 )
: add elements from one collection to the beginning of another collection.push( collection, ...items )
: add one or more elements to the end of a collection.reduce( collection, initial, reducer[, thisArg ] )
: apply a function against an accumulator and each element in a collection and return the accumulated result.reduceAsync( collection, initial, [options,] reducer, done )
: apply a function against an accumulator and each element in a collection and return the accumulated result.reduceRight( collection, initial, reducer[, thisArg ] )
: apply a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left.reduceRightAsync( collection, initial, [options,] reducer, done )
: apply a function against an accumulator and each element in a collection and return the accumulated result, iterating from right to left.shift( collection )
: remove and return the first element of a collection.some( collection, n )
: test whether a collection contains at leastn
elements which are truthy.someBy( collection, n, predicate[, thisArg ] )
: test whether a collection contains at leastn
elements which pass a test implemented by a predicate function.someByAsync( collection, n, [options,] predicate, done )
: test whether a collection contains at leastn
elements which pass a test implemented by a predicate function.someByRight( collection, n, predicate[, thisArg ] )
: test whether a collection contains at leastn
elements which pass a test implemented by a predicate function, iterating from right to left.someByRightAsync( collection, n, [options,] predicate, done )
: test whether a collection contains at leastn
elements which pass a test implemented by a predicate function, iterating from right to left.tabulate( collection )
: generate a frequency table.tabulateBy( collection[, options,] indicator )
: generate a frequency table according to an indicator function.tabulateByAsync( collection, [options,] indicator, done )
: generate a frequency table according to an indicator function.unshift( collection, ...items )
: add one or more elements to the beginning of a collection.untilEach( collection, predicate, fcn[, thisArg ] )
: until a test condition is true, invoke a function for each element in a collection.untilEachRight( collection, predicate, fcn[, thisArg ] )
: until a test condition is true, invoke a function for each element in a collection, iterating from right to left.whileEach( collection, predicate, fcn[, thisArg ] )
: while a test condition is true, invoke a function for each element in a collection.whileEachRight( collection, predicate, fcn[, thisArg ] )
: while a test condition is true, invoke a function for each element in a collection, iterating from right to left.
deepPluck( arr, path[, options] )
: extract a nested property value from each element of an object array.find( arr, [opts,] clbk )
: find elements in an array-like object that satisfy a test condition.flattenArray( arr[, options] )
: flatten an array.objectFromEntries( entries )
: create an object from key-value pairs.indexOf( arr, searchElement[, fromIndex] )
: return the first index at which a given element can be found.pluck( arr, prop[, options] )
: extract a property value from each element of an object array.unzip( arr[, idx] )
: unzip a zipped array (i.e., a nested array of tuples).zip( arr1, arr2,...[, opts] )
: generate array tuples from input arrays.
capitalizeKeys( obj )
: convert the first letter of each object key to uppercase.deepGet( obj, path[, options] )
: get a nested property value.deepSet( obj, path, value[, options] )
: set a nested property value.setReadOnly( obj, prop, value )
: define a read-only property.objectEntries( obj )
: return an array of an object's own enumerable property key-value pairs.objectEntriesIn( obj )
: return an array of an object's own and inherited enumerable property key-value pairs.flattenObject( obj[, options] )
: flatten an object.forIn( obj, fcn[, thisArg ] )
: invoke a function for each own and inherited enumerable property of an object.forOwn( obj, fcn[, thisArg ] )
: invoke a function for each own enumerable property of an object.getPrototypeOf( value )
: return the prototype of a provided object.keysIn( obj )
: return an array of an object's own and inherited enumerable property names.lowercaseKeys( obj )
: convert each object key to lowercase.mapKeys( obj, transform )
: map keys from one object to a new object having the same values.mapKeysAsync( obj, [options,] transform, done )
: map keys from one object to a new object having the same values.mapValues( obj, transform )
: map values from one object to a new object having the same keys.mapValuesAsync( obj, [options,] transform, done )
: map values from one object to a new object having the same keys.merge( target, source1[, source2[,...,sourceN]] )
: merge and extend objects.moveProperty( source, prop, target )
: move a property from one object to another object.objectInverse( obj[, options] )
: invert an object, such that keys become values and values become keys.objectInverseBy( obj, [options,] transform )
: invert an object, such that keys become values and values become keys, according to a transform function.omit( obj, keys )
: return a partial object copy excluding specified keys.omitBy( obj, predicate )
: return a partial object copy excluding properties for which a predicate (function) returns a truthy value.pick( obj, keys )
: return a partial object copy containing only specified keys.pickBy( obj, predicate )
: return a partial object copy containing properties for which a predicate (function) returns a truthy value.uncapitalizeKeys( obj )
: convert the first letter of each object key to lowercase.uppercaseKeys( obj )
: convert each object key to uppercase.objectValues( obj )
: return an array of an object's own enumerable property values.objectValuesIn( obj )
: return an array of an object's own and inherited enumerable property values.
argumentFunction( idx )
: create an argument function.compose( ...fcn )
: function composition.composeAsync( ...fcn )
: function composition.constantFunction( x )
: constant function.curry( fcn[, arity][, thisArg] )
: transform a function into a sequence of functions each accepting a single argument.curryRight( fcn[, arity][, thisArg] )
: transform a function into a sequence of functions each accepting a single argument.doUntil( fcn, predicate[, thisArg ] )
: invoke a function until a test condition is true.doUntilAsync( fcn, predicate, done[, thisArg ] )
: invoke a function until a test condition is true.doUntilEach( collection, fcn, predicate[, thisArg ] )
: until a test condition is true, invoke a function for each element in a collection.doUntilEachRight( collection, fcn, predicate[, thisArg ] )
: until a test condition is true, invoke a function for each element in a collection, iterating from right to left.doWhile( fcn, predicate[, thisArg ] )
: invoke a function while a test condition is true.doWhileAsync( fcn, predicate, done[, thisArg ] )
: invoke a function while a test condition is true.doWhileEach( collection, fcn, predicate[, thisArg ] )
: while a test condition is true, invoke a function for each element in a collection.doWhileEachRight( collection, fcn, predicate[, thisArg ] )
: while a test condition is true, invoke a function for each element in a collection, iterating from right to left.functionName( fcn )
: determine a function's name.functionSequence( ...fcn )
: function sequence.functionSequenceAsync( ...fcn )
: function sequence.identity( x )
: identity function.mapFun( fcn, n[, thisArg ] )
: invoke a functionn
times and return an array of accumulated function return values.mapFunAsync( fcn, n, [options,] done )
: invoke a functionn
times and return an array of accumulated function return values.memoize( fcn[, hashFunction] )
: memoize a function.noop()
: function which does nothing.papply( fcn[, ...args] )
: partially apply function arguments.papplyRight( fcn[, ...args] )
: partially apply function arguments from the right.reorderArguments( fcn, indices[, thisArg] )
: create a function that invokes a provided function with reordered arguments.reverseArguments( fcn[, thisArg] )
: create a function that invokes a provided function with arguments in reverse order.waterfall( fcns, clbk[, thisArg] )
: execute functions in series, passing the results of one function as arguments to the next function.uncurry( fcn[, arity][, thisArg] )
: transform a curried function into a function invoked with multiple arguments.uncurryRight( fcn[, arity][, thisArg] )
: transform a curried function into a function invoked with multiple arguments.until( predicate, fcn[, thisArg ] )
: invoke a function until a test condition is true.untilAsync( predicate, fcn, done[, thisArg ] )
: invoke a function until a test condition is true.whilst( predicate, fcn[, thisArg ] )
: invoke a function while a test condition is true.
trycatch( x, y )
: if a function does not throw, return the function return value; otherwise, returny
.trycatchAsync( x, y, done )
: if a function does not return an error, invoke a callback with the function result; otherwise, invoke a callback with a valuey
.tryFunction( fcn )
: wrap a function in a try/catch block.tryRequire( id )
: wraprequire
in a try/catch block.trythen( x, y )
: if a function does not throw, return the function return value; otherwise, return the return value of a second function.trythenAsync( x, y, done )
: if a function does not return an error, invoke a callback with the function result; otherwise, invoke a second function.
constructorName( value )
: determine the name of a value's constructor.convertPath( from, to )
: convert between POSIX and Windows paths.copy( value[, level] )
: copy or deep clone a value to an arbitrary depth.dirname( path )
: return a directory name.rescape( str )
: escape a regular expression string or pattern.evil( str )
: alias foreval
global.extname( filename )
: return a filename extension.ifelse( bool, x, y )
: if a condition is truthy, returnx
; otherwise, returny
.ifelseAsync( predicate, x, y, done )
: if a predicate function returns a truthy value, returnx
; otherwise, returny
.ifthen( bool, x, y )
: if a condition is truthy, invokex
; otherwise, invokey
.ifthenAsync( predicate, x, y, done )
: if a predicate function returns a truthy value, invokex
; otherwise, invokey
.inherit( ctor, superCtor )
: implement prototypical inheritance by replacing the prototype of one constructor with the prototype of another constructor.nativeClass( value )
: determine the specification defined classification of an object.openURL( url )
: open a URL.parallel( files, [options,] clbk )
: execute scripts in parallel.parseJSON( str[, reviver] )
: parse a string as JSON.realmax( dtype )
: return the maximum finite value capable of being represented by a numeric real type.realmin( dtype )
: return the smallest positive normal value capable of being represented by a numeric real type.reFromString( str )
: create a regular expression from a regular expression string.safeintmax( dtype )
: return the maximum safe integer capable of being represented by a numeric real type.safeintmin( dtype )
: return the minimum safe integer capable of being represented by a numeric real type.sizeOf( dtype )
: return the size (in bytes) of the canonical binary representation of a specified numeric type.timeit( code, [options,] clbk )
: time a snippet.typemax( dtype )
: return the maximum value of a specified numeric type.typemin( dtype )
: return the minimum value of a specified numeric type.typeOf( value )
: determine a value's type.
var getKeys = require( 'object-keys' ).shim();
var utils = require( '@stdlib/utils' );
console.log( getKeys( utils ) );