This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([ | |
"dojo/date/stamp", | |
"dojo/_base/lang" | |
], function(dates, lang) { | |
// summary: | |
// very first draft of obj2json-schema generator | |
var DEFAULT_OPTIONS = { | |
numberInteger : true, | |
numberPositive : false, //sets minimum to 0 for positive numbers | |
numberJsMinMax : false, //TODO: implement ranges |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var oldA = ['o1', 'o2', 'o3', 'o4'], | |
newA = ['n0', 'n1', 'n2']; | |
//var oldA=['o1','o2'],newA=['n0','n1','n2']; | |
//var oldA=['o1','o2'],newA=['n0','n1']; | |
var changed = oldA.slice(0, Math.min(oldA.length, newA.length)); | |
var added = newA.slice(oldA.length); | |
var deleted = oldA.slice(newA.length); | |
console.log(changed, added, deleted); |