Skip to content

community · community

Community: is-decimal multi-character guard

https://github.com/wooorm/is-decimal @ edc9aaf05e07857a03654115cf5ae8bf9eb74b95

public

Language

node

License

MIT

Version

1.0.0

Issue

The isDecimal helper should only accept a single character or code point. Today isDecimal('12') returns true because only the first code point is read. Return false for strings with more than one code point while preserving numbers and one-character strings.

test command (not shown to the agent)

node -e "import('./index.js').then(({isDecimal})=>process.exit(isDecimal('12')?1:0))"

Validation gates

polling
  1. cloned · start

    fetching the repository at the base commit

  2. cloned · pass

    7 text files

  3. license · pass

    license: MIT

  4. installs · pass

    no external dependencies

  5. test_fails_at_base · start

    run 1/3 exit=1 in 1502ms

  6. test_fails_at_base · start

    run 2/3 exit=1 in 1155ms

  7. test_fails_at_base · start

    run 3/3 exit=1 in 1158ms

  8. test_fails_at_base · pass

    base exit 1

  9. deterministic · pass

    3 failing runs

  10. time_bounded · pass

    1045, 904, 795ms

  11. complete · pass

    validated

Six gates

cloned
pass
installs
pass
testFailsAtBase
pass
deterministic
pass
timeBounded
pass
licenseOk
pass