summaryrefslogtreecommitdiff
path: root/node_modules/locutus/php/math/decoct.js.map
blob: 043db87de2c54da96470063cf17f93b4d1ba0f48 (plain) (blame)
1
{"version":3,"sources":["../../../src/php/math/decoct.js"],"names":["module","exports","decoct","number","parseInt","toString"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAiBC,MAAjB,EAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIA,SAAS,CAAb,EAAgB;AACdA,aAAS,aAAaA,MAAb,GAAsB,CAA/B;AACD;AACD,SAAOC,SAASD,MAAT,EAAiB,EAAjB,EACJE,QADI,CACK,CADL,CAAP;AAED,CAhBD","file":"decoct.js","sourcesContent":["module.exports = function decoct (number) {\n  //  discuss at: http://locutus.io/php/decoct/\n  // original by: Enrique Gonzalez\n  // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n  // improved by: http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript\n  //    input by: pilus\n  //   example 1: decoct(15)\n  //   returns 1: '17'\n  //   example 2: decoct(264)\n  //   returns 2: '410'\n\n  if (number < 0) {\n    number = 0xFFFFFFFF + number + 1\n  }\n  return parseInt(number, 10)\n    .toString(8)\n}\n"]}