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 1.1.0 to 1.1.1

coverage/coverage.json

3

diff.js

@@ -5,5 +5,2 @@ import { compare } from './equal';

}
function last(array) {
return array[array.length - 1];
}
/**

@@ -10,0 +7,0 @@ subtract(a, b) returns the keys in `a` that are not in `b`.

{
"name": "rfc6902",
"version": "1.1.0",
"version": "1.1.1",
"description": "Complete implementation of RFC6902 (patch and diff)",

@@ -20,8 +20,11 @@ "keywords": [

"devDependencies": {
"babel-core": "5.8.34",
"babelify": "5.0.5",
"babel-core": "^5.0.0",
"babelify": "^5.0.0",
"browserify": "12.0.1",
"coveralls": "*",
"derequire": "2.0.3",
"istanbul": "*",
"js-yaml": "*",
"mocha": "*",
"mocha-lcov-reporter": "*",
"typescript": "*"

@@ -28,0 +31,0 @@ },

# rfc6902
[![npm version](https://badge.fury.io/js/rfc6902.svg)](https://www.npmjs.com/package/rfc6902)
[![Travis CI Build Status](https://travis-ci.org/chbrown/rfc6902.svg)](https://travis-ci.org/chbrown/rfc6902)
[![Coverage Status](https://coveralls.io/repos/chbrown/rfc6902/badge.svg)](https://coveralls.io/github/chbrown/rfc6902)
Complete implementation of [RFC6902](http://tools.ietf.org/html/rfc6902) "JavaScript Object Notation (JSON) Patch"

@@ -4,0 +8,0 @@ (including [RFC6901](http://tools.ietf.org/html/rfc6901) "JavaScript Object Notation (JSON) Pointer"),

@@ -14,5 +14,2 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.rfc6902 = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){

}
function last(array) {
return array[array.length - 1];
}
/**

@@ -427,3 +424,3 @@ subtract(a, b) returns the keys in `a` that are not in `b`.

"name": "rfc6902",
"version": "1.0.9",
"version": "1.1.0",
"description": "Complete implementation of RFC6902 (patch and diff)",

@@ -445,8 +442,11 @@ "keywords": [

"devDependencies": {
"babel-core": "5.8.34",
"babelify": "5.0.5",
"babel-core": "^5.0.0",
"babelify": "^5.0.0",
"browserify": "12.0.1",
"coveralls": "*",
"derequire": "2.0.3",
"istanbul": "*",
"js-yaml": "*",
"mocha": "*",
"mocha-lcov-reporter": "*",
"typescript": "*"

@@ -453,0 +453,0 @@ },

@@ -10,8 +10,8 @@ (function(n){"object"===typeof exports&&"undefined"!==typeof module?module.exports=n():"function"===typeof define&&define.amd?define([],n):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).rfc6902=n()})(function(){return function d(l,b,g){function h(a,c){if(!b[a]){if(!l[a]){var e="function"==typeof require&&require;if(!c&&e)return e(a,!0);if(k)return k(a,!0);e=Error("Cannot find module '"+a+"'");throw e.code="MODULE_NOT_FOUND",e;}e=b[a]={exports:{}};

b){k(this,c);g(Object.getPrototypeOf(c.prototype),"constructor",this).call(this,"Test failed: "+a+" != "+b);this.name=this.constructor.name;this.actual=a;this.expected=b}h(c,a);return c}(Error)},{}],4:[function(d,l,b){b.applyPatch=function(a,c){return c.map(function(e){var c=k[e.op];return void 0===c?new g(e.op):c(a,e)})};b.createPatch=function(a,c){var e=new h,e=f(a,c,e);e.forEach(function(a){a.path=a.path.toString()});return e};Object.defineProperty(b,"__esModule",{value:!0});var g=d("./errors").InvalidOperationError,
h=d("./pointer").Pointer,k=function(a){return a&&a.__esModule?a:{"default":a}}(d("./patch")),f=d("./diff").diffAny;d=function(a){return a&&a.__esModule?a["default"]:a}(d("./package")).version;b.version=d},{"./diff":1,"./errors":3,"./package":5,"./patch":6,"./pointer":7}],5:[function(d,l,b){l.exports={name:"rfc6902",version:"1.0.9",description:"Complete implementation of RFC6902 (patch and diff)",keywords:["json","patch","diff","rfc6902"],homepage:"https://github.com/chbrown/rfc6902",repository:{type:"git",
url:"https://github.com/chbrown/rfc6902.git"},author:"Christopher Brown <io@henrian.com> (http://henrian.com)",license:"MIT",main:"./rfc6902.js",devDependencies:{"babel-core":"5.8.34",babelify:"5.0.5",browserify:"12.0.1",derequire:"2.0.3","js-yaml":"*",mocha:"*",typescript:"*"},scripts:{test:"make test"}}},{}],6:[function(d,l,b){function g(a,c,b){Array.isArray(a)?"-"==c?a.push(b):a.splice(c,0,b):a[c]=b}function h(a,c){Array.isArray(a)?a.splice(c,1):delete a[c]}b.add=function(c,b){var d=k.fromJSON(b.path).evaluate(c);
if(void 0===d.parent)return new a(b.path);g(d.parent,d.key,b.value);return null};b.remove=function(c,b){var d=k.fromJSON(b.path).evaluate(c);if(void 0===d.value)return new a(b.path);h(d.parent,d.key);return null};b.replace=function(c,b){var d=k.fromJSON(b.path).evaluate(c);if(void 0===d.value)return new a(b.path);d.parent[d.key]=b.value;return null};b.move=function(c,b){var d=k.fromJSON(b.from).evaluate(c);if(void 0===d.value)return new a(b.from);var f=k.fromJSON(b.path).evaluate(c);if(void 0===f.parent)return new a(b.path);
h(d.parent,d.key);g(f.parent,f.key,d.value);return null};b.copy=function(c,b){var d=k.fromJSON(b.from).evaluate(c);if(void 0===d.value)return new a(b.from);var f=k.fromJSON(b.path).evaluate(c);if(void 0===f.parent)return new a(b.path);h(d.parent,d.key);g(f.parent,f.key,d.value);return null};b.test=function(a,b){var d=k.fromJSON(b.path).evaluate(a);return f(d.value,b.value)?null:new c(d.value,b.value)};Object.defineProperty(b,"__esModule",{value:!0});var k=d("./pointer").Pointer,f=d("./equal").compare;
d=d("./errors");var a=d.MissingError,c=d.TestError},{"./equal":2,"./errors":3,"./pointer":7}],7:[function(d,l,b){function g(b){return b.replace(/~1/g,"/").replace(/~0/g,"~")}function h(b){return b.replace(/~/g,"~0").replace(/\//g,"~1")}var k=function(){function b(a,c){for(var d in c){var f=c[d];f.configurable=!0;f.value&&(f.writable=!0)}Object.defineProperties(a,c)}return function(a,c,d){c&&b(a.prototype,c);d&&b(a,d);return a}}();Object.defineProperty(b,"__esModule",{value:!0});b.Pointer=function(){function b(a){a=
void 0===a?[""]:a;if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");this.tokens=a}k(b,{toString:{value:function(){return this.tokens.map(h).join("/")}},evaluate:{value:function(a){for(var b=null,d=null,f=1,g=this.tokens.length;f<g;f++)b=a,d=this.tokens[f],a=(b||{})[d];return{parent:b,key:d,value:a}}},push:{value:function(a){this.tokens.push(a)}},add:{value:function(a){a=this.tokens.concat(String(a));return new b(a)}}},{fromJSON:{value:function(a){var c=a.split("/").map(g);
if(""!==c[0])throw Error("Invalid JSON Pointer: "+a);return new b(c)}}});return b}()},{}]},{},[4])(4)});
h=d("./pointer").Pointer,k=function(a){return a&&a.__esModule?a:{"default":a}}(d("./patch")),f=d("./diff").diffAny;d=function(a){return a&&a.__esModule?a["default"]:a}(d("./package")).version;b.version=d},{"./diff":1,"./errors":3,"./package":5,"./patch":6,"./pointer":7}],5:[function(d,l,b){l.exports={name:"rfc6902",version:"1.1.0",description:"Complete implementation of RFC6902 (patch and diff)",keywords:["json","patch","diff","rfc6902"],homepage:"https://github.com/chbrown/rfc6902",repository:{type:"git",
url:"https://github.com/chbrown/rfc6902.git"},author:"Christopher Brown <io@henrian.com> (http://henrian.com)",license:"MIT",main:"./rfc6902.js",devDependencies:{"babel-core":"^5.0.0",babelify:"^5.0.0",browserify:"12.0.1",coveralls:"*",derequire:"2.0.3",istanbul:"*","js-yaml":"*",mocha:"*","mocha-lcov-reporter":"*",typescript:"*"},scripts:{test:"make test"}}},{}],6:[function(d,l,b){function g(a,c,b){Array.isArray(a)?"-"==c?a.push(b):a.splice(c,0,b):a[c]=b}function h(a,c){Array.isArray(a)?a.splice(c,
1):delete a[c]}b.add=function(c,b){var d=k.fromJSON(b.path).evaluate(c);if(void 0===d.parent)return new a(b.path);g(d.parent,d.key,b.value);return null};b.remove=function(c,b){var d=k.fromJSON(b.path).evaluate(c);if(void 0===d.value)return new a(b.path);h(d.parent,d.key);return null};b.replace=function(c,b){var d=k.fromJSON(b.path).evaluate(c);if(void 0===d.value)return new a(b.path);d.parent[d.key]=b.value;return null};b.move=function(c,b){var d=k.fromJSON(b.from).evaluate(c);if(void 0===d.value)return new a(b.from);
var f=k.fromJSON(b.path).evaluate(c);if(void 0===f.parent)return new a(b.path);h(d.parent,d.key);g(f.parent,f.key,d.value);return null};b.copy=function(c,b){var d=k.fromJSON(b.from).evaluate(c);if(void 0===d.value)return new a(b.from);var f=k.fromJSON(b.path).evaluate(c);if(void 0===f.parent)return new a(b.path);h(d.parent,d.key);g(f.parent,f.key,d.value);return null};b.test=function(a,b){var d=k.fromJSON(b.path).evaluate(a);return f(d.value,b.value)?null:new c(d.value,b.value)};Object.defineProperty(b,
"__esModule",{value:!0});var k=d("./pointer").Pointer,f=d("./equal").compare;d=d("./errors");var a=d.MissingError,c=d.TestError},{"./equal":2,"./errors":3,"./pointer":7}],7:[function(d,l,b){function g(b){return b.replace(/~1/g,"/").replace(/~0/g,"~")}function h(b){return b.replace(/~/g,"~0").replace(/\//g,"~1")}var k=function(){function b(a,c){for(var d in c){var f=c[d];f.configurable=!0;f.value&&(f.writable=!0)}Object.defineProperties(a,c)}return function(a,c,d){c&&b(a.prototype,c);d&&b(a,d);return a}}();
Object.defineProperty(b,"__esModule",{value:!0});b.Pointer=function(){function b(a){a=void 0===a?[""]:a;if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");this.tokens=a}k(b,{toString:{value:function(){return this.tokens.map(h).join("/")}},evaluate:{value:function(a){for(var b=null,d=null,f=1,g=this.tokens.length;f<g;f++)b=a,d=this.tokens[f],a=(b||{})[d];return{parent:b,key:d,value:a}}},push:{value:function(a){this.tokens.push(a)}},add:{value:function(a){a=this.tokens.concat(String(a));
return new b(a)}}},{fromJSON:{value:function(a){var c=a.split("/").map(g);if(""!==c[0])throw Error("Invalid JSON Pointer: "+a);return new b(c)}}});return b}()},{}]},{},[4])(4)});
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