index.js 297 B

1234567891011
  1. 'use strict'
  2. module.exports = decimal
  3. // Check if the given character code, or the character code at the first
  4. // character, is decimal.
  5. function decimal(character) {
  6. var code = typeof character === 'string' ? character.charCodeAt(0) : character
  7. return code >= 48 && code <= 57 /* 0-9 */
  8. }