Comparing version 1.0.1 to 1.1.0
@@ -11,5 +11,15 @@ function copy(obj) { | ||
case Date: | ||
case Map: | ||
case Set: | ||
case RegExp: | ||
clone = new Constructor(obj); | ||
break; | ||
case Promise: | ||
clone = new Constructor(function (resolve, reject) { | ||
resolve(obj.then); | ||
reject(obj.catch); | ||
}); | ||
break; | ||
// case WeakMap: | ||
// case WeakSet: | ||
default: | ||
@@ -31,2 +41,4 @@ clone = new Constructor(); | ||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); | ||
// Check for objects that allow string comparisons. | ||
@@ -37,2 +49,45 @@ function checkInstance(a, b) { | ||
// Check if a is a Map or a Set. | ||
function isMapSet(a) { | ||
return a.constructor === Map || a.constructor === Set; | ||
} | ||
// Compare Maps and Sets. | ||
function checkMapSet(a, b) { | ||
if (a.size !== b.size) return false; | ||
var _iteratorNormalCompletion = true; | ||
var _didIteratorError = false; | ||
var _iteratorError = undefined; | ||
try { | ||
for (var _iterator = b[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { | ||
var item = _step.value; | ||
if (a.constructor === Map) { | ||
var _item = _slicedToArray(item, 2), | ||
key = _item[0], | ||
val = _item[1]; | ||
if (!a.has(key)) return false; | ||
if (a.get(key) !== val) return false; | ||
} else if (!a.has(item)) return false; | ||
} | ||
} catch (err) { | ||
_didIteratorError = true; | ||
_iteratorError = err; | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion && _iterator.return) { | ||
_iterator.return(); | ||
} | ||
} finally { | ||
if (_didIteratorError) { | ||
throw _iteratorError; | ||
} | ||
} | ||
} | ||
return true; | ||
} | ||
function isPrototype(a, b) { | ||
@@ -58,2 +113,3 @@ return Object.isPrototypeOf.call(a, b) || Object.isPrototypeOf.call(b, a); | ||
if (a.constructor !== b.constructor) return false; | ||
if (isMapSet(a) && !checkMapSet(a, b)) return false; | ||
if (a.prototype !== b.prototype) return false; | ||
@@ -69,3 +125,4 @@ if (Object.keys(a).length !== Object.keys(b).length) return false; | ||
var constructors = [Date, RegExp, String, Number]; | ||
var constructors = [Date, RegExp, String, Number, Map, WeakMap, Set, WeakSet, Promise]; | ||
function merge(a, b) { | ||
@@ -84,3 +141,4 @@ if (!(a instanceof Object) || !(b instanceof Object)) { | ||
a[property] = null; | ||
} else if (constructors.indexOf(newProp.constructor) !== -1) { | ||
// Node requires the ._c for Sets and Maps. | ||
} else if (constructors.indexOf(newProp.constructor) !== -1 || !!newProp._c) { | ||
a[property] = newProp; | ||
@@ -87,0 +145,0 @@ } else if (newProp instanceof Object && oldProp instanceof Object) { |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.helms=e.helms||{})}(this,function(e){"use strict";function t(e){var n=void 0;if(!(e instanceof Object))return e;var r=e.constructor;switch(r){case Date:case RegExp:n=new r(e);break;default:n=new r}for(var o in e)Object.hasOwnProperty.call(e,o)&&(n[o]=t(e[o]));return n}function n(e,t){return e instanceof Date&&t instanceof Date||e instanceof RegExp&&t instanceof RegExp||e instanceof String&&t instanceof String||e instanceof Number&&t instanceof Number}function r(e,t){return Object.isPrototypeOf.call(e,t)||Object.isPrototypeOf.call(t,e)}function o(e,t){if(e===t)return!0;if(null===e||null===t)return!1;var i="undefined"==typeof e?"undefined":f(e);if(i!==("undefined"==typeof t?"undefined":f(t)))return!1;if("number"===i&&isNaN(e)&&isNaN(t))return!0;if("object"!==i)return e===t;if(n(e,t))return e.toString()===t.toString();if(r(e,t))return!1;if(e.constructor!==t.constructor)return!1;if(e.prototype!==t.prototype)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var c in e)if(!o(e[c],t[c]))return!1;return!0}function i(e,t){if(!(e instanceof Object&&t instanceof Object))throw new TypeError("You can only merge objects.");for(var n in t)if(Object.hasOwnProperty.call(t,n)){var r=e[n],f=t[n];o(r,f)||(void 0===f?delete e[n]:null===f?e[n]=null:c.indexOf(f.constructor)!==-1?e[n]=f:f instanceof Object&&r instanceof Object?i(r,f):e[n]=f)}}var f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=[Date,RegExp,String,Number];e.copy=t,e.compare=o,e.merge=i,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.helms=e.helms||{})}(this,function(e){"use strict";function t(e){var r=void 0;if(!(e instanceof Object))return e;var n=e.constructor;switch(n){case Date:case Map:case Set:case RegExp:r=new n(e);break;case Promise:r=new n(function(t,r){t(e.then),r(e.catch)});break;default:r=new n}for(var o in e)Object.hasOwnProperty.call(e,o)&&(r[o]=t(e[o]));return r}function r(e,t){return e instanceof Date&&t instanceof Date||e instanceof RegExp&&t instanceof RegExp||e instanceof String&&t instanceof String||e instanceof Number&&t instanceof Number}function n(e){return e.constructor===Map||e.constructor===Set}function o(e,t){if(e.size!==t.size)return!1;var r=!0,n=!1,o=void 0;try{for(var i,f=t[Symbol.iterator]();!(r=(i=f.next()).done);r=!0){var c=i.value;if(e.constructor===Map){var u=a(c,2),s=u[0],l=u[1];if(!e.has(s))return!1;if(e.get(s)!==l)return!1}else if(!e.has(c))return!1}}catch(e){n=!0,o=e}finally{try{!r&&f.return&&f.return()}finally{if(n)throw o}}return!0}function i(e,t){return Object.isPrototypeOf.call(e,t)||Object.isPrototypeOf.call(t,e)}function f(e,t){if(e===t)return!0;if(null===e||null===t)return!1;var c="undefined"==typeof e?"undefined":u(e);if(c!==("undefined"==typeof t?"undefined":u(t)))return!1;if("number"===c&&isNaN(e)&&isNaN(t))return!0;if("object"!==c)return e===t;if(r(e,t))return e.toString()===t.toString();if(i(e,t))return!1;if(e.constructor!==t.constructor)return!1;if(n(e)&&!o(e,t))return!1;if(e.prototype!==t.prototype)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var a in e)if(!f(e[a],t[a]))return!1;return!0}function c(e,t){if(!(e instanceof Object&&t instanceof Object))throw new TypeError("You can only merge objects.");for(var r in t)if(Object.hasOwnProperty.call(t,r)){var n=e[r],o=t[r];f(n,o)||(void 0===o?delete e[r]:null===o?e[r]=null:s.indexOf(o.constructor)!==-1||o._c?e[r]=o:o instanceof Object&&n instanceof Object?c(n,o):e[r]=o)}}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var f,c=e[Symbol.iterator]();!(n=(f=c.next()).done)&&(r.push(f.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&c.return&&c.return()}finally{if(o)throw i}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=[Date,RegExp,String,Number,Map,WeakMap,Set,WeakSet,Promise];e.copy=t,e.compare=f,e.merge=c,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=lib.js.map |
@@ -9,2 +9,20 @@ // Check for objects that allow string comparisons. | ||
// Check if a is a Map or a Set. | ||
function isMapSet(a) { | ||
return a.constructor === Map || a.constructor === Set; | ||
} | ||
// Compare Maps and Sets. | ||
function checkMapSet(a, b) { | ||
if (a.size !== b.size) return false; | ||
for (const item of b) { | ||
if (a.constructor === Map) { | ||
const [key, val] = item; | ||
if (!a.has(key)) return false; | ||
if (a.get(key) !== val) return false; | ||
} else if (!a.has(item)) return false; | ||
} | ||
return true; | ||
} | ||
function isPrototype(a, b) { | ||
@@ -30,2 +48,3 @@ return Object.isPrototypeOf.call(a, b) || Object.isPrototypeOf.call(b, a); | ||
if (a.constructor !== b.constructor) return false; | ||
if (isMapSet(a) && !checkMapSet(a, b)) return false; | ||
if (a.prototype !== b.prototype) return false; | ||
@@ -32,0 +51,0 @@ if (Object.keys(a).length !== Object.keys(b).length) return false; |
@@ -11,5 +11,15 @@ function copy(obj) { | ||
case Date: | ||
case Map: | ||
case Set: | ||
case RegExp: | ||
clone = new Constructor(obj); | ||
break; | ||
case Promise: | ||
clone = new Constructor((resolve, reject) => { | ||
resolve(obj.then); | ||
reject(obj.catch); | ||
}); | ||
break; | ||
// case WeakMap: | ||
// case WeakSet: | ||
default: | ||
@@ -16,0 +26,0 @@ clone = new Constructor(); |
import compare from './compare'; | ||
const constructors = [Date, RegExp, String, Number]; | ||
const constructors = [Date, RegExp, String, Number, Map, WeakMap, Set, WeakSet, Promise]; | ||
function merge(a, b) { | ||
@@ -17,3 +18,4 @@ if (!(a instanceof Object) || !(b instanceof Object)) { | ||
a[property] = null; | ||
} else if (constructors.indexOf(newProp.constructor) !== -1) { | ||
// Node requires the ._c for Sets and Maps. | ||
} else if (constructors.indexOf(newProp.constructor) !== -1 || !!newProp._c) { | ||
a[property] = newProp; | ||
@@ -20,0 +22,0 @@ } else if (newProp instanceof Object && oldProp instanceof Object) { |
{ | ||
"name": "helms", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Deep javascript object operation.", | ||
@@ -34,2 +34,5 @@ "main": "dist/lib.js", | ||
}, | ||
"engines": { | ||
"node": ">= 0.11" | ||
}, | ||
"ava": { | ||
@@ -36,0 +39,0 @@ "tap": true, |
# Helms | ||
-------- | ||
@@ -4,0 +3,0 @@ A *deep* object copy/compare/merge library. |
import test from 'ava'; | ||
import { compare } from '../lib'; | ||
import data from './data'; | ||
import createData from './data'; | ||
data[4] = Object.assign({}, data[3], { | ||
registered: new Date(), | ||
regexp: /test/, | ||
}); | ||
data[4].friends[2].name = 'Changed'; | ||
const data = []; | ||
for (let i = 0; i < 5; i++) { | ||
data[i] = createData(); | ||
} | ||
data[1].colors.add('purple'); | ||
data[2].friends.delete(2); | ||
data[3].registered = new Date(); | ||
data[4].regexp = /different/; | ||
test('should return true on similar objects', (t) => { | ||
t.plan(5); | ||
t.true(compare(data[0], data[0])); | ||
t.true(compare(data[1], data[1])); | ||
t.true(compare(data[2], data[2])); | ||
t.true(compare(data[3], data[3])); | ||
t.true(compare(data[4], data[4])); | ||
t.plan(1); | ||
t.true(compare(data[0], createData())); | ||
}); | ||
@@ -20,0 +19,0 @@ |
import test from 'ava'; | ||
import { copy } from '../lib'; | ||
import data from './data'; | ||
import createData from './data'; | ||
const source = data[0]; | ||
const source = createData(); | ||
const copied = copy(source); | ||
@@ -12,3 +12,3 @@ | ||
t.is(copied.id, source.id); | ||
t.is(copied.friends[0].name, source.friends[0].name); | ||
t.is(copied.friends.get(0), source.friends.get(0)); | ||
t.is(copied.registered.toString(), source.registered.toString()); | ||
@@ -21,8 +21,10 @@ t.is(copied.regexp.toString(), source.regexp.toString()); | ||
source.id = 'test'; | ||
source.friends[0] = source.friends[1]; | ||
source.friends.set(0, 'Steve Urkel'); | ||
source.colors.delete('blue'); | ||
source.registered = new Date(); | ||
source.regexp = /newTest/; | ||
t.plan(5); | ||
t.not(copied.id, source.xid); | ||
t.not(copied.friends[0].name, source.friends[0].name); | ||
t.plan(6); | ||
t.not(copied.id, source.id); | ||
t.not(copied.friends.get(0), source.friends.get(0)); | ||
t.not(copied.colors.has('blue'), source.colors.has('blue')); | ||
t.not(copied.registered.toString(), source.registered.toString()); | ||
@@ -29,0 +31,0 @@ t.not(copied.regexp.toString(), source.regexp.toString()); |
220
test/data.js
@@ -1,193 +0,35 @@ | ||
/* eslint quotes: 0, comma-dangle: 0, quote-props: 0, no-underscore-dangle: 0 */ | ||
const data = [ | ||
{ | ||
"_id": "582655635966501fee7e5aef", | ||
"index": 0, | ||
"guid": "2e668cbe-d709-46c1-b97c-0b09a5f42fbb", | ||
"isActive": true, | ||
"balance": "$1,325.18", | ||
"picture": "http://placehold.it/32x32", | ||
"age": 31, | ||
"eyeColor": "green", | ||
"name": "Olsen Lindsey", | ||
"gender": "male", | ||
"company": "PRISMATIC", | ||
"email": "olsenlindsey@prismatic.com", | ||
"phone": "+1 (958) 538-2928", | ||
"address": "634 Church Avenue, Healy, Puerto Rico, 3714", | ||
"about": "Aute proident dolor reprehenderit est do nulla minim fugiat et officia ea pariatur culpa. Sunt voluptate cillum aliquip excepteur incididunt cupidatat magna. Deserunt minim anim nostrud nostrud minim.\r\n", | ||
"registered": "2014-08-28 02:37:37", | ||
"latitude": 86.085866, | ||
"longitude": -137.520349, | ||
"tags": [ | ||
"deserunt", | ||
"ea", | ||
"amet", | ||
"consectetur", | ||
"duis", | ||
"exercitation", | ||
"velit" | ||
function createData() { | ||
return { | ||
index: 0, | ||
id: '2e668cbe-d709-46c1-b97c-0b09a5f42fbb', | ||
isActive: true, | ||
balance: '$1,325.18', | ||
name: 'Olsen Lindsey', | ||
gender: 'male', | ||
registered: new Date('2014-08-28 02:37:37'), | ||
location: { | ||
latitude: 86.085866, | ||
longitude: -137.520349, | ||
}, | ||
tags: [ | ||
'deserunt', | ||
'ea', | ||
'amet', | ||
'consectetur', | ||
'duis', | ||
'exercitation', | ||
'velit', | ||
], | ||
"friends": [ | ||
{ | ||
"id": 0, | ||
"name": "Wheeler Riley" | ||
}, | ||
{ | ||
"id": 1, | ||
"name": "Mcmahon Tyson" | ||
}, | ||
{ | ||
"id": 2, | ||
"name": "Long Wilkerson" | ||
} | ||
], | ||
"greeting": "Hello, Olsen Lindsey! You have 10 unread messages.", | ||
"favoriteFruit": "strawberry" | ||
}, | ||
{ | ||
"_id": "5826556355bceda06ab3a5c4", | ||
"index": 1, | ||
"guid": "9b7b13ed-280f-4179-89d4-7e6087b6b7e8", | ||
"isActive": true, | ||
"balance": "$1,258.52", | ||
"picture": "http://placehold.it/32x32", | ||
"age": 20, | ||
"eyeColor": "brown", | ||
"name": "Kristin Spears", | ||
"gender": "female", | ||
"company": "EMOLTRA", | ||
"email": "kristinspears@emoltra.com", | ||
"phone": "+1 (962) 580-3520", | ||
"address": "469 Myrtle Avenue, Elliott, New Jersey, 8508", | ||
"about": "Ipsum nisi anim velit occaecat id proident reprehenderit excepteur est. Laboris reprehenderit non voluptate do tempor aliquip amet sunt consequat veniam commodo magna. Fugiat eiusmod nulla in veniam reprehenderit qui irure est nostrud ex velit veniam irure sit. Fugiat laborum ad id proident consectetur labore occaecat voluptate est dolor elit magna. Qui consequat velit do proident tempor labore duis.\r\n", | ||
"registered": "2014-12-20 12:24:14", | ||
"latitude": -78.369471, | ||
"longitude": 164.463178, | ||
"tags": [ | ||
"nisi", | ||
"dolore", | ||
"ex", | ||
"esse", | ||
"et", | ||
"consectetur", | ||
"eiusmod" | ||
], | ||
"friends": [ | ||
{ | ||
"id": 0, | ||
"name": "Rivers Price" | ||
}, | ||
{ | ||
"id": 1, | ||
"name": "Odonnell Sullivan" | ||
}, | ||
{ | ||
"id": 2, | ||
"name": "Donovan Williams" | ||
} | ||
], | ||
"greeting": "Hello, Kristin Spears! You have 1 unread messages.", | ||
"favoriteFruit": "apple" | ||
}, | ||
{ | ||
"_id": "58265563061cb3167c26585e", | ||
"index": 2, | ||
"guid": "b86a7a63-7fc8-4a66-b4b3-7afc8209dbcf", | ||
"isActive": true, | ||
"balance": "$1,345.96", | ||
"picture": "http://placehold.it/32x32", | ||
"age": 31, | ||
"eyeColor": "green", | ||
"name": "Sweeney Flynn", | ||
"gender": "male", | ||
"company": "ZIDOX", | ||
"email": "sweeneyflynn@zidox.com", | ||
"phone": "+1 (930) 437-2241", | ||
"address": "312 Wolf Place, Eureka, Guam, 3890", | ||
"about": "Duis commodo minim voluptate adipisicing deserunt. Ex cillum adipisicing do culpa elit nisi magna enim labore cupidatat est. Duis quis proident ex amet excepteur elit in enim id sit cillum quis consectetur fugiat. Minim incididunt officia Lorem incididunt deserunt occaecat fugiat ipsum in aute ad elit laborum labore. Veniam dolor elit quis duis dolor labore excepteur incididunt velit. Consequat sint commodo eiusmod ipsum dolore reprehenderit ex pariatur enim nulla.\r\n", | ||
"registered": "2015-10-19 12:54:06", | ||
"latitude": -3.079833, | ||
"longitude": -161.188197, | ||
"tags": [ | ||
"eu", | ||
"pariatur", | ||
"ipsum", | ||
"commodo", | ||
"adipisicing", | ||
"adipisicing", | ||
"sunt" | ||
], | ||
"friends": [ | ||
{ | ||
"id": 0, | ||
"name": "Cash Graham" | ||
}, | ||
{ | ||
"id": 1, | ||
"name": "Wright Mclaughlin" | ||
}, | ||
{ | ||
"id": 2, | ||
"name": "Ramos Mitchell" | ||
} | ||
], | ||
"greeting": "Hello, Sweeney Flynn! You have 7 unread messages.", | ||
"favoriteFruit": "strawberry" | ||
}, | ||
{ | ||
"_id": "58265563a12d03464278c83e", | ||
"index": 3, | ||
"guid": "ee9cc02b-cba0-4ffb-842d-135970a94a4a", | ||
"isActive": true, | ||
"balance": "$2,777.27", | ||
"picture": "http://placehold.it/32x32", | ||
"age": 34, | ||
"eyeColor": "green", | ||
"name": "Sutton Vargas", | ||
"gender": "male", | ||
"company": "COMVEX", | ||
"email": "suttonvargas@comvex.com", | ||
"phone": "+1 (878) 530-2431", | ||
"address": "638 Lafayette Walk, Cedarville, New Hampshire, 8202", | ||
"about": "Ipsum consectetur ut pariatur et anim dolor et magna amet irure tempor pariatur aliqua ea. Ex pariatur sunt sunt nostrud aliquip aliqua minim. Culpa exercitation esse cillum esse aliquip dolor sit et veniam nulla veniam. Consectetur ea minim enim consequat tempor aliqua quis occaecat irure ad proident. Ut dolor deserunt aliqua Lorem occaecat in velit eu minim irure adipisicing eu commodo laboris.\r\n", | ||
"registered": "2016-02-25 02:15:38", | ||
"latitude": 52.269213, | ||
"longitude": -115.8603, | ||
"tags": [ | ||
"culpa", | ||
"excepteur", | ||
"est", | ||
"esse", | ||
"excepteur", | ||
"pariatur", | ||
"nisi" | ||
], | ||
"friends": [ | ||
{ | ||
"id": 0, | ||
"name": "Ella Parker" | ||
}, | ||
{ | ||
"id": 1, | ||
"name": "Celeste Harvey" | ||
}, | ||
{ | ||
"id": 2, | ||
"name": "Kristine Hester" | ||
} | ||
], | ||
"greeting": "Hello, Sutton Vargas! You have 5 unread messages.", | ||
"favoriteFruit": "banana" | ||
} | ||
]; | ||
for (let i = 0; i < data.length; i++) { | ||
const d = data[i]; | ||
d.id = d._id; | ||
d.registered = new Date(d.registered); | ||
d.regexp = /abcd/; | ||
friends: new Map([ | ||
[0, 'Wheeler Riley'], | ||
[1, 'Mcmahon Tyson'], | ||
[2, 'Long Wilkerson'], | ||
]), | ||
requestSomething: new Promise(resolve => resolve(true)), | ||
colors: new Set(['red', 'green', 'blue']), | ||
regexp: /test/, | ||
}; | ||
} | ||
export default data; | ||
export default createData; |
import test from 'ava'; | ||
import { merge } from '../lib'; | ||
import data from './data'; | ||
import createData from './data'; | ||
const target = data[0]; | ||
const source = data[1]; | ||
source.friends[2].type = 'dog'; | ||
delete source.age; | ||
const original = createData(); | ||
const target = createData(); | ||
const source = { | ||
id: 'test-id', | ||
colors: new Set(['orange', 'black', 'white']), | ||
registered: new Date(), | ||
regexp: /what?/, | ||
}; | ||
merge(target, source); | ||
test('should modify in place', (t) => { | ||
t.plan(7); | ||
t.plan(8); | ||
t.is(target.id, source.id); | ||
t.is(target.friends[0].name, source.friends[0].name); | ||
t.not(target.id, original.id); | ||
t.not(target.colors.has('orange'), original.colors.has('orange')); | ||
t.is(target.registered.toString(), source.registered.toString()); | ||
t.not(target.registered.toString(), original.registered.toString()); | ||
t.is(target.regexp.toString(), source.regexp.toString()); | ||
t.not(target.age, source.age); | ||
t.deepEqual(target.friends, source.friends); | ||
t.notDeepEqual(target, source); | ||
t.not(target.regexp.toString(), original.regexp.toString()); | ||
t.notDeepEqual(target, original); | ||
}); |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32127
397
69