Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
array.js41 linesDownload Raw Back to diff
1"use strict";
2var __extends = (this && this.__extends) || (function () {
3    var extendStatics = function (d, b) {
4        extendStatics = Object.setPrototypeOf ||
5            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7        return extendStatics(d, b);
8    };
9    return function (d, b) {
10        if (typeof b !== "function" && b !== null)
11            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12        extendStatics(d, b);
13        function __() { this.constructor = d; }
14        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15    };
16})();
17Object.defineProperty(exports, "__esModule", { value: true });
18exports.arrayDiff = void 0;
19exports.diffArrays = diffArrays;
20var base_js_1 = require("./base.js");
21var ArrayDiff = /** @class */ (function (_super) {
22    __extends(ArrayDiff, _super);
23    function ArrayDiff() {
24        return _super !== null && _super.apply(this, arguments) || this;
25    }
26    ArrayDiff.prototype.tokenize = function (value) {
27        return value.slice();
28    };
29    ArrayDiff.prototype.join = function (value) {
30        return value;
31    };
32    ArrayDiff.prototype.removeEmpty = function (value) {
33        return value;
34    };
35    return ArrayDiff;
36}(base_js_1.default));
37exports.arrayDiff = new ArrayDiff();
38function diffArrays(oldArr, newArr, options) {
39    return exports.arrayDiff.diff(oldArr, newArr, options);
40}
41 
codekingpro/portable-devtools · Team Ai