chc-posix

Character Classes according to POSIX

Usage no npm install needed!

<script type="module">
  import chcPosix from 'https://cdn.skypack.dev/chc-posix';
</script>

README

chc-posix

Character Classes according to POSIX

Depends on chc and offers predefined charsets according POSIX.

Table of contents

Links

Get Started

const chc = require('chc-posix');

const cs = chc.posix('upper');
// RETURN new CharSet() containing A-Z

cs.next();
// RETURN 'A'

See chc for details about class CharSet.

API

  • chc.CharSet chc.posix(string name)
    Create an CharSet instance containing specified characters. Argument name may be:
    • lower
    • upper
    • number
    • alpha
    • alnum
    • xdigit