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

rfc6902

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rfc6902 - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

7

dist/rfc6902.js

@@ -127,3 +127,3 @@ (function (global, factory) {

@param source - should be a JavaScript primitive, Array, or (plain old) Object.
@param source - should be a JavaScript primitive, Array, Date, or (plain old) Object.
@returns copy of source where every Array and Object have been recursively

@@ -148,2 +148,7 @@ reconstructed from their constituent elements

}
// Date
if (source.constructor == Date) {
const dateTarget = new Date(+source);
return dateTarget;
}
// Object

@@ -150,0 +155,0 @@ const objectTarget = {};

33

dist/rfc6902.min.js
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(c){return c.raw=c};$jscomp.createTemplateTagFirstArgWithRaw=function(c,d){c.raw=d;return c};$jscomp.arrayIteratorImpl=function(c){var d=0;return function(){return d<c.length?{done:!1,value:c[d++]}:{done:!0}}};$jscomp.arrayIterator=function(c){return{next:$jscomp.arrayIteratorImpl(c)}};$jscomp.makeIterator=function(c){var d="undefined"!=typeof Symbol&&Symbol.iterator&&c[Symbol.iterator];return d?d.call(c):$jscomp.arrayIterator(c)};
$jscomp.arrayFromIterator=function(c){for(var d,f=[];!(d=c.next()).done;)f.push(d.value);return f};$jscomp.arrayFromIterable=function(c){return c instanceof Array?c:$jscomp.arrayFromIterator($jscomp.makeIterator(c))};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.ENABLE_UNHANDLED_REJECTION_POLYFILL=!0;
$jscomp.arrayFromIterator=function(c){for(var d,f=[];!(d=c.next()).done;)f.push(d.value);return f};$jscomp.arrayFromIterable=function(c){return c instanceof Array?c:$jscomp.arrayFromIterator($jscomp.makeIterator(c))};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
$jscomp.objectCreate=$jscomp.ASSUME_ES5||"function"==typeof Object.create?Object.create:function(c){var d=function(){};d.prototype=c;return new d};$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(c,d,f){if(c==Array.prototype||c==Object.prototype)return c;c[d]=f.value;return c};

@@ -7,4 +7,4 @@ $jscomp.getGlobal=function(c){c=["object"==typeof globalThis&&globalThis,c,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var d=0;d<c.length;++d){var f=c[d];if(f&&f.Math==Math)return f}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};

$jscomp.polyfillUnisolated=function(c,d,f,k){f=$jscomp.global;c=c.split(".");for(k=0;k<c.length-1;k++){var h=c[k];if(!(h in f))return;f=f[h]}c=c[c.length-1];k=f[c];d=d(k);d!=k&&null!=d&&$jscomp.defineProperty(f,c,{configurable:!0,writable:!0,value:d})};
$jscomp.polyfillIsolated=function(c,d,f,k){var h=c.split(".");c=1===h.length;k=h[0];k=!c&&k in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var u=0;u<h.length-1;u++){var x=h[u];if(!(x in k))return;k=k[x]}h=h[h.length-1];f=$jscomp.IS_SYMBOL_NATIVE&&"es6"===f?k[h]:null;d=d(f);null!=d&&(c?$jscomp.defineProperty($jscomp.polyfills,h,{configurable:!0,writable:!0,value:d}):d!==f&&($jscomp.propertyToPolyfillSymbol[h]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(h):$jscomp.POLYFILL_PREFIX+h,h=
$jscomp.propertyToPolyfillSymbol[h],$jscomp.defineProperty(k,h,{configurable:!0,writable:!0,value:d})))};
$jscomp.polyfillIsolated=function(c,d,f,k){var h=c.split(".");c=1===h.length;k=h[0];k=!c&&k in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var u=0;u<h.length-1;u++){var x=h[u];if(!(x in k))return;k=k[x]}h=h[h.length-1];f=$jscomp.IS_SYMBOL_NATIVE&&"es6"===f?k[h]:null;d=d(f);null!=d&&(c?$jscomp.defineProperty($jscomp.polyfills,h,{configurable:!0,writable:!0,value:d}):d!==f&&(void 0===$jscomp.propertyToPolyfillSymbol[h]&&($jscomp.propertyToPolyfillSymbol[h]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(h):
$jscomp.POLYFILL_PREFIX+h),$jscomp.defineProperty(k,$jscomp.propertyToPolyfillSymbol[h],{configurable:!0,writable:!0,value:d})))};
$jscomp.getConstructImplementation=function(){function c(){function f(){}new f;Reflect.construct(f,[],function(){});return new f instanceof f}if($jscomp.TRUST_ES6_POLYFILLS&&"undefined"!=typeof Reflect&&Reflect.construct){if(c())return Reflect.construct;var d=Reflect.construct;return function(f,k,h){f=d(f,k);h&&Reflect.setPrototypeOf(f,h.prototype);return f}}return function(f,k,h){void 0===h&&(h=f);h=$jscomp.objectCreate(h.prototype||Object.prototype);return Function.prototype.apply.call(f,h,k)||

@@ -14,17 +14,16 @@ h}};$jscomp.construct={valueOf:$jscomp.getConstructImplementation}.valueOf();$jscomp.underscoreProtoCanBeSet=function(){var c={a:!0},d={};try{return d.__proto__=c,d.a}catch(f){}return!1};$jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(c,d){c.__proto__=d;if(c.__proto__!==d)throw new TypeError(c+" is not extensible");return c}:null;

