Package Exports
- get-4byte-chars
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 (get-4byte-chars) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
get-4byte-chars
Get all 4-byte characters form a string
get4byteChars('I 💓 🍣.'); //=> ['💓', '🍣']Installation
npm
npm install get-4byte-charsbower
bower install get-4byte-charsAPI
get4byteChars(str [, option])
str: String
option: Object
Return: Boolean
It detects characters that costs 4 bytes in UTF-8 from a given string, and returns them as an array.
option.unique
Type: Boolean
Default: true
Omit all duplicated characters from result.
get4byteChars('🌊🌊 \😺/ 🌊🌊');
//=> ['🌊']
get4byteChars('🌊🌊 \😺/ 🌊🌊', {unique: false});
//=> ['🌊', '🌊', '🌊', '🌊']License
Copyright (c) 2016 Shinnosuke Watanabe
Licensed under the MIT License.