@stdlib/utils
v0.3.3
Published
Standard utilities.
Downloads
79,501
Readme
Utils
Utilities.
Installation
npm install @stdlib/utils
Usage
var utils = require( '@stdlib/utils' );
utils
Namespace containing utilities.
var o = utils;
// returns {...}
The namespace has the following sub-namespaces:
- [
async
][@stdlib/utils/async]: async utilities.
Data Structures
- [
CircularBuffer( buffer )
][@stdlib/utils/circular-buffer]: circular buffer constructor. - [
CompactAdjacencyMatrix( N )
][@stdlib/utils/compact-adjacency-matrix]: compact adjacency matrix constructor. - [
DoublyLinkedList()
][@stdlib/utils/doubly-linked-list]: doubly linked list constructor. - [
FIFO()
][@stdlib/utils/fifo]: first-in-first-out (FIFO) queue. - [
LinkedList()
][@stdlib/utils/linked-list]: singly linked list. - [
namedtypedtuple( fields[, options] )
][@stdlib/utils/named-typed-tuple]: create a factory for generating named typed tuples. - [
Stack()
][@stdlib/utils/stack]: stack data structure.
Collections
- [
anyByRight( collection, predicate[, thisArg ] )
][@stdlib/utils/any-by-right]: test whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left. - [
anyBy( collection, predicate[, thisArg ] )
][@stdlib/utils/any-by]: test whether at least one element in a collection passes a test implemented by a predicate function. - [
any( collection )
][@stdlib/utils/any]: test whether at least one element in a collection is truthy. - [
append( collection1, collection2 )
][@stdlib/utils/append]: add elements from one collection to the end of another collection. - [
bifurcateBy( collection, [options,] predicate )
][@stdlib/utils/bifurcate-by]: split values into two groups according to a predicate function. - [
bifurcateIn( obj, [options,] predicate )
][@stdlib/utils/bifurcate-in]: split an object's own and inherited property values into two groups according to a predicate function. - [
bifurcateOwn( obj, [options,] predicate )
][@stdlib/utils/bifurcate-own]: split an object's own property values into two groups according to a predicate function. - [
bifurcate( collection, [options,] filter )
][@stdlib/utils/bifurcate]: split values into two groups. - [
countBy( collection, [options,] indicator )
][@stdlib/utils/count-by]: group values according to an indicator function and return group counts. - [
everyByRight( collection, predicate[, thisArg ] )
][@stdlib/utils/every-by-right]: test whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left. - [
everyBy( collection, predicate[, thisArg ] )
][@stdlib/utils/every-by]: test whether all elements in a collection pass a test implemented by a predicate function. - [
every( collection )
][@stdlib/utils/every]: test whether all elements in a collection are truthy. - [
forEachRight( collection, fcn[, thisArg ] )
][@stdlib/utils/for-each-right]: invoke a function for each element in a collection, iterating from the right to left. - [
forEach( collection, fcn[, thisArg ] )
][@stdlib/utils/for-each]: invoke a function for each element in a collection. - [
groupBy( collection, [options,] indicator )
][@stdlib/utils/group-by]: group values according to an indicator function. - [
groupIn( obj, [options,] indicator )
][@stdlib/utils/group-in]: group an object's own and inherited property values according to an indicator function. - [
groupOwn( obj, [options,] indicator )
][@stdlib/utils/group-own]: group an object's own property values according to an indicator function. - [
group( collection, [options,] groups )
][@stdlib/utils/group]: group values as arrays associated with distinct keys. - [
inmapRight( collection, fcn[, thisArg ] )
][@stdlib/utils/inmap-right]: invoke a function for each element in a collection and update the collection in-place, iterating from right to left. - [
inmap( collection, fcn[, thisArg ] )
][@stdlib/utils/inmap]: invoke a function for each element in a collection and update the collection in-place. - [
keyByRight( collection, fcn[, thisArg ] )
][@stdlib/utils/key-by-right]: 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. - [
keyBy( collection, fcn[, thisArg ] )
][@stdlib/utils/key-by]: convert a collection to an object whose keys are determined by a provided function and whose values are the collection values. - [
noneByRight( collection, predicate[, thisArg ] )
][@stdlib/utils/none-by-right]: test whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left. - [
noneBy( collection, predicate[, thisArg ] )
][@stdlib/utils/none-by]: test whether all elements in a collection fail a test implemented by a predicate function. - [
none( collection )
][@stdlib/utils/none]: test whether all elements in a collection are falsy. - [
pop( collection )
][@stdlib/utils/pop]: remove and return the last element of a collection. - [
prepend( collection1, collection2 )
][@stdlib/utils/prepend]: add elements from one collection to the beginning of another collection. - [
push( collection, ...items )
][@stdlib/utils/push]: add one or more elements to the end of a collection. - [
reduceRight( arr, initial, reducer[, thisArg ] )
][@stdlib/utils/reduce-right]: apply a function against an accumulator and each element in an array while iterating from right to left and return the accumulated result. - [
reduce( arr, initial, reducer[, thisArg ] )
][@stdlib/utils/reduce]: apply a function against an accumulator and each element in an array and return the accumulated result. - [
reduce2d( arr, initial, fcn[, thisArg] )
][@stdlib/utils/reduce2d]: reduce the number of dimensions by one of a two-dimensional nested array by applying a function against an accumulator and each element along the innermost dimension and returning the accumulation results as a one-dimensional array. - [
shift( collection )
][@stdlib/utils/shift]: remove and return the first element of a collection. - [
someByRight( collection, n, predicate[, thisArg ] )
][@stdlib/utils/some-by-right]: test whether a collection contains at leastn
elements which pass a test implemented by a predicate function, iterating from right to left. - [
someBy( collection, n, predicate[, thisArg ] )
][@stdlib/utils/some-by]: test whether a collection contains at leastn
elements which pass a test implemented by a predicate function. - [
some( collection, n )
][@stdlib/utils/some]: test whether a collection contains at leastn
elements which are truthy. - [
tabulateBy( collection[, options,] indicator )
][@stdlib/utils/tabulate-by]: generate a frequency table according to an indicator function. - [
tabulate( collection )
][@stdlib/utils/tabulate]: generate a frequency table. - [
unshift( collection, ...items )
][@stdlib/utils/unshift]: add one or more elements to the beginning of a collection. - [
untilEachRight( collection, predicate, fcn[, thisArg ] )
][@stdlib/utils/until-each-right]: until a test condition is true, invoke a function for each element in a collection, iterating from right to left. - [
untilEach( collection, predicate, fcn[, thisArg ] )
][@stdlib/utils/until-each]: until a test condition is true, invoke a function for each element in a collection. - [
whileEachRight( collection, predicate, fcn[, thisArg ] )
][@stdlib/utils/while-each-right]: while a test condition is true, invoke a function for each element in a collection, iterating from right to left. - [
whileEach( collection, predicate, fcn[, thisArg ] )
][@stdlib/utils/while-each]: while a test condition is true, invoke a function for each element in a collection.
Arrays
- [
deepPluck( arr, path[, options] )
][@stdlib/utils/deep-pluck]: extract a nested property value from each element of an object array. - [
find( arr, [opts,] clbk )
][@stdlib/utils/find]: find elements in an array-like object that satisfy a test condition. - [
flattenArray( arr[, options] )
][@stdlib/utils/flatten-array]: flatten an array. - [
objectFromEntries( entries )
][@stdlib/utils/from-entries]: create an object from key-value pairs. - [
indexOf( arr, searchElement[, fromIndex] )
][@stdlib/utils/index-of]: return the first index at which a given element can be found. - [
pluck( arr, prop[, options] )
][@stdlib/utils/pluck]: extract a property value from each element of an object array. - [
unzip( arr[, idx] )
][@stdlib/utils/unzip]: unzip a zipped array (i.e., a nested array of tuples). - [
zip( arr1, arr2,...[, opts] )
][@stdlib/utils/zip]: generate array tuples from input arrays.
Objects
- [
capitalizeKeys( obj )
][@stdlib/utils/capitalize-keys]: convert the first letter of each object key to uppercase. - [
commonKeys( obj1, obj2[, obj3[,...,objN]] )
][@stdlib/utils/common-keys]: return the common own property names of two or more objects. - [
deepGet( obj, path[, options] )
][@stdlib/utils/deep-get]: get a nested property value. - [
deepSet( obj, path, value[, options] )
][@stdlib/utils/deep-set]: set a nested property value. - [
setConfigurableReadOnlyAccessor( obj, prop, getter )
][@stdlib/utils/define-configurable-read-only-accessor]: define a configurable read-only accessor. - [
setConfigurableReadOnly( obj, prop, value )
][@stdlib/utils/define-configurable-read-only-property]: define a configurable read-only property. - [
setConfigurableReadWriteAccessor( obj, prop, getter, setter )
][@stdlib/utils/define-configurable-read-write-accessor]: define a configurable read-write accessor. - [
setConfigurableWriteOnlyAccessor( obj, prop, setter )
][@stdlib/utils/define-configurable-write-only-accessor]: define a configurable write-only accessor. - [
setMemoizedConfigurableReadOnly( obj, prop, fcn )
][@stdlib/utils/define-memoized-configurable-read-only-property]: define a configurable memoized read-only object property. - [
defineMemoizedProperty( obj, prop, descriptor )
][@stdlib/utils/define-memoized-property]: define a memoized object property. - [
setMemoizedReadOnly( obj, prop, fcn )
][@stdlib/utils/define-memoized-read-only-property]: define a memoized read-only object property. - [
setNonEnumerableProperty( obj, prop, value )
][@stdlib/utils/define-nonenumerable-property]: define a non-enumerable property. - [
setNonEnumerableReadOnlyAccessor( obj, prop, getter )
][@stdlib/utils/define-nonenumerable-read-only-accessor]: define a non-enumerable read-only accessor. - [
setNonEnumerableReadOnly( obj, prop, value )
][@stdlib/utils/define-nonenumerable-read-only-property]: define a non-enumerable read-only property. - [
setNonEnumerableReadWriteAccessor( obj, prop, getter, setter )
][@stdlib/utils/define-nonenumerable-read-write-accessor]: define a non-enumerable read-write accessor. - [
setNonEnumerableWriteOnlyAccessor( obj, prop, setter )
][@stdlib/utils/define-nonenumerable-write-only-accessor]: define a non-enumerable write-only accessor. - [
defineProperties( obj, properties )
][@stdlib/utils/define-properties]: define (and/or modify) object properties. - [
defineProperty( obj, prop, descriptor )
][@stdlib/utils/define-property]: define (or modify) an object property. - [
setReadOnlyAccessor( obj, prop, getter )
][@stdlib/utils/define-read-only-accessor]: define a read-only accessor. - [
setReadOnly( obj, prop, value )
][@stdlib/utils/define-read-only-property]: define a read-only property. - [
setReadWriteAccessor( obj, prop, getter, setter )
][@stdlib/utils/define-read-write-accessor]: define a read-write accessor. - [
setWriteOnlyAccessor( obj, prop, setter )
][@stdlib/utils/define-write-only-accessor]: define a write-only accessor. - [
objectEntriesIn( obj )
][@stdlib/utils/entries-in]: return an array of an object's own and inherited enumerable property key-value pairs. - [
objectEntries( obj )
][@stdlib/utils/entries]: return an array of an object's own enumerable property key-value pairs. - [
enumerablePropertiesIn( obj )
][@stdlib/utils/enumerable-properties-in]: return an array of an object's own and inherited enumerable property names and symbols. - [
enumerableProperties( obj )
][@stdlib/utils/enumerable-properties]: return an array of an object's own enumerable property names and symbols. - [
enumerablePropertySymbolsIn( obj )
][@stdlib/utils/enumerable-property-symbols-in]: return an array of an object's own and inherited enumerable symbol properties. - [
enumerablePropertySymbols( obj )
][@stdlib/utils/enumerable-property-symbols]: return an array of an object's own enumerable symbol properties. - [
flattenObject( obj[, options] )
][@stdlib/utils/flatten-object]: flatten an object. - [
forIn( obj, fcn[, thisArg ] )
][@stdlib/utils/for-in]: invoke a function for each own and inherited enumerable property of an object. - [
forOwn( obj, fcn[, thisArg ] )
][@stdlib/utils/for-own]: invoke a function for each own enumerable property of an object. - [
getPrototypeOf( value )
][@stdlib/utils/get-prototype-of]: return the prototype of a provided object. - [
inheritedEnumerableProperties( obj[, level] )
][@stdlib/utils/inherited-enumerable-properties]: return an array of an object's inherited enumerable property names and symbols. - [
inheritedEnumerablePropertySymbols( obj[, level] )
][@stdlib/utils/inherited-enumerable-property-symbols]: return an array of an object's inherited enumerable symbol properties. - [
inheritedKeys( obj[, level] )
][@stdlib/utils/inherited-keys]: return an array of an object's inherited enumerable property names. - [
inheritedNonEnumerableProperties( obj[, level] )
][@stdlib/utils/inherited-nonenumerable-properties]: return an array of an object's inherited non-enumerable property names and symbols. - [
inheritedNonEnumerablePropertyNames( obj[, level] )
][@stdlib/utils/inherited-nonenumerable-property-names]: return an array of an object's inherited non-enumerable property names. - [
inheritedNonEnumerablePropertySymbols( obj[, level] )
][@stdlib/utils/inherited-nonenumerable-property-symbols]: return an array of an object's inherited non-enumerable symbol properties. - [
inheritedProperties( obj[, level] )
][@stdlib/utils/inherited-properties]: return an array of an object's inherited property names and symbols. - [
inheritedPropertyDescriptor( obj, property[, level] )
][@stdlib/utils/inherited-property-descriptor]: return a property descriptor for an object's inherited property. - [
inheritedPropertyDescriptors( obj[, level] )
][@stdlib/utils/inherited-property-descriptors]: return an object's inherited property descriptors. - [
inheritedPropertyNames( obj[, level] )
][@stdlib/utils/inherited-property-names]: return an array of an object's inherited enumerable and non-enumerable property names. - [
inheritedPropertySymbols( obj[, level] )
][@stdlib/utils/inherited-property-symbols]: return an array of an object's inherited symbol properties. - [
inheritedWritableProperties( obj[, level] )
][@stdlib/utils/inherited-writable-properties]: return an array of an object's inherited writable property names and symbols. - [
inheritedWritablePropertyNames( obj[, level] )
][@stdlib/utils/inherited-writable-property-names]: return an array of an object's inherited writable property names. - [
inheritedWritablePropertySymbols( obj[, level] )
][@stdlib/utils/inherited-writable-property-symbols]: return an array of an object's inherited writable symbol properties. - [
keysIn( obj )
][@stdlib/utils/keys-in]: return an array of an object's own and inherited enumerable property names. - [
lowercaseKeys( obj )
][@stdlib/utils/lowercase-keys]: convert each object key to lowercase. - [
mapKeys( obj, transform )
][@stdlib/utils/map-keys]: map keys from one object to a new object having the same values. - [
mapValues( obj, transform )
][@stdlib/utils/map-values]: map values from one object to a new object having the same keys. - [
merge( target, source1[, source2[,...,sourceN]] )
][@stdlib/utils/merge]: merge and extend objects. - [
moveProperty( source, prop, target )
][@stdlib/utils/move-property]: move a property from one object to another object. - [
nonEnumerablePropertiesIn( obj )
][@stdlib/utils/nonenumerable-properties-in]: return an array of an object's own and inherited non-enumerable property names and symbols. - [
nonEnumerableProperties( obj )
][@stdlib/utils/nonenumerable-properties]: return an array of an object's own non-enumerable property names and symbols. - [
nonEnumerablePropertyNamesIn( obj )
][@stdlib/utils/nonenumerable-property-names-in]: return an array of an object's own and inherited non-enumerable property names. - [
nonEnumerablePropertyNames( obj )
][@stdlib/utils/nonenumerable-property-names]: return an array of an object's own non-enumerable property names. - [
nonEnumerablePropertySymbolsIn( obj )
][@stdlib/utils/nonenumerable-property-symbols-in]: return an array of an object's own and inherited non-enumerable symbol properties. - [
nonEnumerablePropertySymbols( obj )
][@stdlib/utils/nonenumerable-property-symbols]: return an array of an object's own non-enumerable symbol properties. - [
nonIndexKeys( obj )
][@stdlib/utils/nonindex-keys]: return an array of an object's own enumerable property names which are not integer indices. - [
objectInverseBy( obj, [options,] transform )
][@stdlib/utils/object-inverse-by]: invert an object, such that keys become values and values become keys, according to a transform function. - [
objectInverse( obj[, options] )
][@stdlib/utils/object-inverse]: invert an object, such that keys become values and values become keys. - [
omitBy( obj, predicate )
][@stdlib/utils/omit-by]: return a partial object copy excluding properties for which a predicate (function) returns a truthy value. - [
omit( obj, keys )
][@stdlib/utils/omit]: return a partial object copy excluding specified keys. - [
pickArguments( fcn, indices[, thisArg] )
][@stdlib/utils/pick-arguments]: create a function that invokes a provided function with specified arguments. - [
pickBy( obj, predicate )
][@stdlib/utils/pick-by]: return a partial object copy containing properties for which a predicate (function) returns a truthy value. - [
pick( obj, keys )
][@stdlib/utils/pick]: return a partial object copy containing only specified keys. - [
propertiesIn( obj )
][@stdlib/utils/properties-in]: return an array of an object's own and inherited property names and symbols. - [
properties( obj )
][@stdlib/utils/properties]: return an array of an object's own enumerable and non-enumerable property names and symbols. - [
propertyDescriptorIn( obj, property )
][@stdlib/utils/property-descriptor-in]: return a property descriptor for an object's own or inherited property. - [
propertyDescriptor( obj, property )
][@stdlib/utils/property-descriptor]: return a property descriptor for an object's own property. - [
propertyDescriptorsIn( obj )
][@stdlib/utils/property-descriptors-in]: return an object's own and inherited property descriptors. - [
propertyDescriptors( obj )
][@stdlib/utils/property-descriptors]: return an object's own property descriptors. - [
propertyNamesIn( obj )
][@stdlib/utils/property-names-in]: return an array of an object's own and inherited enumerable and non-enumerable property names. - [
propertyNames( obj )
][@stdlib/utils/property-names]: return an array of an object's own enumerable and non-enumerable property names. - [
propertySymbolsIn( obj )
][@stdlib/utils/property-symbols-in]: return an array of an object's own and inherited symbol properties. - [
propertySymbols( obj )
][@stdlib/utils/property-symbols]: return an array of an object's own symbol properties. - [
uncapitalizeKeys( obj )
][@stdlib/utils/uncapitalize-keys]: convert the first letter of each object key to lowercase. - [
uppercaseKeys( obj )
][@stdlib/utils/uppercase-keys]: convert each object key to uppercase. - [
objectValuesIn( obj )
][@stdlib/utils/values-in]: return an array of an object's own and inherited enumerable property values. - [
objectValues( obj )
][@stdlib/utils/values]: return an array of an object's own enumerable property values. - [
writablePropertiesIn( obj )
][@stdlib/utils/writable-properties-in]: return an array of an object's own and inherited writable property names and symbols. - [
writableProperties( obj )
][@stdlib/utils/writable-properties]: return an array of an object's own writable property names and symbols. - [
writablePropertyNamesIn( obj )
][@stdlib/utils/writable-property-names-in]: return an array of an object's own and inherited writable property names. - [
writablePropertyNames( obj )
][@stdlib/utils/writable-property-names]: return an array of an object's own writable property names. - [
writablePropertySymbolsIn( obj )
][@stdlib/utils/writable-property-symbols-in]: return an array of an object's own and inherited writable symbol properties. - [
writablePropertySymbols( obj )
][@stdlib/utils/writable-property-symbols]: return an array of an object's own writable symbol properties.
Functions
argumentFunction( idx )
: create an argument function.compose( ...fcn )
: function composition.constantFunction( x )
: constant function.curryRight( fcn[, arity][, thisArg] )
: transform a function into a sequence of functions each accepting a single argument.curry( fcn[, arity][, thisArg] )
: transform a function into a sequence of functions each accepting a single argument.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.doUntilEach( collection, fcn, predicate[, thisArg ] )
: until a test condition is true, invoke a function for each element in a collection.doUntil( fcn, predicate[, thisArg ] )
: invoke a function until a test condition is true.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.doWhileEach( collection, fcn, predicate[, thisArg ] )
: while a test condition is true, invoke a function for each element in a collection.doWhile( fcn, predicate[, thisArg ] )
: invoke a function while a test condition is true.filterArguments( fcn, predicate[, thisArg] )
: create a function that invokes a provided function according to a predicate function.functionName( fcn )
: determine a function's name.functionSequence( ...fcn )
: function sequence.identity( x )
: identity function.mapArguments( fcn, clbk[, thisArg] )
: create a function that applies arguments to a provided function after transforming arguments according to a callback function.mapFun( fcn, n[, thisArg ] )
: invoke a functionn
times and return an array of accumulated function return values.maskArguments( fcn, mask[, thisArg] )
: create a function that invokes a provided function according to an argument mask.memoize( fcn[, hashFunction] )
: memoize a function.noop()
: function which does nothing.papplyRight( fcn[, ...args] )
: partially apply function arguments from the right.papply( fcn[, ...args] )
: partially apply function arguments.rejectArguments( fcn, predicate[, thisArg] )
: create a function that invokes a provided function according to a predicate function.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.uncurryRight( fcn[, arity][, thisArg] )
: transform a curried function into a function invoked with multiple arguments.uncurry( 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.whilst( predicate, fcn[, thisArg ] )
: invoke a function while a test condition is true.
Error Handling
trycatch( x, y )
: if a function does not throw, return the function return value; otherwise, returny
.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.
General Utilities
commonKeysIn( obj1, obj2[, obj3[,...,objN]] )
: return the common own and inherited property names of two or more objects.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.decorateAfter( fcn, arity, after[, thisArg] )
: decorate a provided function such that the function's return value is provided as an argument to another function.dirname( path )
: return a directory name.dsv
: utilities for working with data formatted as delimiter-separated values (DSV).rescape( str )
: escape a regular expression string or pattern.evil( str )
: alias foreval
global.extname( filename )
: return a filename extension.getGlobal( [codegen] )
: return the global object.ifelse( bool, x, y )
: if a condition is truthy, returnx
; otherwise, returny
.ifthen( bool, x, y )
: if a condition is truthy, invokex
; otherwise, invokey
.inherit( ctor, superCtor )
: implement prototypical inheritance by replacing the prototype of one constructor with the prototype of another constructor.objectKeys( obj )
: return an array of an object's own enumerable property names.mapReduceRight( arr, initial, mapper, reducer[, thisArg ] )
: perform a single-pass map-reduce operation against each element in an array while iterating from right to left and return the accumulated result.mapReduce( arr, initial, mapper, reducer[, thisArg ] )
: perform a single-pass map-reduce operation against each element in an array and return the accumulated result.mapRight( arr, fcn[, thisArg] )
: apply a function to each element in an array and assign the result to an element in an output array, iterating from right to left.map( arr, fcn[, thisArg] )
: apply a function to each element in an array and assign the result to an element in an output array.map2Right( x, y, fcn[, thisArg] )
: apply a function to elements in two input arrays while iterating from right to left and assign the results to an output array.map2( x, y, fcn[, thisArg] )
: apply a function to elements in two input arrays and assign the results to an output array.map2d( arr, fcn[, thisArg] )
: apply a function to each nested element in an array of arrays and assign the result to a nested element in a new array of arrays.map3d( arr, fcn[, thisArg] )
: apply a function to each nested element in a three-dimensional nested array and assign the result to a nested element in a new three-dimensional nested array.map4d( arr, fcn[, thisArg] )
: apply a function to each nested element in a four-dimensional nested array and assign the result to a nested element in a new four-dimensional nested array.map5d( arr, fcn[, thisArg] )
: apply a function to each nested element in a five-dimensional nested array and assign the result to a nested element in a new five-dimensional nested array.naryFunction( fcn, arity[, thisArg] )
: create a function that invokes a provided function with a specified number of arguments.nativeClass( value )
: determine the specification defined classification of an object.nextTick( clbk[, ...args] )
: add a callback to the "next tick queue".openURL()
: 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.thunk( fcn[, ...args] )
: generate a thunk.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.
Examples
var objectKeys = require( '@stdlib/utils/keys' );
var utils = require( '@stdlib/utils' );
console.log( objectKeys( utils ) );
Notice
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
Community
License
See LICENSE.
Copyright
Copyright © 2016-2024. The Stdlib Authors.