This library, `shortcode-parser`, provides functionality for parsing shortcodes in JavaScript, supporting both self-closing and enclosing shortcodes, attributes, and automatic typecasting. Key features include attribute handling and a clean, linted JavaScript source with unit tests. Its last known release, version `0.0.1`, was published in October 2013. The package explicitly targets Node.js versions `0.10.x`, which reached its End-of-Life in October 2016. Due to its age and reliance on an unsupported Node.js runtime, this package is effectively abandoned. There is no active development or maintenance, and no clear release cadence. Developers seeking similar functionality in modern JavaScript environments should consider actively maintained alternatives like `shortcode-insert`, `universal-shortcodes`, or `@hewes/shortcode`.
npm install shortcode-parserVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to install, require, add custom shortcode handlers, and parse strings containing both registered and context-specific shortcodes.
Do not use this package for new projects. For existing projects, consider a full migration to a modern shortcode parsing library.
Always use `const shortcode = require('shortcode-parser');` when integrating this package into your application.Migrate to a actively maintained shortcode parsing library. Examples include `shortcode-insert`, `universal-shortcodes`, or `@hewes/shortcode`.
If providing handlers via the `context` parameter, ensure the keys of the `context` object match your shortcode names. The example may be confusing or demonstrate an undocumented flexibility.
This package is CommonJS-only. If your project is an ES module, you must either refactor to use `require()` via `createRequire` (Node.js) or transition to a modern ESM-compatible shortcode parser. Example: `import { createRequire } from 'module'; const require = createRequire(import.meta.url); const shortcode = require('shortcode-parser');`Ensure you are correctly assigning the result of `require('shortcode-parser')` to a variable (e.g., `const shortcode = require('shortcode-parser');`) and calling methods directly on that variable.Run `npm install shortcode-parser` or `yarn add shortcode-parser` in your project directory.
No dependency data recorded yet.