Last active
May 31, 2016 12:44
-
-
Save wildskyf/a19aa36f09aafb265f81 to your computer and use it in GitHub Desktop.
Toolbox
This file contains 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
var isEmptyObj = (obj) => !Object.keys(obj).length; |
This file contains 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
var cloneJson = (a) => JSON.parse(JSON.stringify(a)) |
This file contains 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
var isArray(a) => Object.prototype.toString.call(a) === '[object Array]' |
This file contains 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
Array.prototype.unique = () => this.join(",").match(/([^,]+)(?!.*\1)/ig); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment