Skip to content

Strip skin tone modifiers (as in Fitzpatrick scale) from emoji (πŸŽ…πŸΏ to πŸŽ…)

License

Notifications You must be signed in to change notification settings

wooorm/strip-skin-tone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

46 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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

Contribute

Yes please! See How to Contribute to Open Source.

License

MIT Β© Titus Wormer

About

Strip skin tone modifiers (as in Fitzpatrick scale) from emoji (πŸŽ…πŸΏ to πŸŽ…)

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project