Home

Awesome

strip-skin-tone

Build Coverage Downloads Size

Strip skin tone modifiers from emoji (šŸŽ…šŸæ to šŸŽ…).

Contents

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
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

Contribute

Yes please! See How to Contribute to Open Source.

License

MIT Ā© Titus Wormer

<!-- Definitions -->