Socket
Socket
Sign inDemoInstall

rfc6902

Package Overview
Dependencies
Maintainers
1
Versions
43
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 2.1.0 to 2.2.0

4

package.json
{
"name": "rfc6902",
"version": "2.1.0",
"version": "2.2.0",
"description": "Complete implementation of RFC6902 (patch and diff)",

@@ -23,3 +23,3 @@ "keywords": [

"js-yaml": "3.10.0",
"mocha": "^4.0.1",
"mocha": "^3.5.3",
"mocha-lcov-reporter": "1.3.0",

@@ -26,0 +26,0 @@ "rollup": "^0.50.0",

@@ -23,2 +23,4 @@ export interface PointerEvaluation {

evaluate(object: any): PointerEvaluation;
get(object: any): any;
set(object: any, value: any): void;
push(token: string): void;

@@ -25,0 +27,0 @@ /**

@@ -70,8 +70,16 @@ "use strict";

}
return {
parent: parent,
key: token,
value: object,
};
return { parent, key: token, value: object };
}
get(object) {
return this.evaluate(object).value;
}
set(object, value) {
for (var i = 1, l = this.tokens.length - 1, token = this.tokens[i]; i < l; i++) {
// not sure if this the best way to handle non-existant paths...
object = (object || {})[token];
}
if (object) {
object[this.tokens[this.tokens.length - 1]] = value;
}
}
push(token) {

@@ -78,0 +86,0 @@ // mutable

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