Strip skin tone modifiers from emoji (π πΏ to π ).
- What is this?
- When should I use this?
- Install
- Use
- API
- Types
- Compatibility
- Security
- Related
- Contribute
- License
This package removes skin tone modifiers (Fitzpatrick scale) from a string.
You can use this package to remove skin tones.
You can alternatively use sindresorhus/skin-tone
when you want
to set skin tones.
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>
import {stripSkinTone} from 'strip-skin-tone'
stripSkinTone('π
πΏ') // => 'π
'
stripSkinTone('ππ»') // => 'π'
This package exports the identifier stripSkinTone
.
There is no default export.
Strip skin tone modifiers (as in Fitzpatrick scale) from value
(string
).
value
(string
) β value to clean of skin tone modifiers
Cleaned value (string
).
This package is fully typed with TypeScript.
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.
This package is safe.
sindresorhus/skin-tone
β change the skin tone of emoji
Yes please! See How to Contribute to Open Source.
MIT Β© Titus Wormer