object-manipulation
Advanced tools
Comparing version 1.0.4 to 1.0.5
18
index.js
class ObjectManager{} | ||
ObjectManager.getDiffList = function(obj1, obj2, skipableRecursive){ | ||
ObjectManager.prototype.getDiffList = function(obj1, obj2, skipableRecursive){ | ||
if (this.isFunction(obj1) || this.isFunction(obj2)){ | ||
@@ -102,3 +102,3 @@ throw 'Invalid argument. Function given, object expected.'; | ||
ObjectManager.passNew = function(obj1, obj2, skipableRecursive){ | ||
ObjectManager.prototype.passNew = function(obj1, obj2, skipableRecursive){ | ||
var diff = this.getDiffList(obj1, obj2, skipableRecursive); | ||
@@ -132,3 +132,3 @@ | ||
ObjectManager.compareValues = function(original, current){ | ||
ObjectManager.prototype.compareValues = function(original, current){ | ||
//Equal? | ||
@@ -154,19 +154,19 @@ if (original == current){ | ||
ObjectManager.isFunction = function(obj){ | ||
ObjectManager.prototype.isFunction = function(obj){ | ||
return {}.toString.apply(obj) === '[object Function]'; | ||
}; | ||
ObjectManager.isObject = function(obj){ | ||
ObjectManager.prototype.isObject = function(obj){ | ||
return {}.toString.apply(obj) === '[object Object]'; | ||
}; | ||
ObjectManager.isArray = function(obj){ | ||
ObjectManager.prototype.isArray = function(obj){ | ||
return {}.toString.apply(obj) === '[object Array]'; | ||
}; | ||
ObjectManager.isValue = function(obj){ | ||
ObjectManager.prototype.isValue = function(obj){ | ||
return !this.isObject(obj) && !this.isArray(obj); | ||
}; | ||
ObjectManager.merg = function (obj1, obj2, recursive = true){ | ||
ObjectManager.prototype.merg = function (obj1, obj2, recursive = true){ | ||
if (typeof(obj1) != "object"){ | ||
@@ -194,3 +194,3 @@ obj1 = {}; | ||
ObjectManager.firstUndefined = function(array = [], overflow = 1000){ | ||
ObjectManager.prototype.firstUndefined = function(array = [], overflow = 1000){ | ||
if (this.isArray(array)){ | ||
@@ -197,0 +197,0 @@ let index = 0; |
{ | ||
"name": "object-manipulation", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "nodejs object manipulation library", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
7358