underscore.js _.union[Array]
2012-04-15 23:07
253 查看
Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.
返回数组中的并集
源码:
返回数组中的并集
_.union([1, 2, 3], [101, 2, 1, 10], [2, 1]); => [1, 2, 3, 101, 10]
源码:
_.union = function() { return _.uniq(_.flatten(arguments, true)); };
相关文章推荐
- underscore.js _without [Array]
- underscore.js _.intersect[Array]
- underscore.js _.difference[Array]
- underscore.js _uniq[Array]
- underscore.js _.zip[Array]
- underscore.js _indexOf[Array]
- underscore.js _.lastIndexOf[Array]
- underscore.js _range[Array]
- underscore.js _.first[Array]
- underscore.js _.initial[Array]
- underscore.js _last[Array]
- underscore.js _reset[Array]
- underscore.js _.flatten[Array]
- Underscore.js template()函数全解析
- underscore.js 1105 -- 1288 行
- Underscore.js 1.3.3 源码分析收藏
- Underscore.js与nodejs相结合 - 简单就是美 - ITeye技术网站
- underscore.js _.values[Object]
- underscore.js _.isObject[Object]
- JavaScript/js高手进阶必备神器 --- Underscore.js 实用库(js超好用工具库,js函数式编程工具库)