functions.js 291 B

12345678910111213
  1. var isFunction = require('./isFunction.js');
  2. // Return a sorted list of the function names available on the object.
  3. function functions(obj) {
  4. var names = [];
  5. for (var key in obj) {
  6. if (isFunction(obj[key])) names.push(key);
  7. }
  8. return names.sort();
  9. }
  10. module.exports = functions;