nlcst-emoticon-modifier is a specialized utility within the `unified` ecosystem, designed to process Natural Language Concrete Syntax Trees (NLCST). It identifies ASCII-based emoticons (e.g., `:)`, `:(`) within text and transforms them into dedicated `EmoticonNode` objects in the syntax tree. This package is currently stable at version `3.0.1` and follows the `unified` collective's release strategy, which typically involves new major versions for significant breaking changes like Node.js version updates or module system transitions. It is a foundational tool for natural language processing, offering a precise way to classify emoticons, distinguishing itself by its integration with the `nlcst` specification and its ESM-only distribution. Higher-level plugins, such as `retext-emoji`, build upon this utility for broader emoji and emoticon support.
npm install nlcst-emoticon-modifierVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to integrate `emoticonModifier` into a `ParseEnglish` pipeline to transform ASCII emoticons into `EmoticonNode`s within an NLCST sentence, then inspects the resulting tree.
Ensure your Node.js environment is version 16 or newer. Update by using `nvm install 16` or similar version management tools.
Migrate your project to use ES modules (`import`/`export` syntax). If you must use CommonJS, you will need to stick to `nlcst-emoticon-modifier@^1`.
Always use the main entry point `import { symbol } from 'nlcst-emoticon-modifier'`. Avoid direct deep imports into internal files unless explicitly documented, as these are no longer stable.Consumers should now rely on the main module's type declarations which provide the `Emoticon` type.
Add `import type { Emoticon } from 'nlcst-emoticon-modifier';` or `/** @typedef {import('nlcst-emoticon-modifier')} */` to a relevant TypeScript file in your project.Refactor your code to use `import { emoticonModifier } from 'nlcst-emoticon-modifier'` within an ES module context. Ensure your `package.json` has `"type": "module"` or files end with `.mjs`.Use a named import: `import { emoticonModifier } from 'nlcst-emoticon-modifier'`. The package does not provide a default export.Ensure `npm install` has been run and `@types/nlcst` is installed if you're working with nlcst nodes directly. Check `tsconfig.json` for `moduleResolution` set to `node16` or `bundler` for modern ESM environments.
No dependency data recorded yet.