Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@naturalcycles/js-lib

Package Overview
Dependencies
Maintainers
3
Versions
525
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@naturalcycles/js-lib - npm Package Compare versions

Comparing version 8.2.1 to 8.3.0

dist-esm/util/deepEquals.js

7

CHANGELOG.md

@@ -0,1 +1,8 @@

# [8.3.0](https://github.com/NaturalCycles/js-lib/compare/v8.2.1...v8.3.0) (2019-08-01)
### Features
* proper/faster deepEquals implementation ([0412d7f](https://github.com/NaturalCycles/js-lib/commit/0412d7f))
## [8.2.1](https://github.com/NaturalCycles/js-lib/compare/v8.2.0...v8.2.1) (2019-07-18)

@@ -2,0 +9,0 @@

3

dist-esm/index.js

@@ -8,4 +8,5 @@ import { getArgsSignature } from './decorators/decorator.util';

import { _chunk, _flatten, _flattenDeep, _range, _uniq, _uniqBy, by } from './util/array.util';
import { deepEquals } from './util/deepEquals';
import { memoFn } from './util/memoFn';
import { _get, _has, _invert, _merge, _omit, _pick, _set, _unset, deepCopy, deepEquals, deepTrim, filterEmptyStringValues, filterFalsyValues, filterObject, filterUndefinedValues, getKeyByValue, invertMap, isEmptyObject, isObject, mask, objectNullValuesToUndefined, sortObjectDeep, transformValues, } from './util/object.util';
import { _get, _has, _invert, _merge, _omit, _pick, _set, _unset, deepCopy, deepTrim, filterEmptyStringValues, filterFalsyValues, filterObject, filterUndefinedValues, getKeyByValue, invertMap, isEmptyObject, isObject, mask, objectNullValuesToUndefined, sortObjectDeep, transformValues, } from './util/object.util';
import { randomInt } from './util/random.util';

@@ -12,0 +13,0 @@ import { loadScript } from './util/script.util';

@@ -82,5 +82,2 @@ /**

}
export function deepEquals(a, b) {
return JSON.stringify(sortObjectDeep(a)) === JSON.stringify(sortObjectDeep(b));
}
/**

@@ -87,0 +84,0 @@ * Deep copy object (by json parse/stringify).

@@ -11,4 +11,5 @@ import { getArgsSignature } from './decorators/decorator.util';

import { _chunk, _flatten, _flattenDeep, _range, _uniq, _uniqBy, by } from './util/array.util';
import { deepEquals } from './util/deepEquals';
import { memoFn } from './util/memoFn';
import { _get, _has, _invert, _merge, _omit, _pick, _set, _unset, deepCopy, deepEquals, deepTrim, filterEmptyStringValues, filterFalsyValues, filterObject, filterUndefinedValues, getKeyByValue, invertMap, isEmptyObject, isObject, mask, objectNullValuesToUndefined, sortObjectDeep, transformValues } from './util/object.util';
import { _get, _has, _invert, _merge, _omit, _pick, _set, _unset, deepCopy, deepTrim, filterEmptyStringValues, filterFalsyValues, filterObject, filterUndefinedValues, getKeyByValue, invertMap, isEmptyObject, isObject, mask, objectNullValuesToUndefined, sortObjectDeep, transformValues } from './util/object.util';
import { randomInt } from './util/random.util';

@@ -15,0 +16,0 @@ import { loadScript } from './util/script.util';

@@ -30,2 +30,4 @@ "use strict";

exports.by = array_util_1.by;
const deepEquals_1 = require("./util/deepEquals");
exports.deepEquals = deepEquals_1.deepEquals;
const memoFn_1 = require("./util/memoFn");

@@ -43,3 +45,2 @@ exports.memoFn = memoFn_1.memoFn;

exports.deepCopy = object_util_1.deepCopy;
exports.deepEquals = object_util_1.deepEquals;
exports.deepTrim = object_util_1.deepTrim;

@@ -46,0 +47,0 @@ exports.filterEmptyStringValues = object_util_1.filterEmptyStringValues;

@@ -37,3 +37,2 @@ import { Except } from 'type-fest';

export declare function objectNullValuesToUndefined<T>(obj: T, mutate?: boolean): T;
export declare function deepEquals(a: object, b: object): boolean;
/**

@@ -40,0 +39,0 @@ * Deep copy object (by json parse/stringify).

@@ -93,6 +93,2 @@ "use strict";

exports.objectNullValuesToUndefined = objectNullValuesToUndefined;
function deepEquals(a, b) {
return JSON.stringify(sortObjectDeep(a)) === JSON.stringify(sortObjectDeep(b));
}
exports.deepEquals = deepEquals;
/**

@@ -99,0 +95,0 @@ * Deep copy object (by json parse/stringify).

{
"name": "@naturalcycles/js-lib",
"version": "8.2.1",
"version": "8.3.0",
"scripts": {

@@ -10,3 +10,5 @@ "build": "del ./dist && tsc",

},
"dependencies": {},
"dependencies": {
"type-fest": "^0.6.0"
},
"devDependencies": {

@@ -21,3 +23,2 @@ "@naturalcycles/dev-lib": "^7.0.0",

"jest": "^24.1.0",
"type-fest": "^0.6.0",
"weak": "^1.0.1"

@@ -39,5 +40,5 @@ },

},
"description": "",
"description": "Standard library for universal (browser + Node.js) javascript",
"author": "Natural Cycles Team",
"license": "MIT"
}

@@ -6,2 +6,3 @@ ## @naturalcycles/js-lib

[![npm](https://img.shields.io/npm/v/@naturalcycles/js-lib/latest.svg)](https://www.npmjs.com/package/@naturalcycles/js-lib)
[![min.gz size](https://badgen.net/bundlephobia/minzip/@naturalcycles/js-lib)](https://bundlephobia.com/result?p=@naturalcycles/js-lib)
[![](https://circleci.com/gh/NaturalCycles/js-lib.svg?style=shield&circle-token=cbb20b471eb9c1d5ed975e28c2a79a45671d78ea)](https://circleci.com/gh/NaturalCycles/js-lib)

@@ -36,7 +37,12 @@ [![Maintainability](https://api.codeclimate.com/v1/badges/c2dc8d53bd79f79b1d8b/maintainability)](https://codeclimate.com/github/NaturalCycles/js-lib/maintainability)

- Only **universal** code that works equally good in the browser and on the server. Otherwise - there are other libs specifically for browser and node.
- Only **universal** code that works equally good in the browser and on the server. Otherwise -
there are other libs specifically for browser and node.
- Only battle-tested code with solid proven APIs that are not supposed to change.
- Only fully unit-tested code with coverage very close to 100%. All the branches should absolutely be tested.
- Only fully unit-tested code with coverage very close to 100%. All the branches should absolutely
be tested.
- Only generic and broad purpose functions, no domain or project-specific code.
- Library- and framework-agnostic, only based on standard JS or TypeScript apis. There are few exceptions for extremely popular dependencies, that will go as `peerDependencies` in this project, in order for the consuming project to have control over the version of each dependency (in their `yarn.lock`).
- Library- and framework-agnostic, only based on standard JS or TypeScript apis. There are few
exceptions for extremely popular dependencies, that will go as `peerDependencies` in this project,
in order for the consuming project to have control over the version of each dependency (in their
`yarn.lock`).

@@ -43,0 +49,0 @@ # Packaging

@@ -27,2 +27,3 @@ import { getArgsSignature } from './decorators/decorator.util'

import { _chunk, _flatten, _flattenDeep, _range, _uniq, _uniqBy, by } from './util/array.util'
import { deepEquals } from './util/deepEquals'
import { memoFn } from './util/memoFn'

@@ -39,3 +40,2 @@ import {

deepCopy,
deepEquals,
deepTrim,

@@ -42,0 +42,0 @@ filterEmptyStringValues,

@@ -119,6 +119,2 @@ import { Except } from 'type-fest'

export function deepEquals (a: object, b: object): boolean {
return JSON.stringify(sortObjectDeep(a)) === JSON.stringify(sortObjectDeep(b))
}
/**

@@ -125,0 +121,0 @@ * Deep copy object (by json parse/stringify).

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc