New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@as-com/jsondiffpatch

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@as-com/jsondiffpatch - npm Package Compare versions

Comparing version 2.4.1 to 2.4.2

esm/clone.d.ts

6

lib/contexts/context.js
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var pipe_1 = __importDefault(require("../pipe"));
var tslib_1 = require("tslib");
var pipe_1 = tslib_1.__importDefault(require("../pipe"));
var Context = /** @class */ (function () {

@@ -8,0 +6,0 @@ function Context() {

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var context_1 = __importDefault(require("./context"));
var clone_1 = __importDefault(require("../clone"));
var tslib_1 = require("tslib");
var context_1 = tslib_1.__importDefault(require("./context"));
var clone_1 = tslib_1.__importDefault(require("../clone"));
var DiffContext = /** @class */ (function (_super) {
__extends(DiffContext, _super);
tslib_1.__extends(DiffContext, _super);
function DiffContext(left, right) {

@@ -24,0 +9,0 @@ var _this = _super.call(this) || this;

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var context_1 = __importDefault(require("./context"));
var tslib_1 = require("tslib");
var context_1 = tslib_1.__importDefault(require("./context"));
var PatchContext = /** @class */ (function (_super) {
__extends(PatchContext, _super);
tslib_1.__extends(PatchContext, _super);
function PatchContext(left, delta) {

@@ -23,0 +8,0 @@ var _this = _super.call(this) || this;

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var processor_1 = __importDefault(require("./processor"));
var pipe_1 = __importDefault(require("./pipe"));
var diff_1 = __importDefault(require("./contexts/diff"));
var patch_1 = __importDefault(require("./contexts/patch"));
var clone_1 = __importDefault(require("./clone"));
var trivial = __importStar(require("./filters/trivial"));
var nested = __importStar(require("./filters/nested"));
var arrays = __importStar(require("./filters/arrays"));
var dates = __importStar(require("./filters/dates"));
var texts = __importStar(require("./filters/texts"));
var tslib_1 = require("tslib");
var processor_1 = tslib_1.__importDefault(require("./processor"));
var pipe_1 = tslib_1.__importDefault(require("./pipe"));
var diff_1 = tslib_1.__importDefault(require("./contexts/diff"));
var patch_1 = tslib_1.__importDefault(require("./contexts/patch"));
var clone_1 = tslib_1.__importDefault(require("./clone"));
var trivial = tslib_1.__importStar(require("./filters/trivial"));
var nested = tslib_1.__importStar(require("./filters/nested"));
var arrays = tslib_1.__importStar(require("./filters/arrays"));
var dates = tslib_1.__importStar(require("./filters/dates"));
var texts = tslib_1.__importStar(require("./filters/texts"));
var DiffPatcher = /** @class */ (function () {

@@ -24,0 +15,0 @@ function DiffPatcher(options) {

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var diff_1 = __importDefault(require("../contexts/diff"));
var patch_1 = __importDefault(require("../contexts/patch"));
var lcs_1 = __importDefault(require("./lcs"));
var tslib_1 = require("tslib");
var diff_1 = tslib_1.__importDefault(require("../contexts/diff"));
var patch_1 = tslib_1.__importDefault(require("../contexts/patch"));
var lcs_1 = tslib_1.__importDefault(require("./lcs"));
var ARRAY_MOVE = 3;

@@ -10,0 +8,0 @@ var isArray = typeof Array.isArray === 'function' ? Array.isArray : function (a) { return a instanceof Array; };

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var diff_1 = __importDefault(require("../contexts/diff"));
var patch_1 = __importDefault(require("../contexts/patch"));
var tslib_1 = require("tslib");
var diff_1 = tslib_1.__importDefault(require("../contexts/diff"));
var patch_1 = tslib_1.__importDefault(require("../contexts/patch"));
function collectChildrenDiffFilter(context) {

@@ -9,0 +7,0 @@ if (!context || !context.children) {

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
/* global diff_match_patch */
var diff_match_patch_1 = __importDefault(require("diff-match-patch"));
var diff_match_patch_1 = tslib_1.__importDefault(require("diff-match-patch"));
var TEXT_DIFF = 2;

@@ -9,0 +7,0 @@ var DEFAULT_MIN_LENGTH = 60;

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var base_1 = __importDefault(require("./base"));
var tslib_1 = require("tslib");
var base_1 = tslib_1.__importDefault(require("./base"));
var AnnotatedFormatter = /** @class */ (function (_super) {
__extends(AnnotatedFormatter, _super);
tslib_1.__extends(AnnotatedFormatter, _super);
function AnnotatedFormatter() {

@@ -23,0 +8,0 @@ var _this = _super.call(this) || this;

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var chalk_1 = __importDefault(require("chalk"));
var base_1 = __importDefault(require("./base"));
var tslib_1 = require("tslib");
var chalk_1 = tslib_1.__importDefault(require("chalk"));
var base_1 = tslib_1.__importDefault(require("./base"));
function chalkColor(name) {

@@ -41,3 +26,3 @@ return ((chalk_1.default && chalk_1.default[name]) ||

var ConsoleFormatter = /** @class */ (function (_super) {
__extends(ConsoleFormatter, _super);
tslib_1.__extends(ConsoleFormatter, _super);
function ConsoleFormatter() {

@@ -44,0 +29,0 @@ var _this = _super.call(this) || this;

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var base_1 = __importDefault(require("./base"));
var tslib_1 = require("tslib");
var base_1 = tslib_1.__importDefault(require("./base"));
var HtmlFormatter = /** @class */ (function (_super) {
__extends(HtmlFormatter, _super);
tslib_1.__extends(HtmlFormatter, _super);
function HtmlFormatter() {

@@ -23,0 +8,0 @@ return _super !== null && _super.apply(this, arguments) || this;

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var base_1 = __importDefault(require("./base"));
var tslib_1 = require("tslib");
var base_1 = tslib_1.__importDefault(require("./base"));
var OPERATIONS = {

@@ -34,3 +12,3 @@ add: 'add',

var JSONFormatter = /** @class */ (function (_super) {
__extends(JSONFormatter, _super);
tslib_1.__extends(JSONFormatter, _super);
function JSONFormatter() {

@@ -171,3 +149,3 @@ var _this = _super.call(this) || this;

var removeOpsReverse = opsByDescendingOrder(removedOps);
return __spreadArrays(removeOpsReverse, moveOps, restOps);
return tslib_1.__spreadArrays(removeOpsReverse, moveOps, restOps);
};

@@ -174,0 +152,0 @@ var defaultInstance;

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var diffpatcher_1 = __importDefault(require("./diffpatcher"));
var tslib_1 = require("tslib");
var diffpatcher_1 = tslib_1.__importDefault(require("./diffpatcher"));
exports.DiffPatcher = diffpatcher_1.default;
exports.formatters = __importStar(require("./formatters/index"));
exports.console = __importStar(require("./formatters/console"));
exports.formatters = tslib_1.__importStar(require("./formatters/index"));
exports.console = tslib_1.__importStar(require("./formatters/console"));
function create(options) {

@@ -21,3 +12,3 @@ return new diffpatcher_1.default(options);

exports.create = create;
var date_reviver_1 = __importDefault(require("./date-reviver"));
var date_reviver_1 = tslib_1.__importDefault(require("./date-reviver"));
exports.dateReviver = date_reviver_1.default;

@@ -24,0 +15,0 @@ var defaultInstance;

{
"name": "@as-com/jsondiffpatch",
"version": "2.4.1",
"version": "2.4.2",
"author": "Andrew Sun",

@@ -11,5 +11,7 @@ "description": "Diff & Patch for Javascript objects",

"main": "lib/main.js",
"module": "esm/main.js",
"types": "./dist/index",
"files": [
"lib",
"esm",
"bin"

@@ -21,2 +23,3 @@ ],

"scripts": {
"build": "tsc --build tsconfig.json && tsc --build tsconfig_esm.json",
"lint": "eslint .",

@@ -41,3 +44,4 @@ "bump": "gulp bump",

"chalk": "^2.3.0",
"diff-match-patch": "^1.0.0"
"diff-match-patch": "^1.0.0",
"tslib": "^1.11.1"
},

@@ -44,0 +48,0 @@ "devDependencies": {

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