Files
documentation/node_modules/skin-tone/index.d.ts
2024-03-22 03:47:51 +05:30

46 lines
988 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

declare namespace skinTone {
type Tone =
| 'none'
| 'white'
| 'creamWhite'
| 'lightBrown'
| 'brown'
| 'darkBrown';
}
/**
Change the skin tone of an emoji 👌👌🏻👌🏼👌🏽👌🏾👌🏿.
@param emoji - Emoji to modify.
@param tone - Skin tone to use for `emoji`.
- `'none'` : *(Removes skin tone)*
- `'white'` : 🏻 *(Fitzpatrick Type-12)*
- `'creamWhite'` : 🏼 *(Fitzpatrick Type-3)*
- `'lightBrown'` : 🏽 *(Fitzpatrick Type-4)*
- `'brown'` : 🏾 *(Fitzpatrick Type-5)*
- `'darkBrown'` : 🏿 *(Fitzpatrick Type-6)*
@example
```
import skinTone = require('skin-tone');
skinTone('👍', 'brown');
//=> '👍🏾'
skinTone('👍', 'white');
//=> '👍🏻'
// can also remove skin tone
skinTone('👍🏾', 'none');
//=> '👍'
// just passes it through when not supported
skinTone('🦄', 'darkBrown');
//=> '🦄'
```
*/
declare function skinTone(emoji: string, tone: skinTone.Tone): string;
export = skinTone;