• This project
    • Loading...
  • Sign in

김동훈 / OpenSource_Project

%ea%b7%b8%eb%a6%bc1
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 1
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • OpenSource_Project
  • node_modules
  • googlemaps
  • lib
  • utils
  • encodeNumber.js
  • Donghoon Kim's avatar
    google map api 연동 · 785a8c7d
    785a8c7d
    Donghoon Kim authored 2018-12-06 02:34:39 +0900
encodeNumber.js 340 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
module.exports = function (num) {

  var encodeString = '';

  var nextValue, finalValue;

  while (num >= 0x20) {
    nextValue = (0x20 | (num & 0x1f)) + 63;
    encodeString += (String.fromCharCode(nextValue));
    num >>= 5;
  }

  finalValue = num + 63;

  encodeString += (String.fromCharCode(finalValue));

  return encodeString;

};