UNPKG

312 BPlain TextView Raw
1import each from './each';
2import isFunction from './is-function';
3
4const keys = Object.keys ? obj => Object.keys(obj) : obj => {
5 const result = [];
6 each(obj, (value, key) => {
7 if (!(isFunction(obj) && key === 'prototype')) {
8 result.push(key);
9 }
10 });
11 return result;
12};
13
14export default keys;