Sha256: f51ea7382714a3b6e4beb19fac3c34b8e09250fcbb0b6212144733f6725fd572
Contents?: true
Size: 333 Bytes
Versions: 255
Compression:
Stored size: 333 Bytes
Contents
'use strict'; function Hexadecimal(hex) { this.hex = hex; this.toDecimal = function() { var hexCharacters = this.hex.split(''); for (var i = 0; i < hexCharacters.length; i++) { if (/[^0-9a-fA-F]/.exec(hexCharacters[i])) { return 0; } } return parseInt(this.hex,16); }; } module.exports = Hexadecimal;
Version data entries
255 entries across 255 versions & 1 rubygems