DSLibrary/dslib — pull request #17 by nickb1080 (2014-09-18 17:24:16+00:00)
Title: allow custom stringify for sets

This PR allows you to customize how a Set will stringify values that get inserted. Here's what I've added:

1.) It adds a `stringifyObj()` property to the prototype, which is simply a reference to `JSON.stringify`
2.) Allows you to pass in a function to the Set constructor, which will override `stringifyObj()` for that instance.
3.) Allows you to pass a string property name to the Set constructor. `stringifyObj()` is replaced by a function that returns that property name from an object.
4.) Adds tests for these changes. (100% covered)