Collection of fastest JavaScript algorithms.
npm install fast-afCurated collection of fastest JavaScript algorithms.
- extend()
- shallowEqual()
- deepEqual()
- stableStringify()
extend()Extends arbitrary number object (similar how Object.assign() works).
``js
import {extend} from 'fast-af/extend';
extend(a, b, {foo: 'bar'});
`
Shallow compares two objects for equality.
`js
import {shallowEqual} from 'fast-af/shallowEqual';
const isEqual = shallowEqual({foo: 'bar'}, {foo: 'bar'});
`
Compares recursively JavaScript objects for equality.
`js
import {deepEqual} from 'fast-af/deepEqual';
const isEqual = deepEqual({foo: 'bar'}, {foo: 'bar'});
`
Predictably stringifies plain JavaScript objects.
`js
import {stableStringify} from 'fast-af/stableStringify';
const str = stableStringify({foo: 'bar'});
``