Package Exports
- js-regex-pl
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (js-regex-pl) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
js-regex-pl
JavaScript RegExp doesn't work with Unicode characters out of the box. This small package fixes this issue.
This is \p{L} equalent extracted from XRegExp
XRegExp is a great library but I wanted something much smaller for my needs.
Installation
npm i js-regex-pl
Usage
import pL from 'js-regex-pl';
new RegExp(`^[${pL}]+$`).test('日本語')