Clean up comments
This commit is contained in:
parent
b3b29d7313
commit
a1836662a7
|
@ -368,6 +368,8 @@ function applyFilter(filter) {
|
||||||
return pattern;
|
return pattern;
|
||||||
}
|
}
|
||||||
var regex = '';
|
var regex = '';
|
||||||
|
// Escaping user input to be treated as a literal string within a regular expression
|
||||||
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Writing_a_Regular_Expression_Pattern
|
||||||
pattern = pattern.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
|
pattern = pattern.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
|
||||||
for (var i = 0, n = pattern.length; i < n; i++) {
|
for (var i = 0, n = pattern.length; i < n; i++) {
|
||||||
var char = pattern.charAt(i);
|
var char = pattern.charAt(i);
|
||||||
|
|
|
@ -982,25 +982,25 @@ DataAccessObject.updateAll = function (where, data, cb) {
|
||||||
if (stillConnecting(this.getDataSource(), this, arguments)) return;
|
if (stillConnecting(this.getDataSource(), this, arguments)) return;
|
||||||
|
|
||||||
if (arguments.length === 1) {
|
if (arguments.length === 1) {
|
||||||
// update(data);
|
// update(data) is being called
|
||||||
data = where;
|
data = where;
|
||||||
where = null;
|
where = null;
|
||||||
cb = null;
|
cb = null;
|
||||||
} else if (arguments.length === 2) {
|
} else if (arguments.length === 2) {
|
||||||
if (typeof data === 'function') {
|
if (typeof data === 'function') {
|
||||||
// update(data, cb);
|
// update(data, cb) is being called
|
||||||
cb = data;
|
cb = data;
|
||||||
data = where;
|
data = where;
|
||||||
where = null;
|
where = null;
|
||||||
} else {
|
} else {
|
||||||
// update(where, data);
|
// update(where, data) is being called
|
||||||
cb = null;
|
cb = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(typeof where === 'object', 'The where argument should be an object');
|
assert(typeof where === 'object', 'The where argument should be an object');
|
||||||
assert(typeof data === 'object', 'The data argument should be an object');
|
assert(typeof data === 'object', 'The data argument should be an object');
|
||||||
assert(cb === null || typeof cb === 'function', 'The data argument should be an object');
|
assert(cb === null || typeof cb === 'function', 'The cb argument should be a function');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
where = removeUndefined(where);
|
where = removeUndefined(where);
|
||||||
|
|
Loading…
Reference in New Issue