Skip to content

Instantly share code, notes, and snippets.

@oyamabs
Created August 18, 2019 14:02
Show Gist options
  • Save oyamabs/d031ca6334a27af65043e021656872d4 to your computer and use it in GitHub Desktop.
Save oyamabs/d031ca6334a27af65043e021656872d4 to your computer and use it in GitHub Desktop.

Revisions

  1. oyamabs created this gist Aug 18, 2019.
    8 changes: 8 additions & 0 deletions unique_id.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    function getID(prefix){
    var mili = Date.now().toString(16);
    if(!prefix){
    return mili;
    } else {
    return prefix + mili
    }
    }