mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-06-16 11:14:48 -04:00
first-commit
This commit is contained in:
commit
325c322a27
207 changed files with 35989 additions and 0 deletions
33
doc/jsdoc-toolkit/app/frame.js
Normal file
33
doc/jsdoc-toolkit/app/frame.js
Normal file
|
@ -0,0 +1,33 @@
|
|||
IO.include("frame/Opt.js");
|
||||
IO.include("frame/Chain.js");
|
||||
IO.include("frame/Link.js");
|
||||
IO.include("frame/String.js");
|
||||
IO.include("frame/Hash.js");
|
||||
IO.include("frame/Namespace.js");
|
||||
//IO.include("frame/Reflection.js");
|
||||
|
||||
/** A few helper functions to make life a little easier. */
|
||||
|
||||
function defined(o) {
|
||||
return (o !== undefined);
|
||||
}
|
||||
|
||||
function copy(o) { // todo check for circular refs
|
||||
if (o == null || typeof(o) != 'object') return o;
|
||||
var c = new o.constructor();
|
||||
for(var p in o) c[p] = copy(o[p]);
|
||||
return c;
|
||||
}
|
||||
|
||||
function isUnique(arr) {
|
||||
var l = arr.length;
|
||||
for(var i = 0; i < l; i++ ) {
|
||||
if (arr.lastIndexOf(arr[i]) > i) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Returns the given string with all regex meta characters backslashed. */
|
||||
RegExp.escapeMeta = function(str) {
|
||||
return str.replace(/([$^\\\/()|?+*\[\]{}.-])/g, "\\$1");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue