Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/utils/platforms/default/lib/object.js
blob: 4e30ca8395eea197e8f3e0c60adff5ed8c2f8682 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

if (!Object.keys) {
    Object.keys = function (object) {
        var keys = [];
        for (var name in object) {
            if (Object.prototype.hasOwnProperty.call(object, name)) {
                keys.push(name);
            }
        }
        return keys;
    };
}

if (!Object.create) {
    Object.create = function (prototype) {
        var Type = function () {};
        Type.prototype = prototype;
        return new Type();
    };
}

if (!Object.freeze) {
    Object.freeze = function (object) {
        return object;
    };
}