Created
October 22, 2016 23:00
-
-
Save iddan/e78d3a373bac2dc88be9a8f694246d12 to your computer and use it in GitHub Desktop.
JavaScript String Id for OOP Junkies
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
export default class ID extends String { | |
constructor () { | |
super(Math.random().toString(36).slice(2)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment