aboutsummaryrefslogtreecommitdiff
path: root/src/Utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/Utils.ts')
-rw-r--r--src/Utils.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Utils.ts b/src/Utils.ts
index e07d4e82d..dec6245ef 100644
--- a/src/Utils.ts
+++ b/src/Utils.ts
@@ -87,10 +87,25 @@ export class Utils {
}
}
+export function OmitKeys(obj: any, keys: any, addKeyFunc?: (dup: any) => void) {
+ var dup: any = {};
+ for (var key in obj) {
+ if (keys.indexOf(key) === -1) {
+ dup[key] = obj[key];
+ }
+ }
+ addKeyFunc && addKeyFunc(dup);
+ return dup;
+}
+
export function returnTrue() { return true; }
export function returnFalse() { return false; }
+export function returnOne() { return 1; }
+
+export function returnZero() { return 0; }
+
export function emptyFunction() { }
export function emptyDocFunction(doc: Document) { }