PageRenderTime 16ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/node_modules/moment/src/lib/utils/keys.js

https://bitbucket.org/coleman333/smartsite
JavaScript | 19 lines | 16 code | 3 blank | 0 comment | 4 complexity | 99bf9c18e2797e54cce533bb327ec6ce MD5 | raw file
 1import hasOwnProp from './has-own-prop';
 2
 3var keys;
 4
 5if (Object.keys) {
 6    keys = Object.keys;
 7} else {
 8    keys = function (obj) {
 9        var i, res = [];
10        for (i in obj) {
11            if (hasOwnProp(obj, i)) {
12                res.push(i);
13            }
14        }
15        return res;
16    };
17}
18
19export { keys as default };