Skip to content

Commit

Permalink
feat: Cleaned up vars vs consts
Browse files Browse the repository at this point in the history
  • Loading branch information
Starcounter-Jack committed Mar 24, 2022
1 parent 8a6a360 commit 51964ed
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 50 deletions.
18 changes: 9 additions & 9 deletions commonjs/helpers.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* https://github.com/Starcounter-Jack/JSON-Patch
* (c) 2017 Joachim Wester
* MIT license
* (c) 2017-2022 Joachim Wester
* MIT licensed
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
Expand All @@ -24,11 +24,11 @@ function hasOwnProperty(obj, key) {
exports.hasOwnProperty = hasOwnProperty;
function _objectKeys(obj) {
if (Array.isArray(obj)) {
var keys = new Array(obj.length);
for (var k = 0; k < keys.length; k++) {
keys[k] = "" + k;
var keys_1 = new Array(obj.length);
for (var k = 0; k < keys_1.length; k++) {
keys_1[k] = "" + k;
}
return keys;
return keys_1;
}
if (Object.keys) {
return Object.keys(obj);
Expand Down Expand Up @@ -122,7 +122,7 @@ function getPath(root, obj) {
if (path === '') {
throw new Error("Object not found in root");
}
return '/' + path;
return "/" + path;
}
exports.getPath = getPath;
/**
Expand All @@ -134,8 +134,8 @@ function hasUndefined(obj) {
}
if (obj) {
if (Array.isArray(obj)) {
for (var i = 0, len = obj.length; i < len; i++) {
if (hasUndefined(obj[i])) {
for (var i_1 = 0, len = obj.length; i_1 < len; i_1++) {
if (hasUndefined(obj[i_1])) {
return true;
}
}
Expand Down
18 changes: 9 additions & 9 deletions dist/fast-json-patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ var jsonpatch =

/*!
* https://github.com/Starcounter-Jack/JSON-Patch
* (c) 2017 Joachim Wester
* MIT license
* (c) 2017-2022 Joachim Wester
* MIT licensed
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
Expand All @@ -116,11 +116,11 @@ function hasOwnProperty(obj, key) {
exports.hasOwnProperty = hasOwnProperty;
function _objectKeys(obj) {
if (Array.isArray(obj)) {
var keys = new Array(obj.length);
for (var k = 0; k < keys.length; k++) {
keys[k] = "" + k;
var keys_1 = new Array(obj.length);
for (var k = 0; k < keys_1.length; k++) {
keys_1[k] = "" + k;
}
return keys;
return keys_1;
}
if (Object.keys) {
return Object.keys(obj);
Expand Down Expand Up @@ -214,7 +214,7 @@ function getPath(root, obj) {
if (path === '') {
throw new Error("Object not found in root");
}
return '/' + path;
return "/" + path;
}
exports.getPath = getPath;
/**
Expand All @@ -226,8 +226,8 @@ function hasUndefined(obj) {
}
if (obj) {
if (Array.isArray(obj)) {
for (var i = 0, len = obj.length; i < len; i++) {
if (hasUndefined(obj[i])) {
for (var i_1 = 0, len = obj.length; i_1 < len; i_1++) {
if (hasUndefined(obj[i_1])) {
return true;
}
}
Expand Down
Loading

0 comments on commit 51964ed

Please sign in to comment.