Comparing version 6.1.0 to 7.0.0
{ | ||
"name": "gemoji", | ||
"version": "6.1.0", | ||
"version": "7.0.0", | ||
"description": "GitHub emoji: gemoji", | ||
@@ -26,37 +26,34 @@ "license": "MIT", | ||
], | ||
"sideEffects": false, | ||
"type": "module", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"files": [ | ||
"index.json", | ||
"emoji-to-name.json", | ||
"name-to-emoji.json" | ||
"index.d.ts", | ||
"index.js" | ||
], | ||
"main": "index.json", | ||
"devDependencies": { | ||
"browserify": "^17.0.0", | ||
"@types/tape": "^4.0.0", | ||
"c8": "^7.0.0", | ||
"mdast-zone": "^4.0.0", | ||
"node-fetch": "^2.0.0", | ||
"nyc": "^15.0.0", | ||
"prettier": "^2.0.0", | ||
"remark-cli": "^9.0.0-alpha.1", | ||
"remark-cli": "^9.0.0", | ||
"remark-preset-wooorm": "^8.0.0", | ||
"rimraf": "^3.0.0", | ||
"tape": "^5.0.0", | ||
"tinyify": "^3.0.0", | ||
"type-coverage": "^2.0.0", | ||
"typescript": "^4.0.0", | ||
"unist-builder": "^2.0.0", | ||
"xo": "^0.33.0" | ||
"xo": "^0.38.0" | ||
}, | ||
"scripts": { | ||
"prepack": "npm run build && npm run format", | ||
"build": "rimraf \"*.d.ts\" && tsc && type-coverage", | ||
"generate": "node script/crawl-data && node script/build-data", | ||
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix", | ||
"build-bundle": "browserify index.json -s gemoji > gemoji.js", | ||
"build-mangle": "browserify index.json -s gemoji -p tinyify > gemoji.min.js", | ||
"build": "npm run build-bundle && npm run build-mangle", | ||
"test-api": "node test", | ||
"test-coverage": "nyc --reporter lcov tape test.js", | ||
"test": "npm run generate && npm run format && npm run build && npm run test-coverage" | ||
"test-api": "node test.js", | ||
"test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node test.js", | ||
"test": "npm run generate && npm run build && npm run format && npm run test-coverage" | ||
}, | ||
"nyc": { | ||
"check-coverage": true, | ||
"lines": 100, | ||
"functions": 100, | ||
"branches": 100 | ||
}, | ||
"prettier": { | ||
@@ -72,10 +69,8 @@ "tabWidth": 2, | ||
"prettier": true, | ||
"esnext": false, | ||
"rules": { | ||
"guard-for-in": "off", | ||
"unicorn/no-fn-reference-in-iterator": "off" | ||
}, | ||
"ignores": [ | ||
"gemoji.js" | ||
] | ||
"import/no-mutable-exports": "off", | ||
"camelcase": "off", | ||
"no-var": "off", | ||
"prefer-arrow-callback": "off" | ||
} | ||
}, | ||
@@ -95,5 +90,10 @@ "remarkConfig": { | ||
], | ||
"./script/build-support" | ||
"./script/build-support.cjs" | ||
] | ||
}, | ||
"typeCoverage": { | ||
"atLeast": 100, | ||
"detail": true, | ||
"strict": true | ||
} | ||
} |
@@ -11,11 +11,7 @@ # gemoji | ||
Also includes pre-built indexes to map to between names and emoji: | ||
## Install | ||
* [`gemoji/emoji-to-name`][emoji-to-name] | ||
— Map emoji (🐱) to preferred name (cat) | ||
* [`gemoji/name-to-emoji`][name-to-emoji] | ||
— Map name (cat) to emoji (🐱) | ||
This package is ESM only: Node 12+ is needed to use it and it must be `import`ed | ||
instead of `require`d. | ||
## Install | ||
[npm][]: | ||
@@ -30,3 +26,3 @@ | ||
```js | ||
var gemoji = require('gemoji') | ||
import {gemoji} from 'gemoji' | ||
@@ -82,6 +78,6 @@ console.log(gemoji) | ||
```js | ||
var toEmoji = require('gemoji/name-to-emoji') | ||
import {nameToEmoji} from 'gemoji' | ||
console.log(toEmoji.cat) | ||
console.log(toEmoji.poop) | ||
console.log(nameToEmoji.cat) | ||
console.log(nameToEmoji.poop) | ||
``` | ||
@@ -99,6 +95,6 @@ | ||
```js | ||
var toName = require('gemoji/emoji-to-name') | ||
import {emojiToName} from 'gemoji' | ||
console.log(toName['🐶']) | ||
console.log(toName['\uD83D\uDCA9']) | ||
console.log(emojiToName['🐶']) | ||
console.log(emojiToName['\uD83D\uDCA9']) | ||
``` | ||
@@ -113,2 +109,26 @@ | ||
## API | ||
This package exports the following identifiers: `gemoji`, `nameToEmoji`, | ||
`emojiToName`. | ||
There is no default export. | ||
### `gemoji` | ||
`Info[]`, where each `Info` is `Object` with: | ||
* `emoji`: `string`, example: `😀` | ||
* `names`: `string[]`, example: `['grinning']` | ||
* `tags`: `string[]`, example: `['smile', 'happy']` | ||
* `description`: `string`, example: `grinning face` | ||
* `category`: `string`, example: `Smileys & Emotion` | ||
### `nameToEmoji` | ||
`Object.<string, string>` — map names (`100`) to emoji (`💯`). | ||
### `emojiToName` | ||
`Object.<string, string>` — map names (`😀`) to emoji (`grinning`). | ||
## Supported Gemoji | ||
@@ -148,5 +168,5 @@ | ||
[build-badge]: https://img.shields.io/travis/wooorm/gemoji.svg | ||
[build-badge]: https://github.com/wooorm/gemoji/workflows/main/badge.svg | ||
[build]: https://travis-ci.org/wooorm/gemoji | ||
[build]: https://github.com/wooorm/gemoji/actions | ||
@@ -176,5 +196,1 @@ [coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/gemoji.svg | ||
[gh-license]: https://github.com/github/gemoji/blob/55a0080/LICENSE | ||
[emoji-to-name]: emoji-to-name.json | ||
[name-to-emoji]: name-to-emoji.json |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
437879
190
Yes
13
5
19958
1