Awesome
strip-skin-tone
Strip skin tone modifiers from emoji (š šæ to š ).
Contents
- What is this?
- When should I use this?
- Install
- Use
- API
- Types
- Compatibility
- Security
- Related
- Contribute
- License
What is this?
This package removes skin tone modifiers (Fitzpatrick scale) from a string.
When should I use this?
You can use this package to remove skin tones.
You can alternatively use sindresorhus/skin-tone
when you want
to set skin tones.
Install
This package is ESM only. In Node.js (version 14.14+, 16.0+), install with npm:
npm install strip-skin-tone
In Deno with esm.sh
:
import {stripSkinTone} from 'https://esm.sh/strip-skin-tone@2'
In browsers with esm.sh
:
<script type="module">
import {stripSkinTone} from 'https://esm.sh/strip-skin-tone@2?bundle'
</script>
Use
import {stripSkinTone} from 'strip-skin-tone'
stripSkinTone('š
šæ') // => 'š
'
stripSkinTone('šš»') // => 'š'
API
This package exports the identifier stripSkinTone
.
There is no default export.
stripSkinTone(value)
Strip skin tone modifiers (as in Fitzpatrick scale) from value
(string
).
Parameters
value
(string
) ā value to clean of skin tone modifiers
Returns
Cleaned value (string
).
Types
This package is fully typed with TypeScript.
Compatibility
This package is at least compatible with all maintained versions of Node.js. As of now, that is Node.js 14.14+ and 16.0+. It also works in Deno and modern browsers.
Security
This package is safe.
Related
sindresorhus/skin-tone
ā change the skin tone of emoji
Contribute
Yes please! See How to Contribute to Open Source.
License
MIT Ā© Titus Wormer
<!-- Definitions -->