node-emojis 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,18 +1,17 @@
1
1
  [![npm version](https://img.shields.io/npm/v/node-emojis.svg)](https://www.npmjs.com/package/node-emojis)
2
2
  [![npm downloads](https://img.shields.io/npm/dw/node-emojis.svg)](https://www.npmjs.com/package/node-emojis)
3
3
  [![CI](https://github.com/jesselpalmer/node-emojis/workflows/CI/badge.svg)](https://github.com/jesselpalmer/node-emojis/actions)
4
- [![bundle size](https://img.shields.io/bundlephobia/min/node-emojis)](https://bundlephobia.com/package/node-emojis)
5
4
  [![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)
6
- [![license](https://img.shields.io/npm/l/node-emojis.svg)](https://github.com/jesselpalmer/node-emojis/blob/master/LICENSE)
5
+ [![license](https://img.shields.io/npm/l/node-emojis.svg)](https://github.com/jesselpalmer/node-emojis/blob/main/LICENSE)
7
6
 
8
7
  # node-emojis 🎉
9
8
 
10
- A modern, tree-shakeable emoji library for Node.js and browsers with TypeScript support.
9
+ An emoji library for Node.js with TypeScript types, search, skin tones and aliases.
11
10
 
12
11
  ## ✨ Features
13
12
 
14
- - 🌳 **Tree-shakeable** - Import only what you need
15
- - 📦 **360+ emojis** from Unicode 1.0 to 15.0
13
+ - 🌳 **Modular** - Subpath imports load only the feature you need
14
+ - 📦 **230+ emojis** (369 names including aliases) from Unicode 1.0 to 15.0
16
15
  - 🔍 **Smart search** with keyword matching
17
16
  - 🎨 **Skin tone support** for 150+ human emojis
18
17
  - 🔄 **Emoji aliases** (thumbsup/+1/thumbs_up)
@@ -22,7 +21,7 @@ A modern, tree-shakeable emoji library for Node.js and browsers with TypeScript
22
21
 
23
22
  ## 📋 Requirements
24
23
 
25
- - Node.js 20.0.0 or higher
24
+ - Node.js 20.0.0 or higher (CI tests Node 20, 22, 24 and 26)
26
25
  - TypeScript 5.0+ (for TypeScript users)
27
26
 
28
27
  ## 📦 Installation
@@ -47,10 +46,13 @@ const { applySkinTone } = require('node-emojis/skin-tones')
47
46
 
48
47
  ```javascript
49
48
  import emojis from 'node-emojis'
50
- import { search } from 'node-emojis/search'
49
+ import { search, getNameFromEmoji } from 'node-emojis'
51
50
  import { applySkinTone } from 'node-emojis/skin-tones'
52
51
  ```
53
52
 
53
+ The package is published as CommonJS. Native ESM `import`, including named
54
+ imports from the package root, works in Node.js and in bundlers.
55
+
54
56
  ## 📖 API
55
57
 
56
58
  ### Basic Usage
@@ -134,39 +136,38 @@ const hearts = filterByKeyword('heart')
134
136
  const { getNameFromEmoji, isValidEmoji, isValidEmojiName } = require('node-emojis')
135
137
 
136
138
  // Reverse lookup
137
- getNameFromEmoji('🔥') // 'fire'
139
+ getNameFromEmoji('🔥') // a name for 🔥 ('fire' or one of its aliases)
138
140
 
139
141
  // Validation
140
142
  isValidEmoji('🔥') // true
141
143
  isValidEmojiName('fire') // true
142
144
  ```
143
145
 
144
- ## 🌲 Tree Shaking
146
+ ## 🌲 Smaller Imports
145
147
 
146
- Import only what you need to minimize bundle size:
148
+ Each feature has its own subpath, so you can load only what you need:
147
149
 
148
150
  ```javascript
149
- // ❌ Imports entire library
151
+ // Loads the whole library, including the legacy emoji object
150
152
  import emojis from 'node-emojis'
151
153
 
152
- // ✅ Imports only search functionality
154
+ // Loads only the search feature and its data
153
155
  import { search } from 'node-emojis/search'
154
156
 
155
- // ✅ Import multiple features
157
+ // Import multiple features
156
158
  import { search } from 'node-emojis/search'
157
159
  import { applySkinTone } from 'node-emojis/skin-tones'
158
160
  import { getAliases } from 'node-emojis/aliases'
159
161
  ```
160
162
 
161
- ## 📊 Bundle Size Comparison
163
+ ## 🟦 TypeScript
164
+
165
+ Type definitions are included. Subpath imports such as `node-emojis/search`
166
+ need `moduleResolution` set to `node16`, `nodenext` or `bundler`.
162
167
 
163
- | Import Style | Size (minified) |
164
- |-------------|-----------------|
165
- | Full library | ~85KB |
166
- | Search only | ~15KB |
167
- | Skin tones only | ~8KB |
168
- | Aliases only | ~6KB |
169
- | Direct data import | ~60KB |
168
+ The root `getByCategory` and `getAllNames` are the legacy v0.x methods. For
169
+ the modern versions, import them from `node-emojis/search` and
170
+ `node-emojis/aliases`.
170
171
 
171
172
  ## 📚 Documentation
172
173
 
@@ -184,7 +185,7 @@ For comprehensive documentation, examples, and guides:
184
185
  See the [examples](./examples) directory for more usage examples:
185
186
 
186
187
  - [Basic usage](./examples/basic-usage.js) - CommonJS examples
187
- - [Modern usage](./examples/modern-usage.js) - Tree-shaking examples
188
+ - [Modern usage](./examples/modern-usage.js) - Subpath import examples
188
189
 
189
190
  ## 🤝 Contributing
190
191
 
package/lib/index.d.ts CHANGED
@@ -24,6 +24,42 @@ export * from './utils/reverse-mapping';
24
24
  export * from './utils/validators';
25
25
  export * from './core/emoji';
26
26
  import { EmojisMain } from './backward-compat';
27
+ import * as searchFeature from './features/search';
28
+ import * as skinTonesFeature from './features/skin-tones';
29
+ import * as aliasesFeature from './features/aliases';
30
+ import * as filtersFeature from './features/filters';
31
+ import * as reverseMappingUtils from './utils/reverse-mapping';
32
+ import * as validatorUtils from './utils/validators';
27
33
  declare const emojis: EmojisMain;
34
+ export declare const search: typeof searchFeature.search;
35
+ export declare const getCategories: typeof searchFeature.getCategories;
36
+ export declare const SKIN_TONE_MODIFIERS: typeof skinTonesFeature.SKIN_TONE_MODIFIERS;
37
+ export declare const SKIN_TONE_CAPABLE_EMOJIS: typeof skinTonesFeature.SKIN_TONE_CAPABLE_EMOJIS;
38
+ export declare const applySkinTone: typeof skinTonesFeature.applySkinTone;
39
+ export declare const supportsSkinTone: typeof skinTonesFeature.supportsSkinTone;
40
+ export declare const getAllSkinToneVariations: typeof skinTonesFeature.getAllSkinToneVariations;
41
+ export declare const removeSkinTone: typeof skinTonesFeature.removeSkinTone;
42
+ export declare const aliases: typeof aliasesFeature.aliases;
43
+ export declare const getAliases: typeof aliasesFeature.getAliases;
44
+ export declare const getPrimaryName: typeof aliasesFeature.getPrimaryName;
45
+ export declare const isSameEmoji: typeof aliasesFeature.isSameEmoji;
46
+ export declare const resolveEmoji: typeof aliasesFeature.resolveEmoji;
47
+ export declare const getAliasMap: typeof aliasesFeature.getAliasMap;
48
+ export declare const filterByCategory: typeof filtersFeature.filterByCategory;
49
+ export declare const filterByVersion: typeof filtersFeature.filterByVersion;
50
+ export declare const filterByKeyword: typeof filtersFeature.filterByKeyword;
51
+ export declare const getUnicodeVersions: typeof filtersFeature.getUnicodeVersions;
52
+ export declare const getNameFromEmoji: typeof reverseMappingUtils.getNameFromEmoji;
53
+ export declare const getReverseMapping: typeof reverseMappingUtils.getReverseMapping;
54
+ export declare const isKnownEmoji: typeof reverseMappingUtils.isKnownEmoji;
55
+ export declare const createReverseMapping: typeof reverseMappingUtils.createReverseMapping;
56
+ export declare const isValidEmoji: typeof validatorUtils.isValidEmoji;
57
+ export declare const isValidEmojiName: typeof validatorUtils.isValidEmojiName;
58
+ export declare const isValidSkinTone: typeof validatorUtils.isValidSkinTone;
59
+ export declare const sanitizeEmojiName: typeof validatorUtils.sanitizeEmojiName;
60
+ export declare const hasVariationSelector: typeof validatorUtils.hasVariationSelector;
61
+ export declare const stripVariationSelectors: typeof validatorUtils.stripVariationSelectors;
62
+ export declare const getByCategory: EmojisMain['getByCategory'];
63
+ export declare const getAllNames: EmojisMain['getAllNames'];
28
64
  export default emojis;
29
65
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAGlC,cAAc,yBAAyB,CAAA;AACvC,cAAc,oBAAoB,CAAA;AAGlC,cAAc,cAAc,CAAA;AAG5B,OAAO,EAA+B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AM,oBAAoB,EAAkC,OAAO,cAAc,CAAC,oBAAoB,CAAA;AAC7G,eAAO,MAAM,uBAAuB,EAAqC,OAAO,cAAc,CAAC,uBAAuB,CAAA;AAKtH,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,eAAe,CAAwB,CAAA;AAC9E,eAAO,MAAM,WAAW,EAAE,UAAU,CAAC,aAAa,CAAsB,CAAA;AASxE,eAAe,MAAM,CAAA"}
package/lib/index.js CHANGED
@@ -28,10 +28,33 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
28
28
  if (k2 === undefined) k2 = k;
29
29
  o[k2] = m[k];
30
30
  }));
31
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
32
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
33
+ }) : function(o, v) {
34
+ o["default"] = v;
35
+ });
31
36
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
32
37
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
33
38
  };
39
+ var __importStar = (this && this.__importStar) || (function () {
40
+ var ownKeys = function(o) {
41
+ ownKeys = Object.getOwnPropertyNames || function (o) {
42
+ var ar = [];
43
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
44
+ return ar;
45
+ };
46
+ return ownKeys(o);
47
+ };
48
+ return function (mod) {
49
+ if (mod && mod.__esModule) return mod;
50
+ var result = {};
51
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
52
+ __setModuleDefault(result, mod);
53
+ return result;
54
+ };
55
+ })();
34
56
  Object.defineProperty(exports, "__esModule", { value: true });
57
+ exports.getAllNames = exports.getByCategory = exports.stripVariationSelectors = exports.hasVariationSelector = exports.sanitizeEmojiName = exports.isValidSkinTone = exports.isValidEmojiName = exports.isValidEmoji = exports.createReverseMapping = exports.isKnownEmoji = exports.getReverseMapping = exports.getNameFromEmoji = exports.getUnicodeVersions = exports.filterByKeyword = exports.filterByVersion = exports.filterByCategory = exports.getAliasMap = exports.resolveEmoji = exports.isSameEmoji = exports.getPrimaryName = exports.getAliases = exports.aliases = exports.removeSkinTone = exports.getAllSkinToneVariations = exports.supportsSkinTone = exports.applySkinTone = exports.SKIN_TONE_CAPABLE_EMOJIS = exports.SKIN_TONE_MODIFIERS = exports.getCategories = exports.search = void 0;
35
58
  // Re-export all modern features for tree-shaking
36
59
  __exportStar(require("./features/search"), exports);
37
60
  __exportStar(require("./features/skin-tones"), exports);
@@ -44,14 +67,73 @@ __exportStar(require("./utils/validators"), exports);
44
67
  __exportStar(require("./core/emoji"), exports);
45
68
  // Import backward compatibility API
46
69
  const backward_compat_1 = require("./backward-compat");
70
+ const searchFeature = __importStar(require("./features/search"));
71
+ const skinTonesFeature = __importStar(require("./features/skin-tones"));
72
+ const aliasesFeature = __importStar(require("./features/aliases"));
73
+ const filtersFeature = __importStar(require("./features/filters"));
74
+ const reverseMappingUtils = __importStar(require("./utils/reverse-mapping"));
75
+ const validatorUtils = __importStar(require("./utils/validators"));
47
76
  // Create the default export with backward compatibility
48
77
  const emojis = (0, backward_compat_1.createBackwardCompatibleAPI)();
49
- // For CommonJS compatibility, we need to export emojis as the module
78
+ // Attach every named export to the legacy object as a non-enumerable
79
+ // property, so `require('node-emojis').search` works while
80
+ // `Object.keys(require('node-emojis'))` still lists only emoji names.
81
+ // Legacy properties are never overwritten.
82
+ const namedExports = Object.assign({}, searchFeature, skinTonesFeature, aliasesFeature, filtersFeature, reverseMappingUtils, validatorUtils);
83
+ for (const name of Object.keys(namedExports)) {
84
+ if (!Object.prototype.hasOwnProperty.call(emojis, name)) {
85
+ Object.defineProperty(emojis, name, {
86
+ value: namedExports[name],
87
+ enumerable: false,
88
+ writable: true,
89
+ configurable: true
90
+ });
91
+ }
92
+ }
93
+ // Explicit exports of every runtime value. Assigning them by name
94
+ // (compiled to `exports.name = ...`) lets Node's CommonJS export detection
95
+ // see them, so `import { search } from 'node-emojis'` works in native ESM.
96
+ // Values are read from the legacy object, which is what both require() and
97
+ // ESM consumers actually receive, so there is one source of truth. The
98
+ // `export *` lines above still carry the type exports. Keep this list in
99
+ // sync with the feature modules (test/package-exports.test.ts checks it).
100
+ exports.search = emojis.search;
101
+ exports.getCategories = emojis.getCategories;
102
+ exports.SKIN_TONE_MODIFIERS = emojis.SKIN_TONE_MODIFIERS;
103
+ exports.SKIN_TONE_CAPABLE_EMOJIS = emojis.SKIN_TONE_CAPABLE_EMOJIS;
104
+ exports.applySkinTone = emojis.applySkinTone;
105
+ exports.supportsSkinTone = emojis.supportsSkinTone;
106
+ exports.getAllSkinToneVariations = emojis.getAllSkinToneVariations;
107
+ exports.removeSkinTone = emojis.removeSkinTone;
108
+ exports.aliases = emojis.aliases;
109
+ exports.getAliases = emojis.getAliases;
110
+ exports.getPrimaryName = emojis.getPrimaryName;
111
+ exports.isSameEmoji = emojis.isSameEmoji;
112
+ exports.resolveEmoji = emojis.resolveEmoji;
113
+ exports.getAliasMap = emojis.getAliasMap;
114
+ exports.filterByCategory = emojis.filterByCategory;
115
+ exports.filterByVersion = emojis.filterByVersion;
116
+ exports.filterByKeyword = emojis.filterByKeyword;
117
+ exports.getUnicodeVersions = emojis.getUnicodeVersions;
118
+ exports.getNameFromEmoji = emojis.getNameFromEmoji;
119
+ exports.getReverseMapping = emojis.getReverseMapping;
120
+ exports.isKnownEmoji = emojis.isKnownEmoji;
121
+ exports.createReverseMapping = emojis.createReverseMapping;
122
+ exports.isValidEmoji = emojis.isValidEmoji;
123
+ exports.isValidEmojiName = emojis.isValidEmojiName;
124
+ exports.isValidSkinTone = emojis.isValidSkinTone;
125
+ exports.sanitizeEmojiName = emojis.sanitizeEmojiName;
126
+ exports.hasVariationSelector = emojis.hasVariationSelector;
127
+ exports.stripVariationSelectors = emojis.stripVariationSelectors;
128
+ // `getByCategory` and `getAllNames` exist on the legacy object with v0.x
129
+ // semantics, and the legacy versions win at the package root. The modern
130
+ // versions are available from 'node-emojis/search' and 'node-emojis/aliases'.
131
+ exports.getByCategory = emojis.getByCategory;
132
+ exports.getAllNames = emojis.getAllNames;
133
+ // For CommonJS compatibility, the module itself is the legacy emojis object
50
134
  module.exports = emojis;
51
135
  // Also export as default for ES modules
52
136
  module.exports.default = emojis;
53
137
  // Export the type
54
138
  exports.default = emojis;
55
- // Re-export features for tree-shaking (these are already exported via __exportStar)
56
- // The named data exports are already available via getters on the emojis object
57
139
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;;;;AAEH,iDAAiD;AACjD,oDAAiC;AACjC,wDAAqC;AACrC,qDAAkC;AAClC,qDAAkC;AAElC,sBAAsB;AACtB,0DAAuC;AACvC,qDAAkC;AAElC,kBAAkB;AAClB,+CAA4B;AAE5B,oCAAoC;AACpC,uDAA2E;AAE3E,wDAAwD;AACxD,MAAM,MAAM,GAAe,IAAA,6CAA2B,GAAE,CAAA;AAExD,qEAAqE;AACrE,MAAM,CAAC,OAAO,GAAG,MAAM,CAAA;AAEvB,wCAAwC;AACxC,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,MAAM,CAAA;AAE/B,kBAAkB;AAClB,kBAAe,MAAM,CAAA;AAErB,oFAAoF;AACpF,gFAAgF"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,iDAAiD;AACjD,oDAAiC;AACjC,wDAAqC;AACrC,qDAAkC;AAClC,qDAAkC;AAElC,sBAAsB;AACtB,0DAAuC;AACvC,qDAAkC;AAElC,kBAAkB;AAClB,+CAA4B;AAE5B,oCAAoC;AACpC,uDAA2E;AAE3E,iEAAkD;AA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,CAAA;AAEvB,wCAAwC;AACxC,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,MAAM,CAAA;AAE/B,kBAAkB;AAClB,kBAAe,MAAM,CAAA"}
package/package.json CHANGED
@@ -1,28 +1,27 @@
1
1
  {
2
2
  "name": "node-emojis",
3
- "version": "1.0.0",
4
- "description": "Modern, tree-shakeable emoji library for Node.js with TypeScript, search, skin tones, and aliases 🎉",
3
+ "version": "1.0.1",
4
+ "description": "Emoji library for Node.js with TypeScript types, search, skin tones, and aliases 🎉",
5
5
  "main": "lib/index.js",
6
- "module": "lib/index.js",
7
6
  "types": "lib/index.d.ts",
8
7
  "sideEffects": false,
9
8
  "scripts": {
10
9
  "build": "tsc",
11
10
  "clean": "rm -rf dist lib",
12
11
  "prebuild": "npm run clean",
13
- "prepublishOnly": "npm run build && npm test",
12
+ "prepublishOnly": "npm test",
14
13
  "cover": "cross-env TS_NODE_PROJECT=tsconfig.test.json nyc mocha",
15
14
  "cover:ci": "npm run cover",
16
- "lint": "npm run lint:ts && npm run lint:md && npm run lint:yaml",
15
+ "lint": "npm run lint:ts && npm run lint:md",
16
+ "prelint:ts": "npm run build",
17
17
  "lint:ts": "tsc --noEmit --project tsconfig.test.json",
18
18
  "lint:ts:fix": "echo 'TypeScript linting complete'",
19
19
  "lint:md": "markdownlint-cli2 \"**/*.md\" \"#node_modules\"",
20
20
  "lint:md:fix": "markdownlint-cli2 --fix \"**/*.md\" \"#node_modules\"",
21
- "lint:yaml": "yamllint .github/**/*.yml *.yml *.yaml --ignore=node_modules",
22
21
  "lint:fix": "npm run lint:ts:fix && npm run lint:md:fix",
22
+ "pretest": "npm run build",
23
23
  "test": "npm run cover",
24
- "prepare": "husky",
25
- "lint:check-bypass": "node scripts/check-bypass.js"
24
+ "test:package": "node scripts/smoke-test.js"
26
25
  },
27
26
  "repository": "git+https://github.com/jesselpalmer/node-emojis.git",
28
27
  "engines": {
@@ -94,8 +93,6 @@
94
93
  "skin-tone",
95
94
  "aliases",
96
95
  "search",
97
- "tree-shaking",
98
- "es-modules",
99
96
  "commonjs",
100
97
  "emoji-search",
101
98
  "emoji-picker",
@@ -113,22 +110,17 @@
113
110
  },
114
111
  "homepage": "https://github.com/jesselpalmer/node-emojis#readme",
115
112
  "devDependencies": {
116
- "@commitlint/cli": "^19.8.1",
117
- "@commitlint/config-conventional": "^19.8.1",
118
113
  "@istanbuljs/nyc-config-typescript": "^1.0.2",
119
- "@types/chai": "^5.2.2",
114
+ "@types/chai": "^5.2.3",
120
115
  "@types/mocha": "^10.0.10",
121
- "@types/node": "^24.0.10",
122
- "chai": "^5.2.0",
123
- "cross-env": "^7.0.3",
124
- "husky": "^9.1.7",
125
- "markdownlint-cli2": "^0.18.1",
126
- "mocha": "^11.7.1",
127
- "nyc": "^17.1.0",
116
+ "@types/node": "^24.19.2",
117
+ "chai": "^6.3.0",
118
+ "cross-env": "^10.1.0",
119
+ "markdownlint-cli2": "^0.24.2",
120
+ "mocha": "^12.0.3",
121
+ "nyc": "^18.0.0",
128
122
  "ts-node": "^10.9.2",
129
- "tslib": "^2.8.1",
130
- "typescript": "^5.8.3",
131
- "yaml-lint": "^1.7.0"
123
+ "typescript": "~5.9.3"
132
124
  },
133
125
  "nyc": {
134
126
  "extends": "@istanbuljs/nyc-config-typescript",
@@ -137,5 +129,10 @@
137
129
  "statements": 85,
138
130
  "functions": 75,
139
131
  "branches": 60
132
+ },
133
+ "overrides": {
134
+ "glob": "^14.0.6",
135
+ "minimatch": "^11.0.9",
136
+ "katex": "^0.19.1"
140
137
  }
141
138
  }