Comparing version 1.0.2 to 1.0.3
24
dist.js
@@ -45,2 +45,15 @@ (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 objectType(object) { | ||
if (object === undefined) { | ||
return 'undefined'; | ||
} | ||
if (object === null) { | ||
return 'null'; | ||
} | ||
if (Array.isArray(object)) { | ||
return 'array'; | ||
} | ||
return typeof object; | ||
} | ||
/** | ||
@@ -158,11 +171,10 @@ All diff* functions should return a list of operations, often empty. | ||
function diffAny(input, output, ptr) { | ||
// Arrays first, since Arrays are subsets of Objects | ||
if (Array.isArray(input) && Array.isArray(output)) { | ||
var input_type = objectType(input); | ||
var output_type = objectType(output); | ||
if (input_type == 'array' && output_type == 'array') { | ||
return diffArrays(input, output, ptr); | ||
} | ||
if (input === Object(input) && output === Object(output)) { | ||
if (input_type == 'object' && output_type == 'object') { | ||
return diffObjects(input, output, ptr); | ||
} | ||
// only pairs of arrays and objects can go down a path to produce a smaller | ||
@@ -405,3 +417,3 @@ // diff; everything else must be wholesale replaced if inequal | ||
"name": "rfc6902", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Complete implementation of RFC6902 (patch and diff)", | ||
@@ -408,0 +420,0 @@ "keywords": [ |
{ | ||
"name": "rfc6902", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Complete implementation of RFC6902 (patch and diff)", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
34788
635
0