Skip to content

Commit 51964ed

Browse files
feat: Cleaned up vars vs consts
1 parent 8a6a360 commit 51964ed

File tree

6 files changed

+50
-50
lines changed

6 files changed

+50
-50
lines changed

commonjs/helpers.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* https://github.com/Starcounter-Jack/JSON-Patch
3-
* (c) 2017 Joachim Wester
4-
* MIT license
3+
* (c) 2017-2022 Joachim Wester
4+
* MIT licensed
55
*/
66
var __extends = (this && this.__extends) || (function () {
77
var extendStatics = function (d, b) {
@@ -24,11 +24,11 @@ function hasOwnProperty(obj, key) {
2424
exports.hasOwnProperty = hasOwnProperty;
2525
function _objectKeys(obj) {
2626
if (Array.isArray(obj)) {
27-
var keys = new Array(obj.length);
28-
for (var k = 0; k < keys.length; k++) {
29-
keys[k] = "" + k;
27+
var keys_1 = new Array(obj.length);
28+
for (var k = 0; k < keys_1.length; k++) {
29+
keys_1[k] = "" + k;
3030
}
31-
return keys;
31+
return keys_1;
3232
}
3333
if (Object.keys) {
3434
return Object.keys(obj);
@@ -122,7 +122,7 @@ function getPath(root, obj) {
122122
if (path === '') {
123123
throw new Error("Object not found in root");
124124
}
125-
return '/' + path;
125+
return "/" + path;
126126
}
127127
exports.getPath = getPath;
128128
/**
@@ -134,8 +134,8 @@ function hasUndefined(obj) {
134134
}
135135
if (obj) {
136136
if (Array.isArray(obj)) {
137-
for (var i = 0, len = obj.length; i < len; i++) {
138-
if (hasUndefined(obj[i])) {
137+
for (var i_1 = 0, len = obj.length; i_1 < len; i_1++) {
138+
if (hasUndefined(obj[i_1])) {
139139
return true;
140140
}
141141
}

dist/fast-json-patch.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ var jsonpatch =
9292

9393
/*!
9494
* https://github.com/Starcounter-Jack/JSON-Patch
95-
* (c) 2017 Joachim Wester
96-
* MIT license
95+
* (c) 2017-2022 Joachim Wester
96+
* MIT licensed
9797
*/
9898
var __extends = (this && this.__extends) || (function () {
9999
var extendStatics = function (d, b) {
@@ -116,11 +116,11 @@ function hasOwnProperty(obj, key) {
116116
exports.hasOwnProperty = hasOwnProperty;
117117
function _objectKeys(obj) {
118118
if (Array.isArray(obj)) {
119-
var keys = new Array(obj.length);
120-
for (var k = 0; k < keys.length; k++) {
121-
keys[k] = "" + k;
119+
var keys_1 = new Array(obj.length);
120+
for (var k = 0; k < keys_1.length; k++) {
121+
keys_1[k] = "" + k;
122122
}
123-
return keys;
123+
return keys_1;
124124
}
125125
if (Object.keys) {
126126
return Object.keys(obj);
@@ -214,7 +214,7 @@ function getPath(root, obj) {
214214
if (path === '') {
215215
throw new Error("Object not found in root");
216216
}
217-
return '/' + path;
217+
return "/" + path;
218218
}
219219
exports.getPath = getPath;
220220
/**
@@ -226,8 +226,8 @@ function hasUndefined(obj) {
226226
}
227227
if (obj) {
228228
if (Array.isArray(obj)) {
229-
for (var i = 0, len = obj.length; i < len; i++) {
230-
if (hasUndefined(obj[i])) {
229+
for (var i_1 = 0, len = obj.length; i_1 < len; i_1++) {
230+
if (hasUndefined(obj[i_1])) {
231231
return true;
232232
}
233233
}

0 commit comments

Comments
 (0)