Comparing version 0.0.3 to 0.0.4
@@ -5,23 +5,13 @@ /*jslint node: true */ | ||
var cloneLib = require('clone'); | ||
var util = require('util'); | ||
var equalLib = require('deep-equal'); | ||
var diffLib = require('deep-diff'); | ||
var sep = '.'; | ||
var tools = require('./tools'); | ||
function split (path) { | ||
return (path ? path.split(sep) : []); | ||
} | ||
function join (pathElements) { | ||
return pathElements.join(sep); | ||
} | ||
var createPath = require('./methods/createPath').createPath; | ||
var createProperty = require('./methods/createProperty').createProperty; | ||
function isArrayIndex (pathElement) { | ||
return /[0-9]+/.test(pathElement); | ||
} | ||
exports.createPath = createPath; | ||
exports.createProperty = createProperty; | ||
function isArray (object) { | ||
return util.isArray(object); | ||
} | ||
exports.diff = function deepDiff (object1, object2, path) { | ||
@@ -130,6 +120,4 @@ | ||
if (value !== undefined) { | ||
var pathElements = split(path); | ||
var pathElements = tools.split(path); | ||
var propertyName = path; | ||
var nextLevelName; | ||
var levelName; | ||
@@ -141,25 +129,11 @@ if (pathElements.length > 1) { | ||
for (var i = 0; i < pathElements.length; i++) { | ||
levelName = pathElements[i]; | ||
// create path if needed | ||
var root = tools.join(pathElements); | ||
createPath(object, root); | ||
if (!object[levelName] || typeof object[levelName] !== 'object') { | ||
nextLevelName = (i + 1 < pathElements.length ? pathElements[i + 1] : propertyName); | ||
var nextIsArrayIndex = isArrayIndex(nextLevelName); | ||
if (nextIsArrayIndex) { | ||
object[levelName] = []; | ||
} | ||
else { | ||
object[levelName] = {}; | ||
} | ||
} | ||
if (typeof object === 'object' && object !== null && object.hasOwnProperty(levelName)) { | ||
// rebase object on next depth | ||
object = object[levelName]; | ||
} | ||
} | ||
// rebase object | ||
object = exports.get(object, root); | ||
} | ||
if (isArray(object)) { | ||
if (tools.isArray(object)) { | ||
object[parseInt(propertyName)] = value; | ||
@@ -191,3 +165,3 @@ } | ||
var targets = split(path); | ||
var targets = tools.split(path); | ||
var value = object; | ||
@@ -219,3 +193,3 @@ var property; | ||
exports.delete = function deepDelete (object, path) { | ||
var pathElements = split(path); | ||
var pathElements = tools.split(path); | ||
var propertyName = path; | ||
@@ -225,3 +199,3 @@ | ||
propertyName = pathElements.pop(); | ||
path = join(pathElements); | ||
path = tools.join(pathElements); | ||
} | ||
@@ -237,3 +211,3 @@ | ||
if (isArray(object)) { | ||
if (tools.isArray(object)) { | ||
object.splice(propertyName, 1); | ||
@@ -253,3 +227,3 @@ } | ||
if (isArray(object) && !isArrayIndex(property)) { | ||
if (tools.isArray(object) && !tools.isArrayIndex(property)) { | ||
// array properties that are not numbers (length,...) have to be ignored | ||
@@ -260,3 +234,3 @@ // do nothing | ||
var newPath = (path ? path + sep + property : property); | ||
var newPath = (path ? path + tools.sep + property : property); | ||
@@ -263,0 +237,0 @@ var subproperties = getPaths(object[property], newPath); |
{ | ||
"name": "deep-lib", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "clone": { |
{ | ||
"name": "deep-lib", | ||
"license": "MIT", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"homepage": "https://github.com/CoderSyndicate/deep-lib", | ||
@@ -6,0 +6,0 @@ "author": "https://github.com/CoderSyndicate/deep-lib/graphs/contributors", |
{ | ||
"/home/nysos/dev/deep-lib/lib/deep-lib.js":{"path":"/home/nysos/dev/deep-lib/lib/deep-lib.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":88,"8":1,"9":9,"10":1,"11":25,"12":1,"13":92,"14":1,"15":7,"16":1,"17":1,"18":7,"19":1,"20":2,"21":1,"22":2,"23":2,"24":2,"25":23,"26":6,"27":2,"28":1,"29":4,"30":2,"31":2,"32":4,"33":4,"34":1,"35":3,"36":1,"37":1,"38":3,"39":1,"40":11,"41":1,"42":11,"43":1,"44":17,"45":16,"46":16,"47":16,"48":16,"49":16,"50":15,"51":15,"52":45,"53":45,"54":9,"55":9,"56":9,"57":3,"58":6,"59":45,"60":45,"61":16,"62":3,"63":13,"64":1,"65":3,"66":3,"67":3,"68":1,"69":62,"70":62,"71":62,"72":62,"73":175,"74":175,"75":161,"76":14,"77":48,"78":1,"79":10,"80":10,"81":10,"82":9,"83":9,"84":10,"85":10,"86":4,"87":6,"88":6,"89":3,"90":3,"91":6,"92":1,"93":26,"94":26,"95":70,"96":62,"97":23,"98":23,"99":23,"100":39,"101":39,"102":26},"b":{"1":[88,0],"2":[1,6],"3":[1,1],"4":[6,17],"5":[2,2],"6":[1,2],"7":[1,10],"8":[16,1],"9":[15,1],"10":[9,36],"11":[45,37],"12":[3,6],"13":[3,6],"14":[45,0],"15":[45,45,45],"16":[3,13],"17":[161,14],"18":[175,175,175],"19":[9,1],"20":[4,6],"21":[3,3],"22":[8,62],"23":[70,16],"24":[23,39],"25":[62,23],"26":[20,3],"27":[39,0]},"f":{"1":88,"2":9,"3":25,"4":92,"5":7,"6":2,"7":23,"8":4,"9":3,"10":11,"11":17,"12":3,"13":62,"14":10,"15":26,"16":70},"fnMap":{"1":{"name":"split","line":10,"loc":{"start":{"line":10,"column":0},"end":{"line":10,"column":22}}},"2":{"name":"join","line":14,"loc":{"start":{"line":14,"column":0},"end":{"line":14,"column":29}}},"3":{"name":"isArrayIndex","line":18,"loc":{"start":{"line":18,"column":0},"end":{"line":18,"column":36}}},"4":{"name":"isArray","line":22,"loc":{"start":{"line":22,"column":0},"end":{"line":22,"column":26}}},"5":{"name":"deepDiff","line":26,"loc":{"start":{"line":26,"column":15},"end":{"line":26,"column":58}}},"6":{"name":"deepSelect","line":37,"loc":{"start":{"line":37,"column":17},"end":{"line":37,"column":59}}},"7":{"name":"(anonymous_7)","line":47,"loc":{"start":{"line":47,"column":18},"end":{"line":47,"column":39}}},"8":{"name":"deepEqual","line":66,"loc":{"start":{"line":66,"column":16},"end":{"line":66,"column":60}}},"9":{"name":"deepSame","line":96,"loc":{"start":{"line":96,"column":15},"end":{"line":96,"column":58}}},"10":{"name":"deepClone","line":117,"loc":{"start":{"line":117,"column":16},"end":{"line":117,"column":50}}},"11":{"name":"deepAdd","line":127,"loc":{"start":{"line":127,"column":14},"end":{"line":127,"column":53}}},"12":{"name":"deepMove","line":170,"loc":{"start":{"line":170,"column":15},"end":{"line":170,"column":60}}},"13":{"name":"deepGet","line":186,"loc":{"start":{"line":186,"column":14},"end":{"line":186,"column":46}}},"14":{"name":"deepDelete","line":214,"loc":{"start":{"line":214,"column":17},"end":{"line":214,"column":52}}},"15":{"name":"getPaths","line":241,"loc":{"start":{"line":241,"column":19},"end":{"line":241,"column":52}}},"16":{"name":"propertyIterator","line":244,"loc":{"start":{"line":244,"column":47},"end":{"line":244,"column":83}}}},"statementMap":{"1":{"start":{"line":4,"column":0},"end":{"line":4,"column":32}},"2":{"start":{"line":5,"column":0},"end":{"line":5,"column":31}},"3":{"start":{"line":6,"column":0},"end":{"line":6,"column":37}},"4":{"start":{"line":7,"column":0},"end":{"line":7,"column":36}},"5":{"start":{"line":8,"column":0},"end":{"line":8,"column":19}},"6":{"start":{"line":10,"column":0},"end":{"line":12,"column":1}},"7":{"start":{"line":11,"column":4},"end":{"line":11,"column":41}},"8":{"start":{"line":14,"column":0},"end":{"line":16,"column":1}},"9":{"start":{"line":15,"column":4},"end":{"line":15,"column":34}},"10":{"start":{"line":18,"column":0},"end":{"line":20,"column":1}},"11":{"start":{"line":19,"column":4},"end":{"line":19,"column":38}},"12":{"start":{"line":22,"column":0},"end":{"line":24,"column":1}},"13":{"start":{"line":23,"column":4},"end":{"line":23,"column":32}},"14":{"start":{"line":26,"column":0},"end":{"line":35,"column":2}},"15":{"start":{"line":28,"column":4},"end":{"line":32,"column":5}},"16":{"start":{"line":30,"column":8},"end":{"line":30,"column":45}},"17":{"start":{"line":31,"column":8},"end":{"line":31,"column":45}},"18":{"start":{"line":34,"column":4},"end":{"line":34,"column":42}},"19":{"start":{"line":37,"column":0},"end":{"line":54,"column":2}},"20":{"start":{"line":39,"column":4},"end":{"line":42,"column":5}},"21":{"start":{"line":41,"column":8},"end":{"line":41,"column":43}},"22":{"start":{"line":44,"column":4},"end":{"line":44,"column":43}},"23":{"start":{"line":45,"column":4},"end":{"line":45,"column":21}},"24":{"start":{"line":47,"column":4},"end":{"line":51,"column":7}},"25":{"start":{"line":48,"column":8},"end":{"line":50,"column":9}},"26":{"start":{"line":49,"column":12},"end":{"line":49,"column":36}},"27":{"start":{"line":53,"column":4},"end":{"line":53,"column":19}},"28":{"start":{"line":66,"column":0},"end":{"line":84,"column":2}},"29":{"start":{"line":68,"column":4},"end":{"line":72,"column":5}},"30":{"start":{"line":70,"column":8},"end":{"line":70,"column":45}},"31":{"start":{"line":71,"column":8},"end":{"line":71,"column":45}},"32":{"start":{"line":79,"column":4},"end":{"line":79,"column":65}},"33":{"start":{"line":83,"column":4},"end":{"line":83,"column":19}},"34":{"start":{"line":96,"column":0},"end":{"line":105,"column":2}},"35":{"start":{"line":98,"column":4},"end":{"line":102,"column":5}},"36":{"start":{"line":100,"column":8},"end":{"line":100,"column":45}},"37":{"start":{"line":101,"column":8},"end":{"line":101,"column":45}},"38":{"start":{"line":104,"column":4},"end":{"line":104,"column":33}},"39":{"start":{"line":117,"column":0},"end":{"line":125,"column":2}},"40":{"start":{"line":119,"column":4},"end":{"line":122,"column":5}},"41":{"start":{"line":121,"column":8},"end":{"line":121,"column":43}},"42":{"start":{"line":124,"column":4},"end":{"line":124,"column":28}},"43":{"start":{"line":127,"column":0},"end":{"line":168,"column":2}},"44":{"start":{"line":128,"column":4},"end":{"line":167,"column":5}},"45":{"start":{"line":129,"column":8},"end":{"line":129,"column":39}},"46":{"start":{"line":130,"column":8},"end":{"line":130,"column":32}},"47":{"start":{"line":131,"column":8},"end":{"line":131,"column":26}},"48":{"start":{"line":132,"column":8},"end":{"line":132,"column":22}},"49":{"start":{"line":134,"column":8},"end":{"line":159,"column":9}},"50":{"start":{"line":137,"column":12},"end":{"line":137,"column":46}},"51":{"start":{"line":139,"column":12},"end":{"line":158,"column":13}},"52":{"start":{"line":140,"column":16},"end":{"line":140,"column":48}},"53":{"start":{"line":142,"column":16},"end":{"line":152,"column":17}},"54":{"start":{"line":143,"column":20},"end":{"line":143,"column":103}},"55":{"start":{"line":144,"column":20},"end":{"line":144,"column":71}},"56":{"start":{"line":146,"column":20},"end":{"line":151,"column":21}},"57":{"start":{"line":147,"column":24},"end":{"line":147,"column":47}},"58":{"start":{"line":150,"column":24},"end":{"line":150,"column":47}},"59":{"start":{"line":154,"column":16},"end":{"line":157,"column":17}},"60":{"start":{"line":156,"column":20},"end":{"line":156,"column":47}},"61":{"start":{"line":161,"column":8},"end":{"line":166,"column":9}},"62":{"start":{"line":162,"column":12},"end":{"line":162,"column":51}},"63":{"start":{"line":165,"column":12},"end":{"line":165,"column":41}},"64":{"start":{"line":170,"column":0},"end":{"line":175,"column":2}},"65":{"start":{"line":171,"column":4},"end":{"line":171,"column":45}},"66":{"start":{"line":173,"column":4},"end":{"line":173,"column":40}},"67":{"start":{"line":174,"column":4},"end":{"line":174,"column":36}},"68":{"start":{"line":186,"column":0},"end":{"line":203,"column":2}},"69":{"start":{"line":188,"column":4},"end":{"line":188,"column":30}},"70":{"start":{"line":189,"column":4},"end":{"line":189,"column":25}},"71":{"start":{"line":190,"column":4},"end":{"line":190,"column":17}},"72":{"start":{"line":192,"column":4},"end":{"line":200,"column":5}},"73":{"start":{"line":193,"column":8},"end":{"line":193,"column":30}},"74":{"start":{"line":195,"column":8},"end":{"line":199,"column":9}},"75":{"start":{"line":196,"column":12},"end":{"line":196,"column":36}},"76":{"start":{"line":198,"column":12},"end":{"line":198,"column":19}},"77":{"start":{"line":202,"column":4},"end":{"line":202,"column":17}},"78":{"start":{"line":214,"column":0},"end":{"line":239,"column":2}},"79":{"start":{"line":215,"column":4},"end":{"line":215,"column":35}},"80":{"start":{"line":216,"column":4},"end":{"line":216,"column":28}},"81":{"start":{"line":218,"column":4},"end":{"line":221,"column":5}},"82":{"start":{"line":219,"column":8},"end":{"line":219,"column":42}},"83":{"start":{"line":220,"column":8},"end":{"line":220,"column":42}},"84":{"start":{"line":223,"column":4},"end":{"line":223,"column":39}},"85":{"start":{"line":225,"column":4},"end":{"line":227,"column":5}},"86":{"start":{"line":226,"column":8},"end":{"line":226,"column":15}},"87":{"start":{"line":229,"column":4},"end":{"line":229,"column":39}},"88":{"start":{"line":231,"column":4},"end":{"line":236,"column":5}},"89":{"start":{"line":232,"column":8},"end":{"line":232,"column":39}},"90":{"start":{"line":235,"column":8},"end":{"line":235,"column":36}},"91":{"start":{"line":238,"column":4},"end":{"line":238,"column":17}},"92":{"start":{"line":241,"column":0},"end":{"line":265,"column":2}},"93":{"start":{"line":242,"column":4},"end":{"line":242,"column":24}},"94":{"start":{"line":244,"column":4},"end":{"line":262,"column":7}},"95":{"start":{"line":246,"column":8},"end":{"line":261,"column":9}},"96":{"start":{"line":250,"column":13},"end":{"line":261,"column":9}},"97":{"start":{"line":252,"column":12},"end":{"line":252,"column":68}},"98":{"start":{"line":254,"column":12},"end":{"line":254,"column":68}},"99":{"start":{"line":256,"column":12},"end":{"line":256,"column":58}},"100":{"start":{"line":259,"column":12},"end":{"line":259,"column":65}},"101":{"start":{"line":260,"column":12},"end":{"line":260,"column":34}},"102":{"start":{"line":264,"column":4},"end":{"line":264,"column":22}}},"branchMap":{"1":{"line":11,"type":"cond-expr","locations":[{"start":{"line":11,"column":19},"end":{"line":11,"column":34}},{"start":{"line":11,"column":37},"end":{"line":11,"column":39}}]},"2":{"line":28,"type":"if","locations":[{"start":{"line":28,"column":4},"end":{"line":28,"column":4}},{"start":{"line":28,"column":4},"end":{"line":28,"column":4}}]},"3":{"line":39,"type":"if","locations":[{"start":{"line":39,"column":4},"end":{"line":39,"column":4}},{"start":{"line":39,"column":4},"end":{"line":39,"column":4}}]},"4":{"line":48,"type":"if","locations":[{"start":{"line":48,"column":8},"end":{"line":48,"column":8}},{"start":{"line":48,"column":8},"end":{"line":48,"column":8}}]},"5":{"line":68,"type":"if","locations":[{"start":{"line":68,"column":4},"end":{"line":68,"column":4}},{"start":{"line":68,"column":4},"end":{"line":68,"column":4}}]},"6":{"line":98,"type":"if","locations":[{"start":{"line":98,"column":4},"end":{"line":98,"column":4}},{"start":{"line":98,"column":4},"end":{"line":98,"column":4}}]},"7":{"line":119,"type":"if","locations":[{"start":{"line":119,"column":4},"end":{"line":119,"column":4}},{"start":{"line":119,"column":4},"end":{"line":119,"column":4}}]},"8":{"line":128,"type":"if","locations":[{"start":{"line":128,"column":4},"end":{"line":128,"column":4}},{"start":{"line":128,"column":4},"end":{"line":128,"column":4}}]},"9":{"line":134,"type":"if","locations":[{"start":{"line":134,"column":8},"end":{"line":134,"column":8}},{"start":{"line":134,"column":8},"end":{"line":134,"column":8}}]},"10":{"line":142,"type":"if","locations":[{"start":{"line":142,"column":16},"end":{"line":142,"column":16}},{"start":{"line":142,"column":16},"end":{"line":142,"column":16}}]},"11":{"line":142,"type":"binary-expr","locations":[{"start":{"line":142,"column":20},"end":{"line":142,"column":38}},{"start":{"line":142,"column":42},"end":{"line":142,"column":79}}]},"12":{"line":143,"type":"cond-expr","locations":[{"start":{"line":143,"column":67},"end":{"line":143,"column":86}},{"start":{"line":143,"column":89},"end":{"line":143,"column":101}}]},"13":{"line":146,"type":"if","locations":[{"start":{"line":146,"column":20},"end":{"line":146,"column":20}},{"start":{"line":146,"column":20},"end":{"line":146,"column":20}}]},"14":{"line":154,"type":"if","locations":[{"start":{"line":154,"column":16},"end":{"line":154,"column":16}},{"start":{"line":154,"column":16},"end":{"line":154,"column":16}}]},"15":{"line":154,"type":"binary-expr","locations":[{"start":{"line":154,"column":20},"end":{"line":154,"column":46}},{"start":{"line":154,"column":50},"end":{"line":154,"column":65}},{"start":{"line":154,"column":69},"end":{"line":154,"column":101}}]},"16":{"line":161,"type":"if","locations":[{"start":{"line":161,"column":8},"end":{"line":161,"column":8}},{"start":{"line":161,"column":8},"end":{"line":161,"column":8}}]},"17":{"line":195,"type":"if","locations":[{"start":{"line":195,"column":8},"end":{"line":195,"column":8}},{"start":{"line":195,"column":8},"end":{"line":195,"column":8}}]},"18":{"line":195,"type":"binary-expr","locations":[{"start":{"line":195,"column":13},"end":{"line":195,"column":38}},{"start":{"line":195,"column":42},"end":{"line":195,"column":56}},{"start":{"line":195,"column":60},"end":{"line":195,"column":92}}]},"19":{"line":218,"type":"if","locations":[{"start":{"line":218,"column":4},"end":{"line":218,"column":4}},{"start":{"line":218,"column":4},"end":{"line":218,"column":4}}]},"20":{"line":225,"type":"if","locations":[{"start":{"line":225,"column":4},"end":{"line":225,"column":4}},{"start":{"line":225,"column":4},"end":{"line":225,"column":4}}]},"21":{"line":231,"type":"if","locations":[{"start":{"line":231,"column":4},"end":{"line":231,"column":4}},{"start":{"line":231,"column":4},"end":{"line":231,"column":4}}]},"22":{"line":246,"type":"if","locations":[{"start":{"line":246,"column":8},"end":{"line":246,"column":8}},{"start":{"line":246,"column":8},"end":{"line":246,"column":8}}]},"23":{"line":246,"type":"binary-expr","locations":[{"start":{"line":246,"column":12},"end":{"line":246,"column":27}},{"start":{"line":246,"column":31},"end":{"line":246,"column":54}}]},"24":{"line":250,"type":"if","locations":[{"start":{"line":250,"column":13},"end":{"line":250,"column":13}},{"start":{"line":250,"column":13},"end":{"line":250,"column":13}}]},"25":{"line":250,"type":"binary-expr","locations":[{"start":{"line":250,"column":17},"end":{"line":250,"column":53}},{"start":{"line":250,"column":57},"end":{"line":250,"column":82}}]},"26":{"line":252,"type":"cond-expr","locations":[{"start":{"line":252,"column":34},"end":{"line":252,"column":55}},{"start":{"line":252,"column":58},"end":{"line":252,"column":66}}]},"27":{"line":259,"type":"cond-expr","locations":[{"start":{"line":259,"column":31},"end":{"line":259,"column":52}},{"start":{"line":259,"column":55},"end":{"line":259,"column":63}}]}},"l":{"4":1,"5":1,"6":1,"7":1,"8":1,"10":1,"11":88,"14":1,"15":9,"18":1,"19":25,"22":1,"23":92,"26":1,"28":7,"30":1,"31":1,"34":7,"37":1,"39":2,"41":1,"44":2,"45":2,"47":2,"48":23,"49":6,"53":2,"66":1,"68":4,"70":2,"71":2,"79":4,"83":4,"96":1,"98":3,"100":1,"101":1,"104":3,"117":1,"119":11,"121":1,"124":11,"127":1,"128":17,"129":16,"130":16,"131":16,"132":16,"134":16,"137":15,"139":15,"140":45,"142":45,"143":9,"144":9,"146":9,"147":3,"150":6,"154":45,"156":45,"161":16,"162":3,"165":13,"170":1,"171":3,"173":3,"174":3,"186":1,"188":62,"189":62,"190":62,"192":62,"193":175,"195":175,"196":161,"198":14,"202":48,"214":1,"215":10,"216":10,"218":10,"219":9,"220":9,"223":10,"225":10,"226":4,"229":6,"231":6,"232":3,"235":3,"238":6,"241":1,"242":26,"244":26,"246":70,"250":62,"252":23,"254":23,"256":23,"259":39,"260":39,"264":26}}} | ||
"/Users/lallemant/dev/deep-lib/lib/deep-lib.js":{"path":"/Users/lallemant/dev/deep-lib/lib/deep-lib.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":7,"11":1,"12":1,"13":7,"14":1,"15":2,"16":1,"17":2,"18":2,"19":2,"20":23,"21":6,"22":2,"23":1,"24":4,"25":2,"26":2,"27":4,"28":4,"29":1,"30":3,"31":1,"32":1,"33":3,"34":1,"35":25,"36":1,"37":25,"38":1,"39":17,"40":16,"41":16,"42":16,"43":15,"44":15,"45":15,"46":15,"47":16,"48":1,"49":15,"50":1,"51":3,"52":3,"53":3,"54":1,"55":81,"56":81,"57":81,"58":81,"59":231,"60":231,"61":217,"62":14,"63":67,"64":1,"65":10,"66":10,"67":10,"68":9,"69":9,"70":10,"71":10,"72":4,"73":6,"74":6,"75":3,"76":3,"77":6,"78":1,"79":26,"80":26,"81":70,"82":62,"83":23,"84":23,"85":23,"86":39,"87":39,"88":26},"b":{"1":[1,6],"2":[1,1],"3":[6,17],"4":[2,2],"5":[1,2],"6":[1,24],"7":[16,1],"8":[15,1],"9":[1,15],"10":[217,14],"11":[231,231,231],"12":[9,1],"13":[4,6],"14":[3,3],"15":[8,62],"16":[70,16],"17":[23,39],"18":[62,23],"19":[20,3],"20":[39,0]},"f":{"1":7,"2":2,"3":23,"4":4,"5":3,"6":25,"7":17,"8":3,"9":81,"10":10,"11":26,"12":70},"fnMap":{"1":{"name":"deepDiff","line":16,"loc":{"start":{"line":16,"column":15},"end":{"line":16,"column":58}}},"2":{"name":"deepSelect","line":27,"loc":{"start":{"line":27,"column":17},"end":{"line":27,"column":59}}},"3":{"name":"(anonymous_3)","line":37,"loc":{"start":{"line":37,"column":18},"end":{"line":37,"column":39}}},"4":{"name":"deepEqual","line":56,"loc":{"start":{"line":56,"column":16},"end":{"line":56,"column":60}}},"5":{"name":"deepSame","line":86,"loc":{"start":{"line":86,"column":15},"end":{"line":86,"column":58}}},"6":{"name":"deepClone","line":107,"loc":{"start":{"line":107,"column":16},"end":{"line":107,"column":50}}},"7":{"name":"deepAdd","line":117,"loc":{"start":{"line":117,"column":14},"end":{"line":117,"column":53}}},"8":{"name":"deepMove","line":144,"loc":{"start":{"line":144,"column":15},"end":{"line":144,"column":60}}},"9":{"name":"deepGet","line":160,"loc":{"start":{"line":160,"column":14},"end":{"line":160,"column":46}}},"10":{"name":"deepDelete","line":188,"loc":{"start":{"line":188,"column":17},"end":{"line":188,"column":52}}},"11":{"name":"getPaths","line":215,"loc":{"start":{"line":215,"column":19},"end":{"line":215,"column":52}}},"12":{"name":"propertyIterator","line":218,"loc":{"start":{"line":218,"column":47},"end":{"line":218,"column":83}}}},"statementMap":{"1":{"start":{"line":4,"column":0},"end":{"line":4,"column":32}},"2":{"start":{"line":5,"column":0},"end":{"line":5,"column":37}},"3":{"start":{"line":6,"column":0},"end":{"line":6,"column":36}},"4":{"start":{"line":7,"column":0},"end":{"line":7,"column":34}},"5":{"start":{"line":10,"column":0},"end":{"line":10,"column":68}},"6":{"start":{"line":11,"column":0},"end":{"line":11,"column":76}},"7":{"start":{"line":13,"column":0},"end":{"line":13,"column":36}},"8":{"start":{"line":14,"column":0},"end":{"line":14,"column":40}},"9":{"start":{"line":16,"column":0},"end":{"line":25,"column":2}},"10":{"start":{"line":18,"column":4},"end":{"line":22,"column":5}},"11":{"start":{"line":20,"column":8},"end":{"line":20,"column":45}},"12":{"start":{"line":21,"column":8},"end":{"line":21,"column":45}},"13":{"start":{"line":24,"column":4},"end":{"line":24,"column":42}},"14":{"start":{"line":27,"column":0},"end":{"line":44,"column":2}},"15":{"start":{"line":29,"column":4},"end":{"line":32,"column":5}},"16":{"start":{"line":31,"column":8},"end":{"line":31,"column":43}},"17":{"start":{"line":34,"column":4},"end":{"line":34,"column":43}},"18":{"start":{"line":35,"column":4},"end":{"line":35,"column":21}},"19":{"start":{"line":37,"column":4},"end":{"line":41,"column":7}},"20":{"start":{"line":38,"column":8},"end":{"line":40,"column":9}},"21":{"start":{"line":39,"column":12},"end":{"line":39,"column":36}},"22":{"start":{"line":43,"column":4},"end":{"line":43,"column":19}},"23":{"start":{"line":56,"column":0},"end":{"line":74,"column":2}},"24":{"start":{"line":58,"column":4},"end":{"line":62,"column":5}},"25":{"start":{"line":60,"column":8},"end":{"line":60,"column":45}},"26":{"start":{"line":61,"column":8},"end":{"line":61,"column":45}},"27":{"start":{"line":69,"column":4},"end":{"line":69,"column":65}},"28":{"start":{"line":73,"column":4},"end":{"line":73,"column":19}},"29":{"start":{"line":86,"column":0},"end":{"line":95,"column":2}},"30":{"start":{"line":88,"column":4},"end":{"line":92,"column":5}},"31":{"start":{"line":90,"column":8},"end":{"line":90,"column":45}},"32":{"start":{"line":91,"column":8},"end":{"line":91,"column":45}},"33":{"start":{"line":94,"column":4},"end":{"line":94,"column":33}},"34":{"start":{"line":107,"column":0},"end":{"line":115,"column":2}},"35":{"start":{"line":109,"column":4},"end":{"line":112,"column":5}},"36":{"start":{"line":111,"column":8},"end":{"line":111,"column":43}},"37":{"start":{"line":114,"column":4},"end":{"line":114,"column":28}},"38":{"start":{"line":117,"column":0},"end":{"line":142,"column":2}},"39":{"start":{"line":118,"column":4},"end":{"line":141,"column":5}},"40":{"start":{"line":119,"column":8},"end":{"line":119,"column":45}},"41":{"start":{"line":120,"column":8},"end":{"line":120,"column":32}},"42":{"start":{"line":122,"column":8},"end":{"line":133,"column":9}},"43":{"start":{"line":125,"column":12},"end":{"line":125,"column":46}},"44":{"start":{"line":128,"column":12},"end":{"line":128,"column":48}},"45":{"start":{"line":129,"column":12},"end":{"line":129,"column":37}},"46":{"start":{"line":132,"column":12},"end":{"line":132,"column":49}},"47":{"start":{"line":135,"column":8},"end":{"line":140,"column":9}},"48":{"start":{"line":136,"column":12},"end":{"line":136,"column":51}},"49":{"start":{"line":139,"column":12},"end":{"line":139,"column":41}},"50":{"start":{"line":144,"column":0},"end":{"line":149,"column":2}},"51":{"start":{"line":145,"column":4},"end":{"line":145,"column":45}},"52":{"start":{"line":147,"column":4},"end":{"line":147,"column":40}},"53":{"start":{"line":148,"column":4},"end":{"line":148,"column":36}},"54":{"start":{"line":160,"column":0},"end":{"line":177,"column":2}},"55":{"start":{"line":162,"column":4},"end":{"line":162,"column":36}},"56":{"start":{"line":163,"column":4},"end":{"line":163,"column":25}},"57":{"start":{"line":164,"column":4},"end":{"line":164,"column":17}},"58":{"start":{"line":166,"column":4},"end":{"line":174,"column":5}},"59":{"start":{"line":167,"column":8},"end":{"line":167,"column":30}},"60":{"start":{"line":169,"column":8},"end":{"line":173,"column":9}},"61":{"start":{"line":170,"column":12},"end":{"line":170,"column":36}},"62":{"start":{"line":172,"column":12},"end":{"line":172,"column":19}},"63":{"start":{"line":176,"column":4},"end":{"line":176,"column":17}},"64":{"start":{"line":188,"column":0},"end":{"line":213,"column":2}},"65":{"start":{"line":189,"column":4},"end":{"line":189,"column":41}},"66":{"start":{"line":190,"column":4},"end":{"line":190,"column":28}},"67":{"start":{"line":192,"column":4},"end":{"line":195,"column":5}},"68":{"start":{"line":193,"column":8},"end":{"line":193,"column":42}},"69":{"start":{"line":194,"column":8},"end":{"line":194,"column":48}},"70":{"start":{"line":197,"column":4},"end":{"line":197,"column":39}},"71":{"start":{"line":199,"column":4},"end":{"line":201,"column":5}},"72":{"start":{"line":200,"column":8},"end":{"line":200,"column":15}},"73":{"start":{"line":203,"column":4},"end":{"line":203,"column":39}},"74":{"start":{"line":205,"column":4},"end":{"line":210,"column":5}},"75":{"start":{"line":206,"column":8},"end":{"line":206,"column":39}},"76":{"start":{"line":209,"column":8},"end":{"line":209,"column":36}},"77":{"start":{"line":212,"column":4},"end":{"line":212,"column":17}},"78":{"start":{"line":215,"column":0},"end":{"line":239,"column":2}},"79":{"start":{"line":216,"column":4},"end":{"line":216,"column":24}},"80":{"start":{"line":218,"column":4},"end":{"line":236,"column":7}},"81":{"start":{"line":220,"column":8},"end":{"line":235,"column":9}},"82":{"start":{"line":224,"column":13},"end":{"line":235,"column":9}},"83":{"start":{"line":226,"column":12},"end":{"line":226,"column":74}},"84":{"start":{"line":228,"column":12},"end":{"line":228,"column":68}},"85":{"start":{"line":230,"column":12},"end":{"line":230,"column":58}},"86":{"start":{"line":233,"column":12},"end":{"line":233,"column":65}},"87":{"start":{"line":234,"column":12},"end":{"line":234,"column":34}},"88":{"start":{"line":238,"column":4},"end":{"line":238,"column":22}}},"branchMap":{"1":{"line":18,"type":"if","locations":[{"start":{"line":18,"column":4},"end":{"line":18,"column":4}},{"start":{"line":18,"column":4},"end":{"line":18,"column":4}}]},"2":{"line":29,"type":"if","locations":[{"start":{"line":29,"column":4},"end":{"line":29,"column":4}},{"start":{"line":29,"column":4},"end":{"line":29,"column":4}}]},"3":{"line":38,"type":"if","locations":[{"start":{"line":38,"column":8},"end":{"line":38,"column":8}},{"start":{"line":38,"column":8},"end":{"line":38,"column":8}}]},"4":{"line":58,"type":"if","locations":[{"start":{"line":58,"column":4},"end":{"line":58,"column":4}},{"start":{"line":58,"column":4},"end":{"line":58,"column":4}}]},"5":{"line":88,"type":"if","locations":[{"start":{"line":88,"column":4},"end":{"line":88,"column":4}},{"start":{"line":88,"column":4},"end":{"line":88,"column":4}}]},"6":{"line":109,"type":"if","locations":[{"start":{"line":109,"column":4},"end":{"line":109,"column":4}},{"start":{"line":109,"column":4},"end":{"line":109,"column":4}}]},"7":{"line":118,"type":"if","locations":[{"start":{"line":118,"column":4},"end":{"line":118,"column":4}},{"start":{"line":118,"column":4},"end":{"line":118,"column":4}}]},"8":{"line":122,"type":"if","locations":[{"start":{"line":122,"column":8},"end":{"line":122,"column":8}},{"start":{"line":122,"column":8},"end":{"line":122,"column":8}}]},"9":{"line":135,"type":"if","locations":[{"start":{"line":135,"column":8},"end":{"line":135,"column":8}},{"start":{"line":135,"column":8},"end":{"line":135,"column":8}}]},"10":{"line":169,"type":"if","locations":[{"start":{"line":169,"column":8},"end":{"line":169,"column":8}},{"start":{"line":169,"column":8},"end":{"line":169,"column":8}}]},"11":{"line":169,"type":"binary-expr","locations":[{"start":{"line":169,"column":13},"end":{"line":169,"column":38}},{"start":{"line":169,"column":42},"end":{"line":169,"column":56}},{"start":{"line":169,"column":60},"end":{"line":169,"column":92}}]},"12":{"line":192,"type":"if","locations":[{"start":{"line":192,"column":4},"end":{"line":192,"column":4}},{"start":{"line":192,"column":4},"end":{"line":192,"column":4}}]},"13":{"line":199,"type":"if","locations":[{"start":{"line":199,"column":4},"end":{"line":199,"column":4}},{"start":{"line":199,"column":4},"end":{"line":199,"column":4}}]},"14":{"line":205,"type":"if","locations":[{"start":{"line":205,"column":4},"end":{"line":205,"column":4}},{"start":{"line":205,"column":4},"end":{"line":205,"column":4}}]},"15":{"line":220,"type":"if","locations":[{"start":{"line":220,"column":8},"end":{"line":220,"column":8}},{"start":{"line":220,"column":8},"end":{"line":220,"column":8}}]},"16":{"line":220,"type":"binary-expr","locations":[{"start":{"line":220,"column":12},"end":{"line":220,"column":33}},{"start":{"line":220,"column":37},"end":{"line":220,"column":66}}]},"17":{"line":224,"type":"if","locations":[{"start":{"line":224,"column":13},"end":{"line":224,"column":13}},{"start":{"line":224,"column":13},"end":{"line":224,"column":13}}]},"18":{"line":224,"type":"binary-expr","locations":[{"start":{"line":224,"column":17},"end":{"line":224,"column":53}},{"start":{"line":224,"column":57},"end":{"line":224,"column":82}}]},"19":{"line":226,"type":"cond-expr","locations":[{"start":{"line":226,"column":34},"end":{"line":226,"column":61}},{"start":{"line":226,"column":64},"end":{"line":226,"column":72}}]},"20":{"line":233,"type":"cond-expr","locations":[{"start":{"line":233,"column":31},"end":{"line":233,"column":52}},{"start":{"line":233,"column":55},"end":{"line":233,"column":63}}]}},"l":{"4":1,"5":1,"6":1,"7":1,"10":1,"11":1,"13":1,"14":1,"16":1,"18":7,"20":1,"21":1,"24":7,"27":1,"29":2,"31":1,"34":2,"35":2,"37":2,"38":23,"39":6,"43":2,"56":1,"58":4,"60":2,"61":2,"69":4,"73":4,"86":1,"88":3,"90":1,"91":1,"94":3,"107":1,"109":25,"111":1,"114":25,"117":1,"118":17,"119":16,"120":16,"122":16,"125":15,"128":15,"129":15,"132":15,"135":16,"136":1,"139":15,"144":1,"145":3,"147":3,"148":3,"160":1,"162":81,"163":81,"164":81,"166":81,"167":231,"169":231,"170":217,"172":14,"176":67,"188":1,"189":10,"190":10,"192":10,"193":9,"194":9,"197":10,"199":10,"200":4,"203":6,"205":6,"206":3,"209":3,"212":6,"215":1,"216":26,"218":26,"220":70,"224":62,"226":23,"228":23,"230":23,"233":39,"234":39,"238":26}}, | ||
"/Users/lallemant/dev/deep-lib/lib/tools.js":{"path":"/Users/lallemant/dev/deep-lib/lib/tools.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":138,"8":1,"9":26,"10":1,"11":174,"12":6,"13":2,"14":166,"15":1,"16":57,"17":1,"18":184,"19":1,"20":4,"21":4,"22":1,"23":4,"24":4,"25":1,"26":4,"27":4},"b":{"1":[137,1],"2":[4,6,2,166],"3":[57,55],"4":[3,1],"5":[3,1]},"f":{"1":138,"2":26,"3":174,"4":57,"5":184,"6":4,"7":4,"8":4},"fnMap":{"1":{"name":"split","line":11,"loc":{"start":{"line":11,"column":16},"end":{"line":11,"column":38}}},"2":{"name":"join","line":15,"loc":{"start":{"line":15,"column":15},"end":{"line":15,"column":44}}},"3":{"name":"isArrayIndex","line":19,"loc":{"start":{"line":19,"column":23},"end":{"line":19,"column":59}}},"4":{"name":"isArrayIndex","line":31,"loc":{"start":{"line":31,"column":19},"end":{"line":31,"column":55}}},"5":{"name":"isArray","line":35,"loc":{"start":{"line":35,"column":18},"end":{"line":35,"column":44}}},"6":{"name":"isDeep","line":39,"loc":{"start":{"line":39,"column":17},"end":{"line":39,"column":40}}},"7":{"name":"dirname","line":44,"loc":{"start":{"line":44,"column":18},"end":{"line":44,"column":42}}},"8":{"name":"basename","line":49,"loc":{"start":{"line":49,"column":19},"end":{"line":49,"column":44}}}},"statementMap":{"1":{"start":{"line":4,"column":0},"end":{"line":4,"column":31}},"2":{"start":{"line":6,"column":0},"end":{"line":6,"column":20}},"3":{"start":{"line":7,"column":0},"end":{"line":7,"column":31}},"4":{"start":{"line":8,"column":0},"end":{"line":8,"column":32}},"5":{"start":{"line":9,"column":0},"end":{"line":9,"column":32}},"6":{"start":{"line":11,"column":0},"end":{"line":13,"column":2}},"7":{"start":{"line":12,"column":4},"end":{"line":12,"column":49}},"8":{"start":{"line":15,"column":0},"end":{"line":17,"column":2}},"9":{"start":{"line":16,"column":4},"end":{"line":16,"column":42}},"10":{"start":{"line":19,"column":0},"end":{"line":29,"column":2}},"11":{"start":{"line":20,"column":4},"end":{"line":28,"column":5}},"12":{"start":{"line":23,"column":12},"end":{"line":23,"column":26}},"13":{"start":{"line":25,"column":12},"end":{"line":25,"column":29}},"14":{"start":{"line":27,"column":12},"end":{"line":27,"column":48}},"15":{"start":{"line":31,"column":0},"end":{"line":33,"column":2}},"16":{"start":{"line":32,"column":4},"end":{"line":32,"column":69}},"17":{"start":{"line":35,"column":0},"end":{"line":37,"column":2}},"18":{"start":{"line":36,"column":4},"end":{"line":36,"column":32}},"19":{"start":{"line":39,"column":0},"end":{"line":42,"column":2}},"20":{"start":{"line":40,"column":4},"end":{"line":40,"column":53}},"21":{"start":{"line":41,"column":4},"end":{"line":41,"column":31}},"22":{"start":{"line":44,"column":0},"end":{"line":47,"column":2}},"23":{"start":{"line":45,"column":4},"end":{"line":45,"column":53}},"24":{"start":{"line":46,"column":4},"end":{"line":46,"column":72}},"25":{"start":{"line":49,"column":0},"end":{"line":52,"column":2}},"26":{"start":{"line":50,"column":4},"end":{"line":50,"column":53}},"27":{"start":{"line":51,"column":4},"end":{"line":51,"column":73}}},"branchMap":{"1":{"line":12,"type":"cond-expr","locations":[{"start":{"line":12,"column":19},"end":{"line":12,"column":42}},{"start":{"line":12,"column":45},"end":{"line":12,"column":47}}]},"2":{"line":20,"type":"switch","locations":[{"start":{"line":21,"column":8},"end":{"line":21,"column":38}},{"start":{"line":22,"column":8},"end":{"line":23,"column":26}},{"start":{"line":24,"column":8},"end":{"line":25,"column":29}},{"start":{"line":26,"column":8},"end":{"line":27,"column":48}}]},"3":{"line":32,"type":"binary-expr","locations":[{"start":{"line":32,"column":12},"end":{"line":32,"column":43}},{"start":{"line":32,"column":47},"end":{"line":32,"column":67}}]},"4":{"line":46,"type":"cond-expr","locations":[{"start":{"line":46,"column":32},"end":{"line":46,"column":63}},{"start":{"line":46,"column":66},"end":{"line":46,"column":70}}]},"5":{"line":51,"type":"cond-expr","locations":[{"start":{"line":51,"column":32},"end":{"line":51,"column":64}},{"start":{"line":51,"column":67},"end":{"line":51,"column":71}}]}},"l":{"4":1,"6":1,"7":1,"8":1,"9":1,"11":1,"12":138,"15":1,"16":26,"19":1,"20":174,"23":6,"25":2,"27":166,"31":1,"32":57,"35":1,"36":184,"39":1,"40":4,"41":4,"44":1,"45":4,"46":4,"49":1,"50":4,"51":4}}, | ||
"/Users/lallemant/dev/deep-lib/lib/methods/createPath.js":{"path":"/Users/lallemant/dev/deep-lib/lib/methods/createPath.js","s":{"1":1,"2":1,"3":1,"4":1,"5":26,"6":26,"7":1,"8":26,"9":26,"10":26,"11":26,"12":26,"13":8,"14":1,"15":1,"16":1,"17":7,"18":1,"19":1,"20":1,"21":24,"22":66,"23":66,"24":66,"25":66,"26":66,"27":4,"28":4,"29":1,"30":1,"31":3,"32":4,"33":62,"34":24,"35":3,"36":21,"37":62,"38":2,"39":62,"40":62},"b":{"1":[1,25],"2":[8,18],"3":[1,7],"4":[1,6],"5":[4,62],"6":[66,11,11],"7":[1,3],"8":[24,38],"9":[3,21],"10":[2,60],"11":[62,57],"12":[62,0],"13":[62,62,62]},"f":{"1":26,"2":66},"fnMap":{"1":{"name":"createPath","line":12,"loc":{"start":{"line":12,"column":21},"end":{"line":12,"column":62}}},"2":{"name":"pathElementIterator","line":44,"loc":{"start":{"line":44,"column":25},"end":{"line":44,"column":69}}}},"statementMap":{"1":{"start":{"line":4,"column":0},"end":{"line":4,"column":38}},"2":{"start":{"line":5,"column":0},"end":{"line":5,"column":35}},"3":{"start":{"line":7,"column":0},"end":{"line":10,"column":2}},"4":{"start":{"line":12,"column":0},"end":{"line":101,"column":2}},"5":{"start":{"line":13,"column":4},"end":{"line":13,"column":23}},"6":{"start":{"line":15,"column":4},"end":{"line":18,"column":5}},"7":{"start":{"line":17,"column":8},"end":{"line":17,"column":40}},"8":{"start":{"line":20,"column":4},"end":{"line":20,"column":41}},"9":{"start":{"line":21,"column":4},"end":{"line":21,"column":22}},"10":{"start":{"line":23,"column":4},"end":{"line":23,"column":45}},"11":{"start":{"line":24,"column":4},"end":{"line":24,"column":59}},"12":{"start":{"line":26,"column":4},"end":{"line":42,"column":5}},"13":{"start":{"line":27,"column":8},"end":{"line":41,"column":9}},"14":{"start":{"line":30,"column":12},"end":{"line":30,"column":84}},"15":{"start":{"line":31,"column":12},"end":{"line":31,"column":61}},"16":{"start":{"line":33,"column":12},"end":{"line":33,"column":24}},"17":{"start":{"line":35,"column":13},"end":{"line":41,"column":9}},"18":{"start":{"line":37,"column":12},"end":{"line":37,"column":83}},"19":{"start":{"line":38,"column":12},"end":{"line":38,"column":60}},"20":{"start":{"line":40,"column":12},"end":{"line":40,"column":24}},"21":{"start":{"line":44,"column":4},"end":{"line":100,"column":7}},"22":{"start":{"line":47,"column":8},"end":{"line":47,"column":46}},"23":{"start":{"line":48,"column":8},"end":{"line":48,"column":54}},"24":{"start":{"line":51,"column":8},"end":{"line":51,"column":44}},"25":{"start":{"line":52,"column":8},"end":{"line":52,"column":65}},"26":{"start":{"line":56,"column":8},"end":{"line":99,"column":9}},"27":{"start":{"line":59,"column":12},"end":{"line":59,"column":34}},"28":{"start":{"line":62,"column":12},"end":{"line":70,"column":13}},"29":{"start":{"line":65,"column":20},"end":{"line":65,"column":49}},"30":{"start":{"line":66,"column":20},"end":{"line":66,"column":26}},"31":{"start":{"line":69,"column":20},"end":{"line":69,"column":46}},"32":{"start":{"line":73,"column":12},"end":{"line":73,"column":34}},"33":{"start":{"line":77,"column":12},"end":{"line":85,"column":13}},"34":{"start":{"line":79,"column":16},"end":{"line":84,"column":17}},"35":{"start":{"line":80,"column":20},"end":{"line":80,"column":43}},"36":{"start":{"line":83,"column":20},"end":{"line":83,"column":43}},"37":{"start":{"line":87,"column":12},"end":{"line":92,"column":13}},"38":{"start":{"line":91,"column":16},"end":{"line":91,"column":39}},"39":{"start":{"line":95,"column":12},"end":{"line":98,"column":13}},"40":{"start":{"line":97,"column":16},"end":{"line":97,"column":43}}},"branchMap":{"1":{"line":15,"type":"if","locations":[{"start":{"line":15,"column":4},"end":{"line":15,"column":4}},{"start":{"line":15,"column":4},"end":{"line":15,"column":4}}]},"2":{"line":26,"type":"if","locations":[{"start":{"line":26,"column":4},"end":{"line":26,"column":4}},{"start":{"line":26,"column":4},"end":{"line":26,"column":4}}]},"3":{"line":27,"type":"if","locations":[{"start":{"line":27,"column":8},"end":{"line":27,"column":8}},{"start":{"line":27,"column":8},"end":{"line":27,"column":8}}]},"4":{"line":35,"type":"if","locations":[{"start":{"line":35,"column":13},"end":{"line":35,"column":13}},{"start":{"line":35,"column":13},"end":{"line":35,"column":13}}]},"5":{"line":56,"type":"if","locations":[{"start":{"line":56,"column":8},"end":{"line":56,"column":8}},{"start":{"line":56,"column":8},"end":{"line":56,"column":8}}]},"6":{"line":56,"type":"binary-expr","locations":[{"start":{"line":56,"column":12},"end":{"line":56,"column":19}},{"start":{"line":56,"column":23},"end":{"line":56,"column":35}},{"start":{"line":56,"column":39},"end":{"line":56,"column":60}}]},"7":{"line":62,"type":"switch","locations":[{"start":{"line":63,"column":16},"end":{"line":66,"column":26}},{"start":{"line":67,"column":16},"end":{"line":69,"column":46}}]},"8":{"line":77,"type":"if","locations":[{"start":{"line":77,"column":12},"end":{"line":77,"column":12}},{"start":{"line":77,"column":12},"end":{"line":77,"column":12}}]},"9":{"line":79,"type":"if","locations":[{"start":{"line":79,"column":16},"end":{"line":79,"column":16}},{"start":{"line":79,"column":16},"end":{"line":79,"column":16}}]},"10":{"line":87,"type":"if","locations":[{"start":{"line":87,"column":12},"end":{"line":87,"column":12}},{"start":{"line":87,"column":12},"end":{"line":87,"column":12}}]},"11":{"line":87,"type":"binary-expr","locations":[{"start":{"line":87,"column":16},"end":{"line":87,"column":33}},{"start":{"line":87,"column":37},"end":{"line":87,"column":71}}]},"12":{"line":95,"type":"if","locations":[{"start":{"line":95,"column":12},"end":{"line":95,"column":12}},{"start":{"line":95,"column":12},"end":{"line":95,"column":12}}]},"13":{"line":95,"type":"binary-expr","locations":[{"start":{"line":95,"column":16},"end":{"line":95,"column":42}},{"start":{"line":95,"column":46},"end":{"line":95,"column":61}},{"start":{"line":95,"column":65},"end":{"line":95,"column":97}}]}},"l":{"4":1,"5":1,"7":1,"12":1,"13":26,"15":26,"17":1,"20":26,"21":26,"23":26,"24":26,"26":26,"27":8,"30":1,"31":1,"33":1,"35":7,"37":1,"38":1,"40":1,"44":24,"47":66,"48":66,"51":66,"52":66,"56":66,"59":4,"62":4,"65":1,"66":1,"69":3,"73":4,"77":62,"79":24,"80":3,"83":21,"87":62,"91":2,"95":62,"97":62}}, | ||
"/Users/lallemant/dev/deep-lib/lib/methods/createProperty.js":{"path":"/Users/lallemant/dev/deep-lib/lib/methods/createProperty.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":5,"7":4,"8":4,"9":4,"10":1,"11":1,"12":4,"13":4,"14":1,"15":4,"16":2,"17":2,"18":2,"19":2,"20":4},"b":{"1":[4,1],"2":[4,1],"3":[1,3],"4":[1,3],"5":[2,2]},"f":{"1":5},"fnMap":{"1":{"name":"createProperty","line":12,"loc":{"start":{"line":12,"column":25},"end":{"line":12,"column":86}}}},"statementMap":{"1":{"start":{"line":4,"column":0},"end":{"line":4,"column":40}},"2":{"start":{"line":5,"column":0},"end":{"line":5,"column":52}},"3":{"start":{"line":6,"column":0},"end":{"line":6,"column":37}},"4":{"start":{"line":8,"column":0},"end":{"line":10,"column":2}},"5":{"start":{"line":12,"column":0},"end":{"line":49,"column":2}},"6":{"start":{"line":13,"column":4},"end":{"line":48,"column":5}},"7":{"start":{"line":16,"column":8},"end":{"line":16,"column":28}},"8":{"start":{"line":19,"column":8},"end":{"line":19,"column":52}},"9":{"start":{"line":22,"column":8},"end":{"line":25,"column":9}},"10":{"start":{"line":23,"column":12},"end":{"line":23,"column":27}},"11":{"start":{"line":24,"column":12},"end":{"line":24,"column":45}},"12":{"start":{"line":28,"column":8},"end":{"line":28,"column":30}},"13":{"start":{"line":30,"column":8},"end":{"line":33,"column":9}},"14":{"start":{"line":32,"column":12},"end":{"line":32,"column":44}},"15":{"start":{"line":35,"column":8},"end":{"line":45,"column":9}},"16":{"start":{"line":37,"column":12},"end":{"line":37,"column":44}},"17":{"start":{"line":38,"column":12},"end":{"line":38,"column":43}},"18":{"start":{"line":41,"column":12},"end":{"line":41,"column":37}},"19":{"start":{"line":44,"column":12},"end":{"line":44,"column":44}},"20":{"start":{"line":47,"column":8},"end":{"line":47,"column":57}}},"branchMap":{"1":{"line":13,"type":"if","locations":[{"start":{"line":13,"column":4},"end":{"line":13,"column":4}},{"start":{"line":13,"column":4},"end":{"line":13,"column":4}}]},"2":{"line":19,"type":"binary-expr","locations":[{"start":{"line":19,"column":18},"end":{"line":19,"column":25}},{"start":{"line":19,"column":29},"end":{"line":19,"column":51}}]},"3":{"line":22,"type":"if","locations":[{"start":{"line":22,"column":8},"end":{"line":22,"column":8}},{"start":{"line":22,"column":8},"end":{"line":22,"column":8}}]},"4":{"line":30,"type":"if","locations":[{"start":{"line":30,"column":8},"end":{"line":30,"column":8}},{"start":{"line":30,"column":8},"end":{"line":30,"column":8}}]},"5":{"line":35,"type":"if","locations":[{"start":{"line":35,"column":8},"end":{"line":35,"column":8}},{"start":{"line":35,"column":8},"end":{"line":35,"column":8}}]}},"l":{"4":1,"5":1,"6":1,"8":1,"12":1,"13":5,"16":4,"19":4,"22":4,"23":1,"24":1,"28":4,"30":4,"32":1,"35":4,"37":2,"38":2,"41":2,"44":2,"47":4}}} |
var should = require('chai').should(); | ||
var expect = require('chai').expect; | ||
var deep = require('../../lib/deep-lib'); | ||
var data = require('../object.json'); | ||
var data = { | ||
"countries": { | ||
"germany": { | ||
"towns": { | ||
"capital": "berlin", | ||
"berlin": { | ||
"name": "Berlin", | ||
"population": 3562166, | ||
"area": 891.85 | ||
}, | ||
"hamburg": { | ||
"name": "Hamburg", | ||
"population": 1751775, | ||
"area": 755 | ||
} | ||
} | ||
}, | ||
"spain": { | ||
"sites": [ | ||
"Alhambra", | ||
"Cabo de Gata" | ||
], | ||
"capital": "Madrid", | ||
"towns": [ | ||
{ | ||
"name": "Madrid", | ||
"population": 3165235, | ||
"area": 605.770 | ||
}, | ||
{ | ||
"name": "Barcelona", | ||
"population": 1751775, | ||
"area": 755 | ||
} | ||
] | ||
} | ||
} | ||
}; | ||
describe('[' + require('path').basename(__filename) + '] - clone ', function() { | ||
@@ -153,4 +115,4 @@ var clone = deep.clone(data); | ||
it('should create an array element to add a value', function() { | ||
deep.add(clone, 'countries.spain.sites.2.website', 'http://www.madrid.es'); | ||
var control = deep.get(clone, 'countries.spain.sites.2.website'); | ||
deep.add(clone, 'countries.spain.towns.2.website', 'http://www.madrid.es'); | ||
var control = deep.get(clone, 'countries.spain.towns.2.website'); | ||
@@ -157,0 +119,0 @@ expect(control).to.equal('http://www.madrid.es'); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66374
16
1018