underscore.js_.functions[Object]
2012-04-16 21:38
357 查看
Returns a sorted list of the names of every method in an object — that is to say, the name of every function property of the object.
返回对象所包含的方法的列表,按A-Z排序.别名methods
源码:
返回对象所包含的方法的列表,按A-Z排序.别名methods
_.functions(_); => ["all", "any", "bind", "bindAll", "clone", "compact", "compose" ...
源码:
_.functions = _.methods = function(obj) { var names = []; for (var key in obj) { if (_.isFunction(obj[key])) names.push(key); } return names.sort(); };
相关文章推荐
- underscore.js _.extend[Object]
- underscore.js _.isString[Object]
- Underscore.js 学习(四)— Functions
- underscore.js _.isNumber[Object]
- underscore.js _.pick[Object]
- underscore.js _.finite[Object]
- underscore.js _.clone[Object]
- underscore.js_.isBoolean[Object]
- underscore.js _tap[Object]
- underscore.js _.isDate[Object]
- underscore.js _has[Object]
- underscore.js _.isRegExp[Object]
- underscore.js _.isEqual[Object]
- underscore.js _.isNaN[Object]
- underscore.js _.isNull[Object]
- underscore.js _.isEmpty(Object)
- underscore.js _.isElement(Object)
- underscore.js _isUndefined[Object]
- underscore.js _.isArray(Object)
- underscore.js _.isObject[Object]