nlcst-is-literal is a focused utility within the `unified` ecosystem, designed to determine if a `WordNode` within an NLCST (Natural Language Concrete Syntax Tree) parent node is semantically considered a "literal." This check typically involves analyzing surrounding punctuation, such as quotes, parentheses, or dashes, that enclose the word. The package is currently stable at version `3.0.0` and follows the `unified` collective's release cadence, typically aligning major versions with Node.js LTS updates and significant architectural shifts like the transition to ESM. It's primarily used by tools that process natural language, such as spell-checkers or linting tools, to correctly identify and potentially exclude words that are meant as examples or explicitly quoted text rather than standard vocabulary, rather than actual words to be evaluated.
npm install nlcst-is-literalVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to parse a text, visit its word nodes, and use `isLiteral` to identify and log words that are enclosed by delimiters such as quotes, parentheses, or dashes.
Upgrade your Node.js environment to version 16 or higher.
Always import modules directly from the package name, e.g., `import { isLiteral } from 'nlcst-is-literal'`.Migrate your project to use ES Modules or use an older version of the package if CommonJS is strictly required (not recommended for new projects).
Consult the NLCST specification and examples to understand how punctuation creates literal contexts. Inspect your NLCST tree if unexpected results occur.
Change `const { isLiteral } = require('nlcst-is-literal')` to `import { isLiteral } from 'nlcst-is-literal'` and ensure your project supports ESM.Ensure you are using `import { isLiteral } from 'nlcst-is-literal'` and not attempting to import it as a default export or through a path that mangles the named export.Verify your `import { isLiteral } from 'nlcst-is-literal'` statement is correct and at the top level of your module, and that the file is treated as an ES Module.No dependency data recorded yet.