โคNeurotoxin Powered Marketing

npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more ยป

skin-tone

1.0.0ย โ€ขย Publicย โ€ขย Published

skin-tone Build Status

Change the skin tone of an emoji ๐Ÿ‘Œ๐Ÿ‘Œ๐Ÿป๐Ÿ‘Œ๐Ÿผ๐Ÿ‘Œ๐Ÿฝ๐Ÿ‘Œ๐Ÿพ๐Ÿ‘Œ๐Ÿฟ

The Fitzpatrick scale is used to specify skin tones for emoji characters which represent humans.

Install

$ npm install --save skin-tone

Usage

constย skinToneย =ย require('skin-tone');
ย 
skinTone('๐Ÿ‘',ย skinTone.BROWN);
//=>ย '๐Ÿ‘๐Ÿพ'
ย 
//ย orย byย usingย theย constantย valueย directly
skinTone('๐Ÿ‘',ย 4);
//=>ย '๐Ÿ‘๐Ÿพ
ย 
skinTone('๐Ÿ‘',ย skinTone.WHITE);
//=>ย '๐Ÿ‘๐Ÿป'
ย 
//ย canย alsoย removeย skinย tone
skinTone('๐Ÿ‘๐Ÿพ',ย skinTone.NONE);
//=>ย '๐Ÿ‘'
ย 
//ย justย passesย itย throughย whenย notย supported
skinTone('๐Ÿฆ„',ย skinTone.DARK_BROWN);
//=>ย '๐Ÿฆ„'

API

skinTone(emoji, type)

emoji

Type: string

Emoji to modify.

type

Type: number
Values:

  • skinTone.NONE | 0: (Removes skin tone)
  • skinTone.WHITE | 1: ๐Ÿป (Fitzpatrick Type-1โ€“2)
  • skinTone.CREAM_WHITE | 2: ๐Ÿผ (Fitzpatrick Type-3)
  • skinTone.LIGHT_BROWN | 3: ๐Ÿฝ (Fitzpatrick Type-4)
  • skinTone.BROWN | 4: ๐Ÿพ (Fitzpatrick Type-5)
  • skinTone.DARK_BROWN | 5: ๐Ÿฟ (Fitzpatrick Type-6)

License

MIT ยฉ Sindre Sorhus

install

npm i skin-tone

Downloadsweekly downloads

87

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability