char-regex
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|
The "char-regex" is a JavaScript npm package that provides a regex to match any full character, even considering unusual character ranges. The special feature of this package is that it has been thoroughly tested on every single emoji and unicode character, ensuring reliability. The concept is based on the Lodash implementation.
Using char-regex is a breeze. Installation is done via npm with npm install char-regex
. Here is an example of how to use it in your JavaScript code:
import charRegex from 'char-regex';
'β€οΈππ½'.match(/./);
// This will output ['', '', '', '', '', '', '']
'β€οΈππ½'.match(charRegex());
// This will output ['β€οΈ', 'ππ½']
As demonstrated above, using the match method with char-regex correctly identifies the full characters, even emojis, in the string.
For the complete package documentation or any additional information for char-regex, simply refer to its GitHub page here. Here you will find more detailed information about its usage application, related packages, and any potential updates.