Skip to content

Instantly share code, notes, and snippets.

@saeedghx68
Last active December 18, 2017 07:44
Show Gist options
  • Save saeedghx68/fe1a7ccd5885f85b8cd6e6ba872af7d5 to your computer and use it in GitHub Desktop.
Save saeedghx68/fe1a7ccd5885f85b8cd6e6ba872af7d5 to your computer and use it in GitHub Desktop.

Revisions

  1. saeedghx68 revised this gist Dec 18, 2017. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion unique.js
    Original file line number Diff line number Diff line change
    @@ -1 +1,2 @@
    String.fromCharCode(Math.floor(Math.random() * (90 - 65) + 65)) + '-' + (+new Date()).toString().substr(1).match(/.{4}/g).join('-')
    import _ from 'lodash'
    String.fromCharCode(_.random(65,90)) + '-' + (+new Date()).toString().substr(1).match(/.{4}/g).join('-')
  2. saeedghx68 created this gist Dec 18, 2017.
    1 change: 1 addition & 0 deletions unique.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    String.fromCharCode(Math.floor(Math.random() * (90 - 65) + 65)) + '-' + (+new Date()).toString().substr(1).match(/.{4}/g).join('-')