functions.js 387 B

123456789101112131415161718
  1. var forIn = require('./forIn');
  2. /**
  3. * return a list of all enumerable properties that have function values
  4. */
  5. function functions(obj){
  6. var keys = [];
  7. forIn(obj, function(val, key){
  8. if (typeof val === 'function'){
  9. keys.push(key);
  10. }
  11. });
  12. return keys.sort();
  13. }
  14. module.exports = functions;