在Javascript中是否有用于Set数据类型的库? [英] Is there a library for a Set data type in Javascript?
本文介绍了在Javascript中是否有用于Set数据类型的库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
由于Javascript没有内置的set数据类型,任何人都遇到了一个像集合和设置操作(如union,intersection等)的体面库吗?
Since Javascript doesn't have a built in set datatype has anyone come across a decent library for sets and set operations like union, intersection, etc?
推荐答案
查看 JS.Set 。
JS.Set类可用于为唯一对象的集合建模。集合确保其成员之间没有重复,它允许您使用自定义相等方法进行比较以及JavaScript的===运算符。
The JS.Set class can be used to model collections of unique objects. A set makes sure that there are no duplicates among its members, and it allows you to use custom equality methods for comparison as well as JavaScript’s === operator.
它包含union,intersection,merge等方法......
It contains methods like union, intersection, merge, etc ...
这篇关于在Javascript中是否有用于Set数据类型的库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文