This commit is contained in:
2024-03-22 03:47:51 +05:30
parent 8bcf3d211e
commit 89819f6fe2
28440 changed files with 3211033 additions and 2 deletions

45
node_modules/skin-tone/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,45 @@
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;

25
node_modules/skin-tone/index.js generated vendored Normal file
View File

@@ -0,0 +1,25 @@
'use strict';
const emojiModifierBase = require('unicode-emoji-modifier-base');
const skinTones = new Map([
['none', ''],
['white', '🏻'],
['creamWhite', '🏼'],
['lightBrown', '🏽'],
['brown', '🏾'],
['darkBrown', '🏿']
]);
module.exports = (emoji, tone) => {
if (!skinTones.has(tone)) {
throw new TypeError(`Unexpected \`skinTone\` name: ${tone}`);
}
emoji = emoji.replace(/[\u{1f3fb}-\u{1f3ff}]/u, '');
if (emojiModifierBase.has(emoji.codePointAt(0)) && tone !== 'none') {
emoji += skinTones.get(tone);
}
return emoji;
};

9
node_modules/skin-tone/license generated vendored Normal file
View File

@@ -0,0 +1,9 @@
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

45
node_modules/skin-tone/package.json generated vendored Normal file
View File

@@ -0,0 +1,45 @@
{
"name": "skin-tone",
"version": "2.0.0",
"description": "Change the skin tone of an emoji 👌👌🏻👌🏼👌🏽👌🏾👌🏿",
"license": "MIT",
"repository": "sindresorhus/skin-tone",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=8"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"emoji",
"emojis",
"skin",
"tone",
"type",
"unicode",
"emoticon",
"fitzpatrick",
"scale",
"modify",
"change",
"strip",
"remove"
],
"dependencies": {
"unicode-emoji-modifier-base": "^1.0.0"
},
"devDependencies": {
"ava": "^1.4.1",
"tsd": "^0.7.2",
"xo": "^0.24.0"
}
}

64
node_modules/skin-tone/readme.md generated vendored Normal file
View File

@@ -0,0 +1,64 @@
# skin-tone [![Build Status](https://travis-ci.org/sindresorhus/skin-tone.svg?branch=master)](https://travis-ci.org/sindresorhus/skin-tone)
> Change the skin tone of an emoji 👌👌🏻👌🏼👌🏽👌🏾👌🏿
The [Fitzpatrick scale](https://en.wikipedia.org/wiki/Fitzpatrick_scale#Unicode) is used to specify skin tones for emoji characters which represent humans.
## Install
```
$ npm install skin-tone
```
## Usage
```js
const skinTone = require('skin-tone');
skinTone('👍', 'brown');
//=> '👍🏾'
skinTone('👍', 'white');
//=> '👍🏻'
// can also remove skin tone
skinTone('👍🏾', 'none');
//=> '👍'
// just passes it through when not supported
skinTone('🦄', 'darkBrown');
//=> '🦄'
```
## API
### skinTone(emoji, tone)
#### emoji
Type: `string`
Emoji to modify.
#### tone
Type: `'none' | 'white' | 'creamWhite' | 'lightBrown' | 'brown' | 'darkBrown'`
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)*
Skin tone to use for `emoji`.
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)