$jscomp.polyfill("Reflect.setPrototypeOf",function(c){if(c)return c;if($jscomp.setPrototypeOf){var d=$jscomp.setPrototypeOf;return function(f,k){try{return d(f,k),!0}catch(h){return!1}}}return null},"es6","es5");$jscomp.initSymbol=function(){};
$jscomp.polyfill("Symbol",function(c){if(c)return c;var d=function(h,u){this.$jscomp$symbol$id_=h;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:u})};d.prototype.toString=function(){return this.$jscomp$symbol$id_};var f=0,k=function(h){if(this instanceof k)throw new TypeError("Symbol is not a constructor");return new d("jscomp_symbol_"+(h||"")+"_"+f++,h)};return k},"es6","es3");$jscomp.initSymbolIterator=function(){};
$jscomp.polyfill("Symbol",function(c){if(c)return c;var d=function(h,u){this.$jscomp$symbol$id_=h;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:u})};d.prototype.toString=function(){return this.$jscomp$symbol$id_};var f=0,k=function(h){if(this instanceof k)throw new TypeError("Symbol is not a constructor");return new d("jscomp_symbol_"+(h||"")+"_"+f++,h)};return k},"es6","es3");
$jscomp.polyfill("Symbol.iterator",function(c){if(c)return c;c=Symbol("Symbol.iterator");for(var d="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),f=0;f<d.length;f++){var k=$jscomp.global[d[f]];"function"===typeof k&&"function"!=typeof k.prototype[c]&&$jscomp.defineProperty(k.prototype,c,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return c},"es6",
"es3");$jscomp.initSymbolAsyncIterator=function(){};$jscomp.iteratorPrototype=function(c){c={next:c};c[Symbol.iterator]=function(){return this};return c};$jscomp.iteratorFromArray=function(c,d){c instanceof String&&(c+="");var f=0,k=!1,h={next:function(){if(!k&&f<c.length){var u=f++;return{value:d(u,c[u]),done:!1}}k=!0;return{done:!0,value:void 0}}};h[Symbol.iterator]=function(){return h};return h};
$jscomp.polyfill("Array.prototype.keys",function(c){return c?c:function(){return $jscomp.iteratorFromArray(this,function(d){return d})}},"es6","es3");
"es3");$jscomp.iteratorPrototype=function(c){c={next:c};c[Symbol.iterator]=function(){return this};return c};$jscomp.iteratorFromArray=function(c,d){c instanceof String&&(c+="");var f=0,k=!1,h={next:function(){if(!k&&f<c.length){var u=f++;return{value:d(u,c[u]),done:!1}}k=!0;return{done:!0,value:void 0}}};h[Symbol.iterator]=function(){return h};return h};$jscomp.polyfill("Array.prototype.keys",function(c){return c?c:function(){return $jscomp.iteratorFromArray(this,function(d){return d})}},"es6","es3");
(function(c,d){"object"===typeof exports&&"undefined"!==typeof module?d(exports):"function"===typeof define&&define.amd?define(["exports"],d):(c="undefined"!==typeof globalThis?globalThis:c||self,d(c.rfc6902={}))})(this,function(c){function d(a){return a.replace(/~1/g,"/").replace(/~0/g,"~")}function f(a){return a.replace(/~/g,"~0").replace(/\//g,"~1")}function k(a){return void 0===a?"undefined":null===a?"null":Array.isArray(a)?"array":typeof a}function h(a){if(null==a||"object"!=typeof a)return a;
if(a.constructor==Array){for(var b=a.length,e=Array(b),g=0;g<b;g++)e[g]=h(a[g]);return e}b={};for(e in a)A.call(a,e)&&(b[e]=h(a[e]));return b}function u(a){a=a.op;return"remove"===a||"replace"===a||"copy"===a||"move"===a}function x(a,b){var e={},g;for(g in a)A.call(a,g)&&void 0!==a[g]&&(e[g]=1);for(var l in b)A.call(b,l)&&void 0!==b[l]&&delete e[l];return Object.keys(e)}function I(a){for(var b=a.length,e={},g=0;g<b;g++){var l=a[g],n;for(n in l)A.call(l,n)&&void 0!==l[n]&&(e[n]=(e[n]||0)+1)}for(var y in e)e[y]<
b&&delete e[y];return Object.keys(e)}function B(a,b){return{operations:a.operations.concat(b),cost:a.cost+1}}function J(a,b,e,g){function l(q,m){var t=q+","+m,r=n[t];if(void 0===r){if(0<q&&0<m&&!g(a[q-1],b[m-1],new p).length)r=l(q-1,m-1);else{r=[];if(0<q){var z=l(q-1,m);r.push(B(z,{op:"remove",index:q-1}))}0<m&&(z=l(q,m-1),r.push(B(z,{op:"add",index:q-1,value:b[m-1]})));0<q&&0<m&&(z=l(q-1,m-1),r.push(B(z,{op:"replace",index:q-1,original:a[q-1],value:b[m-1]})));r=r.sort(function(K,L){return K.cost-
L.cost})[0]}n[t]=r}return r}g=void 0===g?w:g;var n={"0,0":{operations:[],cost:0}},y=isNaN(a.length)||0>=a.length?0:a.length,C=isNaN(b.length)||0>=b.length?0:b.length;C=l(y,C).operations;return $jscomp.makeIterator(C.reduce(function(q,m){var t=$jscomp.makeIterator(q);q=t.next().value;t=t.next().value;if("add"===m.op){var r=m.index+1+t;m={op:m.op,path:e.add(r<y+t?String(r):"-").toString(),value:m.value};return[q.concat(m),t+1]}if("remove"===m.op)return m={op:m.op,path:e.add(String(m.index+t)).toString()},
[q.concat(m),t-1];r=e.add(String(m.index+t));m=g(m.original,m.value,r);return[q.concat.apply(q,$jscomp.arrayFromIterable(m)),t]},[[],0])).next().value}function M(a,b,e,g){g=void 0===g?w:g;var l=[];x(a,b).forEach(function(n){l.push({op:"remove",path:e.add(n).toString()})});x(b,a).forEach(function(n){l.push({op:"add",path:e.add(n).toString(),value:b[n]})});I([a,b]).forEach(function(n){l.push.apply(l,$jscomp.arrayFromIterable(g(a[n],b[n],e.add(n))))});return l}function w(a,b,e,g){g=void 0===g?w:g;if(a===
b)return[];var l=k(a),n=k(b);return"array"==l&&"array"==n?J(a,b,e,g):"object"==l&&"object"==n?M(a,b,e,g):[{op:"replace",path:e.toString(),value:b}]}function D(a,b,e){Array.isArray(a)?"-"==b?a.push(e):(b=parseInt(b,10),a.splice(b,0,e)):a[b]=e}function E(a,b){Array.isArray(a)?(b=parseInt(b,10),a.splice(b,1)):delete a[b]}function N(a,b){a=p.fromJSON(b.path).evaluate(a);if(null===a.parent)return new v(b.path);if(Array.isArray(a.parent)){if(parseInt(a.key,10)>=a.parent.length)return new v(b.path)}else if(void 0===
a.value)return new v(b.path);a.parent[a.key]=b.value;return null}function O(a,b){switch(b.op){case "add":return a=p.fromJSON(b.path).evaluate(a),void 0===a.parent?b=new v(b.path):(D(a.parent,a.key,h(b.value)),b=null),b;case "remove":return a=p.fromJSON(b.path).evaluate(a),void 0===a.value?b=new v(b.path):(E(a.parent,a.key),b=null),b;case "replace":return N(a,b);case "move":var e=p.fromJSON(b.from).evaluate(a);void 0===e.value?b=new v(b.from):(a=p.fromJSON(b.path).evaluate(a),void 0===a.parent?b=new v(b.path):
(E(e.parent,e.key),D(a.parent,a.key,e.value),b=null));return b;case "copy":return e=p.fromJSON(b.from).evaluate(a),void 0===e.value?b=new v(b.from):(a=p.fromJSON(b.path).evaluate(a),void 0===a.parent?b=new v(b.path):(D(a.parent,a.key,h(e.value)),b=null)),b;case "test":return a=p.fromJSON(b.path).evaluate(a),b=w(a.value,b.value,new p).length?new F(a.value,b.value):null,b}return new G(b)}function P(a){function b(e,g,l){var n=a(e,g,l);return Array.isArray(n)?n:w(e,g,l,b)}return b}function H(a,b){a=p.fromJSON(b).evaluate(a);
if(void 0!==a)return{op:"test",path:b,value:a.value}}var p=function(a){this.tokens=a=void 0===a?[""]:a};p.fromJSON=function(a){var b=a.split("/").map(d);if(""!==b[0])throw Error("Invalid JSON Pointer: "+a);return new p(b)};p.prototype.toString=function(){return this.tokens.map(f).join("/")};p.prototype.evaluate=function(a){for(var b=null,e="",g=1,l=this.tokens.length;g<l;g++)b=a,e=this.tokens[g],a=(b||{})[e];return{parent:b,key:e,value:a}};p.prototype.get=function(a){return this.evaluate(a).value};
p.prototype.set=function(a,b){for(var e=1,g=this.tokens.length-1,l=this.tokens[e];e<g;e++)a=(a||{})[l];a&&(a[this.tokens[this.tokens.length-1]]=b)};p.prototype.push=function(a){this.tokens.push(a)};p.prototype.add=function(a){a=this.tokens.concat(String(a));return new p(a)};var A=Object.prototype.hasOwnProperty,v=function(a){var b=Error.call(this,"Value required at path: "+a);this.message=b.message;"stack"in b&&(this.stack=b.stack);this.path=a;this.name="MissingError"};$jscomp.inherits(v,Error);var F=
function(a,b){var e=Error.call(this,"Test failed: "+a+" != "+b);this.message=e.message;"stack"in e&&(this.stack=e.stack);this.actual=a;this.expected=b;this.name="TestError"};$jscomp.inherits(F,Error);var G=function(a){var b=Error.call(this,"Invalid operation: "+a.op);this.message=b.message;"stack"in b&&(this.stack=b.stack);this.operation=a;this.name="InvalidOperationError"};$jscomp.inherits(G,Error);c.applyPatch=function(a,b){return b.map(function(e){return O(a,e)})};c.createPatch=function(a,b,e){var g=
new p;return(e?P(e):w)(a,b,g)};c.createTests=function(a,b){var e=[];b.filter(u).forEach(function(g){var l=H(a,g.path);l&&e.push(l);"from"in g&&(g=H(a,g.from))&&e.push(g)});return e};Object.defineProperty(c,"__esModule",{value:!0})});
if(a.constructor==Array){for(var b=a.length,e=Array(b),g=0;g<b;g++)e[g]=h(a[g]);return e}if(a.constructor==Date)return new Date(+a);b={};for(e in a)A.call(a,e)&&(b[e]=h(a[e]));return b}function u(a){a=a.op;return"remove"===a||"replace"===a||"copy"===a||"move"===a}function x(a,b){var e={},g;for(g in a)A.call(a,g)&&void 0!==a[g]&&(e[g]=1);for(var l in b)A.call(b,l)&&void 0!==b[l]&&delete e[l];return Object.keys(e)}function I(a){for(var b=a.length,e={},g=0;g<b;g++){var l=a[g],n;for(n in l)A.call(l,n)&&
void 0!==l[n]&&(e[n]=(e[n]||0)+1)}for(var y in e)e[y]<b&&delete e[y];return Object.keys(e)}function B(a,b){return{operations:a.operations.concat(b),cost:a.cost+1}}function J(a,b,e,g){function l(q,m){var t=q+","+m,r=n[t];if(void 0===r){if(0<q&&0<m&&!g(a[q-1],b[m-1],new p).length)r=l(q-1,m-1);else{r=[];if(0<q){var z=l(q-1,m);r.push(B(z,{op:"remove",index:q-1}))}0<m&&(z=l(q,m-1),r.push(B(z,{op:"add",index:q-1,value:b[m-1]})));0<q&&0<m&&(z=l(q-1,m-1),r.push(B(z,{op:"replace",index:q-1,original:a[q-1],
value:b[m-1]})));r=r.sort(function(K,L){return K.cost-L.cost})[0]}n[t]=r}return r}g=void 0===g?w:g;var n={"0,0":{operations:[],cost:0}},y=isNaN(a.length)||0>=a.length?0:a.length,C=isNaN(b.length)||0>=b.length?0:b.length;C=l(y,C).operations;return $jscomp.makeIterator(C.reduce(function(q,m){var t=$jscomp.makeIterator(q);q=t.next().value;t=t.next().value;if("add"===m.op){var r=m.index+1+t;m={op:m.op,path:e.add(r<y+t?String(r):"-").toString(),value:m.value};return[q.concat(m),t+1]}if("remove"===m.op)return m=
{op:m.op,path:e.add(String(m.index+t)).toString()},[q.concat(m),t-1];r=e.add(String(m.index+t));m=g(m.original,m.value,r);return[q.concat.apply(q,$jscomp.arrayFromIterable(m)),t]},[[],0])).next().value}function M(a,b,e,g){g=void 0===g?w:g;var l=[];x(a,b).forEach(function(n){l.push({op:"remove",path:e.add(n).toString()})});x(b,a).forEach(function(n){l.push({op:"add",path:e.add(n).toString(),value:b[n]})});I([a,b]).forEach(function(n){l.push.apply(l,$jscomp.arrayFromIterable(g(a[n],b[n],e.add(n))))});
return l}function w(a,b,e,g){g=void 0===g?w:g;if(a===b)return[];var l=k(a),n=k(b);return"array"==l&&"array"==n?J(a,b,e,g):"object"==l&&"object"==n?M(a,b,e,g):[{op:"replace",path:e.toString(),value:b}]}function D(a,b,e){Array.isArray(a)?"-"==b?a.push(e):(b=parseInt(b,10),a.splice(b,0,e)):a[b]=e}function E(a,b){Array.isArray(a)?(b=parseInt(b,10),a.splice(b,1)):delete a[b]}function N(a,b){a=p.fromJSON(b.path).evaluate(a);if(null===a.parent)return new v(b.path);if(Array.isArray(a.parent)){if(parseInt(a.key,
10)>=a.parent.length)return new v(b.path)}else if(void 0===a.value)return new v(b.path);a.parent[a.key]=b.value;return null}function O(a,b){switch(b.op){case "add":return a=p.fromJSON(b.path).evaluate(a),void 0===a.parent?b=new v(b.path):(D(a.parent,a.key,h(b.value)),b=null),b;case "remove":return a=p.fromJSON(b.path).evaluate(a),void 0===a.value?b=new v(b.path):(E(a.parent,a.key),b=null),b;case "replace":return N(a,b);case "move":var e=p.fromJSON(b.from).evaluate(a);void 0===e.value?b=new v(b.from):
(a=p.fromJSON(b.path).evaluate(a),void 0===a.parent?b=new v(b.path):(E(e.parent,e.key),D(a.parent,a.key,e.value),b=null));return b;case "copy":return e=p.fromJSON(b.from).evaluate(a),void 0===e.value?b=new v(b.from):(a=p.fromJSON(b.path).evaluate(a),void 0===a.parent?b=new v(b.path):(D(a.parent,a.key,h(e.value)),b=null)),b;case "test":return a=p.fromJSON(b.path).evaluate(a),b=w(a.value,b.value,new p).length?new F(a.value,b.value):null,b}return new G(b)}function P(a){function b(e,g,l){var n=a(e,g,
l);return Array.isArray(n)?n:w(e,g,l,b)}return b}function H(a,b){a=p.fromJSON(b).evaluate(a);if(void 0!==a)return{op:"test",path:b,value:a.value}}var p=function(a){this.tokens=a=void 0===a?[""]:a};p.fromJSON=function(a){var b=a.split("/").map(d);if(""!==b[0])throw Error("Invalid JSON Pointer: "+a);return new p(b)};p.prototype.toString=function(){return this.tokens.map(f).join("/")};p.prototype.evaluate=function(a){for(var b=null,e="",g=1,l=this.tokens.length;g<l;g++)b=a,e=this.tokens[g],a=(b||{})[e];
return{parent:b,key:e,value:a}};p.prototype.get=function(a){return this.evaluate(a).value};p.prototype.set=function(a,b){for(var e=1,g=this.tokens.length-1,l=this.tokens[e];e<g;e++)a=(a||{})[l];a&&(a[this.tokens[this.tokens.length-1]]=b)};p.prototype.push=function(a){this.tokens.push(a)};p.prototype.add=function(a){a=this.tokens.concat(String(a));return new p(a)};var A=Object.prototype.hasOwnProperty,v=function(a){var b=Error.call(this,"Value required at path: "+a);this.message=b.message;"stack"in
b&&(this.stack=b.stack);this.path=a;this.name="MissingError"};$jscomp.inherits(v,Error);var F=function(a,b){var e=Error.call(this,"Test failed: "+a+" != "+b);this.message=e.message;"stack"in e&&(this.stack=e.stack);this.actual=a;this.expected=b;this.name="TestError"};$jscomp.inherits(F,Error);var G=function(a){var b=Error.call(this,"Invalid operation: "+a.op);this.message=b.message;"stack"in b&&(this.stack=b.stack);this.operation=a;this.name="InvalidOperationError"};$jscomp.inherits(G,Error);c.applyPatch=
function(a,b){return b.map(function(e){return O(a,e)})};c.createPatch=function(a,b,e){var g=new p;return(e?P(e):w)(a,b,g)};c.createTests=function(a,b){var e=[];b.filter(u).forEach(function(g){var l=H(a,g.path);l&&e.push(l);"from"in g&&(g=H(a,g.from))&&e.push(g)});return e};Object.defineProperty(c,"__esModule",{value:!0})});
{
"name": "rfc6902",
"version": "4.0.1",
"version": "4.0.2",
"description": "Complete implementation of RFC6902 (patch and diff)",

@@ -16,10 +16,10 @@ "keywords": [

"devDependencies": {
"@types/js-yaml": "3.12.5",
"@types/node": "^14.11.2",
"ava": "^3.12.1",
"@types/js-yaml": "4.0.0",
"@types/node": "^14.14.33",
"ava": "^3.15.0",
"coveralls": "^3.1.0",
"js-yaml": "3.14.0",
"js-yaml": "4.0.0",
"nyc": "^15.1.0",
"rollup": "^2.28.2",
"typescript": "^4.0.3"
"rollup": "^2.41.1",
"typescript": "^4.2.3"
},

@@ -26,0 +26,0 @@ "scripts": {

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

return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -12,0 +14,0 @@ function __() { this.constructor = d; }

@@ -1,2 +0,2 @@

export declare const hasOwnProperty: (v: string | number | symbol) => boolean;
export declare const hasOwnProperty: (v: PropertyKey) => boolean;
export declare function objectType(object: any): "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "null" | "array";

@@ -6,3 +6,3 @@ /**

@param source - should be a JavaScript primitive, Array, or (plain old) Object.
@param source - should be a JavaScript primitive, Array, Date, or (plain old) Object.
@returns copy of source where every Array and Object have been recursively

@@ -9,0 +9,0 @@ reconstructed from their constituent elements

@@ -26,3 +26,3 @@ "use strict";

@param source - should be a JavaScript primitive, Array, or (plain old) Object.
@param source - should be a JavaScript primitive, Array, Date, or (plain old) Object.
@returns copy of source where every Array and Object have been recursively

@@ -47,2 +47,7 @@ reconstructed from their constituent elements

}
// Date
if (source.constructor == Date) {
var dateTarget = new Date(+source);
return dateTarget;
}
// Object

@@ -49,0 +54,0 @@ var objectTarget = {};

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