This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Simple JS equivalent of the Python set() constructor (without the methods) | |
| * @requires shim: Array.prototype.indexOf | |
| * @param {array} arr The array to turn into a set | |
| * @example | |
| * var mySet = set(['red', 'yellow', 'black', 'yellow']); | |
| * mySet.length; // 3 | |
| * JSON.stringify(mySet); // ["red","yellow","black"] | |
| * @see For a fuller version, see {@link https://npmjs.org/package/set} | |
| */ |