From 3b0b611917f5cdd373ed8c3f90bcce65de26a347 Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Fri, 12 Mar 2021 20:04:29 -0500 Subject: [PATCH] Rebuild dist/* --- dist/rfc6902.js | 7 ++++++- dist/rfc6902.min.js | 33 ++++++++++++++++----------------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/dist/rfc6902.js b/dist/rfc6902.js index 8aa5ab6..2433f05 100644 --- a/dist/rfc6902.js +++ b/dist/rfc6902.js @@ -124,7 +124,7 @@ /** Recursively copy a value. - @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 reconstructed from their constituent elements */ @@ -144,6 +144,11 @@ } return arrayTarget; } + // Date + if (source.constructor == Date) { + const dateTarget = new Date(+source); + return dateTarget; + } // Object const objectTarget = {}; // declaring the variable (with const) inside the loop is faster diff --git a/dist/rfc6902.min.js b/dist/rfc6902.min.js index 186e217..5dbb358 100644 --- a/dist/rfc6902.min.js +++ b/dist/rfc6902.min.js @@ -1,28 +1,27 @@ 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=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=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=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=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