@@ -82,6 +82,11 @@ var __extends = (this && this.__extends) || function (d, b) {
82
82
* (c) 2017 Joachim Wester
83
83
* MIT license
84
84
*/
85
+ var _hasOwnProperty = Object . prototype . hasOwnProperty ;
86
+ function hasOwnProperty ( obj , key ) {
87
+ return _hasOwnProperty . call ( obj , key ) ;
88
+ }
89
+ exports . hasOwnProperty = hasOwnProperty ;
85
90
function _objectKeys ( obj ) {
86
91
if ( Array . isArray ( obj ) ) {
87
92
var keys = new Array ( obj . length ) ;
@@ -95,7 +100,7 @@ function _objectKeys(obj) {
95
100
}
96
101
var keys = [ ] ;
97
102
for ( var i in obj ) {
98
- if ( Object . prototype . hasOwnProperty . call ( obj , i ) ) {
103
+ if ( hasOwnProperty ( obj , i ) ) {
99
104
keys . push ( i ) ;
100
105
}
101
106
}
@@ -159,7 +164,7 @@ exports.unescapePathComponent = unescapePathComponent;
159
164
function _getPathRecursive ( root , obj ) {
160
165
var found ;
161
166
for ( var key in root ) {
162
- if ( Object . prototype . hasOwnProperty . call ( root , key ) ) {
167
+ if ( hasOwnProperty ( root , key ) ) {
163
168
if ( root [ key ] === obj ) {
164
169
return escapePathComponent ( key ) + '/' ;
165
170
}
@@ -876,7 +881,7 @@ function _generate(mirror, obj, patches, path) {
876
881
for ( var t = oldKeys . length - 1 ; t >= 0 ; t -- ) {
877
882
var key = oldKeys [ t ] ;
878
883
var oldVal = mirror [ key ] ;
879
- if ( Object . prototype . hasOwnProperty . call ( obj , key ) && ! ( obj [ key ] === undefined && oldVal !== undefined && Array . isArray ( obj ) === false ) ) {
884
+ if ( helpers_1 . hasOwnProperty ( obj , key ) && ! ( obj [ key ] === undefined && oldVal !== undefined && Array . isArray ( obj ) === false ) ) {
880
885
var newVal = obj [ key ] ;
881
886
if ( typeof oldVal == "object" && oldVal != null && typeof newVal == "object" && newVal != null ) {
882
887
_generate ( oldVal , newVal , patches , path + "/" + helpers_1 . escapePathComponent ( key ) ) ;
@@ -898,7 +903,7 @@ function _generate(mirror, obj, patches, path) {
898
903
}
899
904
for ( var t = 0 ; t < newKeys . length ; t ++ ) {
900
905
var key = newKeys [ t ] ;
901
- if ( ! Object . prototype . hasOwnProperty . call ( mirror , key ) && obj [ key ] !== undefined ) {
906
+ if ( ! helpers_1 . hasOwnProperty ( mirror , key ) && obj [ key ] !== undefined ) {
902
907
patches . push ( { op : "add" , path : path + "/" + helpers_1 . escapePathComponent ( key ) , value : helpers_1 . _deepClone ( obj [ key ] ) } ) ;
903
908
}
904
909
}
0 commit comments