{"_id":"@baz-scm/remark-emoji","_rev":"3-7627d83092d4ee47f2eb6c8c4bf13912","name":"@baz-scm/remark-emoji","dist-tags":{"latest":"5.0.2"},"versions":{"5.0.2":{"name":"@baz-scm/remark-emoji","version":"5.0.2","keywords":["markdown","emoji","remark","plugin"],"author":{"name":"Baz"},"license":"MIT","_id":"@baz-scm/remark-emoji@5.0.2","maintainers":[{"name":"nimrodkor-baz","email":"nimrod@baz.co"},{"name":"omriel1","email":"omri@baz.co"}],"homepage":"https://github.com/baz-scm/remark-emoji","bugs":{"url":"https://github.com/baz-scm/remark-emoji/issues"},"dist":{"shasum":"2441d5984c002805c2f2db9e510ee9e8f36eb4e3","tarball":"https://registry.npmjs.org/@baz-scm/remark-emoji/-/remark-emoji-5.0.2.tgz","fileCount":6,"integrity":"sha512-3I01nISO4wJNwq98VG3aHLposRuTFH03gubbASq/PI2cVYUgJ+630YZvWbbErDyArup5d0O7U8RvOt+KFM4jOA==","signatures":[{"sig":"MEUCIQCg7Bn5WLhJoLaG8QBGRB5sPOEO7R2NhQIuDAWfFP0lUQIgZEeIy8bEfCIjCUkShNrB+2gLN/Kk/1ZcI5s+asjII/k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18010},"type":"module","types":"index.d.ts","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./index.d.ts","default":"./index.js"}}},"gitHead":"ba91e725a5f8897baf44b59ae6afeb0fa53ec529","scripts":{"lint":"concurrently -c auto npm:eslint npm:prettier npm:tsc-eslint","test":"concurrently -m 1 -c auto npm:build npm:mocha","build":"tsc --pretty -p . -d","mocha":"mocha --color test.js","watch":"tsc -w -p .","eslint":"eslint '*.ts' eslint.config.mjs","format":"prettier -w '*.ts' eslint.config.mjs","prepare":"concurrently -m 1 -c auto npm:lint npm:build npm:test","prettier":"prettier -c '*.ts' eslint.config.mjs","tsc-eslint":"tsc --pretty -p tsconfig.eslint.json"},"_npmUser":{"name":"omriel1","email":"omri@baz.co"},"repository":{"url":"git+https://github.com/baz-scm/remark-emoji.git","type":"git"},"_npmVersion":"10.9.0","description":"Fork of remark-emoji","directories":{},"_nodeVersion":"22.11.0","dependencies":{"unified":"^11.0.4","emoticon":"^4.0.1","node-emoji":"^2.1.3","@types/mdast":"^4.0.4","mdast-util-find-and-replace":"^3.0.1"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.4.0","eslint":"^8.52.0","remark":"^15.0.1","prettier":"^3.2.5","@eslint/js":"^9.2.0","remark-gfm":"^4.0.0","typescript":"^5.4.5","@types/node":"^20.12.12","rehype-slug":"^6.0.0","@types/mocha":"^10.0.6","concurrently":"^8.2.2","remark-parse":"^11.0.0","remark-github":"^12.0.0","remark-rehype":"^11.1.0","eslint-plugin-n":"^17.7.0","rehype-sanitize":"^6.0.0","rehype-stringify":"^10.0.0","@types/eslint__js":"^8.42.3","typescript-eslint":"^7.9.0","eslint-plugin-mocha":"^10.4.3","eslint-config-prettier":"^9.1.0","eslint-plugin-security":"^3.0.0","rehype-autolink-headings":"^7.1.0","@types/eslint-plugin-mocha":"^10.4.0","@types/eslint-config-prettier":"^6.11.3","@types/eslint-plugin-security":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/remark-emoji_5.0.2_1736759231324_0.32153921301832833","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-01-13T09:07:11.221Z","modified":"2026-09-22T12:25:21.003Z","5.0.2":"2025-01-13T09:07:11.500Z"},"bugs":{"url":"https://github.com/baz-scm/remark-emoji/issues"},"author":{"name":"Baz"},"license":"MIT","homepage":"https://github.com/baz-scm/remark-emoji","keywords":["markdown","emoji","remark","plugin"],"repository":{"url":"git+https://github.com/baz-scm/remark-emoji.git","type":"git"},"description":"Fork of remark-emoji","maintainers":[{"email":"nimrod@baz.co","name":"nimrodkor-baz"},{"email":"anton.gruebel@gmail.com","name":"gruebel"},{"email":"yacoby133@gmail.com","name":"yuvalyacoby"},{"email":"omri@baz.co","name":"omriel1"}],"readme":"remark-emoji\n============\n\nThis is a fork of [remark-emoji](https://github.com/rhysd/remark-emoji) with a fix for mid-word emoctions bug, suggested by [benkenawell](https://github.com/benkenawell) in his [PR](https://github.com/rhysd/remark-emoji/pull/37).\n\n## Demo\n\nYou can find a demo in the following [Codesandbox](https://codesandbox.io/p/sandbox/remark-emoji-example-w6yrmm).\n\n## Usage\n\n```\nremark().use(emoji [, options]);\n```\n\n```javascript\nimport { remark } from 'remark';\nimport emoji from 'remark-emoji';\n\nconst doc = 'Emojis in this text will be replaced: :dog::+1:';\nconst processor = remark().use(emoji);\nconst file = await processor.process(doc);\n\nconsole.log(String(file));\n// => Emojis in this text will be replaced: 🐶👍\n```\n\nNote:\n\n- This package is [ESM only][esm-only] from v3.0.0 since remark packages migrated to ESM.\n- This package supports Node.js v18 or later.\n\n## Options\n\n### `options.accessible`\n\nSetting to `true` makes the converted emoji text accessible with `role` and `aria-label` attributes. Each emoji\ntext is wrapped with `<span>` element. The `role` and `aria-label` attribute are not allowed by default. Please\nadd them to the sanitization schema used by remark's HTML transformer. The default sanitization schema is exported\nfrom [rehype-sanitize](https://www.npmjs.com/package/rehype-sanitize) package.\n\nFor example,\n\n```javascript\nimport remarkParse from 'remark-parse';\nimport toRehype from 'remark-rehype';\nimport sanitize, { defaultSchema } from 'rehype-sanitize';\nimport stringify from 'rehype-stringify';\nimport emoji from 'remark-emoji';\nimport { unified } from 'unified';\n\n// Allow using `role` and `aria-label` attributes in transformed HTML document\nconst schema = structuredClone(defaultSchema);\nif ('span' in schema.attributes) {\n    schema.attributes.span.push('role', 'ariaLabel');\n} else {\n    schema.attributes.span = ['role', 'ariaLabel'];\n}\n\n// Markdown text processor pipeline\nconst processor = unified()\n    .use(remarkParse)\n    .use(emoji, { accessible: true })\n    .use(toRehype)\n    .use(sanitize, schema)\n    .use(stringify);\n\nconst file = await processor.process('Hello :dog:!');\nconsole.log(String(file));\n```\n\nyields\n\n```html\nHello <span role=\"img\" aria-label=\"dog emoji\">🐶</span>!\n```\n\nDefault value is `false`.\n\n### `options.padSpaceAfter`\n\nSetting to `true` means that an extra whitespace is added after emoji.\nThis is useful when browser handle emojis with half character length and following character is hidden.\nDefault value is `false`.\n\n### `options.emoticon`\n\nSetting to `true` means that [emoticon](https://www.npmjs.com/package/emoticon) shortcodes are supported (e.g. :-)\nwill be replaced by 😃). Default value is `false`.\n\n## TypeScript support\n\nremark-emoji package contains [TypeScript](https://www.typescriptlang.org/) type definitions. The package is ready\nfor use with TypeScript.\n\nNote that the legacy `node` (or `node10`) resolution at [`moduleResolution`](https://www.typescriptlang.org/tsconfig#moduleResolution)\nis not available since it enforces CommonJS module resolution and this package is ESM only. Please use `node16`,\n`bundler`, or `nodenext` to enable ESM module resolution.\n\n## License\n\nDistributed under [the MIT License](LICENSE).\n\n\n\n[ci-badge]: https://github.com/rhysd/remark-emoji/actions/workflows/ci.yml/badge.svg\n[ci]: https://github.com/rhysd/remark-emoji/actions/workflows/ci.yml\n[npm-badge]: https://badge.fury.io/js/remark-emoji.svg\n[npm]: https://www.npmjs.com/package/remark-emoji\n[esm-only]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n","readmeFilename":"README.md"}