Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More β†’
Socket
Sign inDemoInstall
Socket

mdast-util-to-nlcst

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdast-util-to-nlcst - npm Package Compare versions

Comparing version 7.0.0 to 7.0.1

index.d.ts.map

9

index.d.ts

@@ -1,4 +0,5 @@

export {toNlcst} from './lib/index.js'
export type Options = import('./lib/index.js').Options
export type ParserInstance = import('./lib/index.js').ParserInstance
export type ParserConstructor = import('./lib/index.js').ParserConstructor
export { toNlcst } from "./lib/index.js";
export type Options = import('./lib/index.js').Options;
export type ParserInstance = import('./lib/index.js').ParserInstance;
export type ParserConstructor = import('./lib/index.js').ParserConstructor;
//# sourceMappingURL=index.d.ts.map

@@ -18,20 +18,15 @@ /**

*/
export function toNlcst(
tree: MdastNodes,
file: VFile,
Parser: ParserConstructor | ParserInstance,
options?: Options | null | undefined
): NlcstRoot
export type MdastNodes = import('mdast').Nodes
export type MdastParents = import('mdast').Parents
export type NlcstParagraph = import('nlcst').Paragraph
export type NlcstParents = import('nlcst').Parents
export type NlcstRoot = import('nlcst').Root
export type NlcstRootContent = import('nlcst').RootContent
export type NlcstSentence = import('nlcst').Sentence
export type NlcstSentenceContent = import('nlcst').SentenceContent
export type NlcstWhiteSpace = import('nlcst').WhiteSpace
export type Point = import('unist').Point
export type VFile = import('vfile').VFile
export type Location = import('vfile-location').Location
export function toNlcst(tree: MdastNodes, file: VFile, Parser: ParserConstructor | ParserInstance, options?: Options | null | undefined): NlcstRoot;
export type MdastNodes = import('mdast').Nodes;
export type MdastParents = import('mdast').Parents;
export type NlcstParagraph = import('nlcst').Paragraph;
export type NlcstParents = import('nlcst').Parents;
export type NlcstRoot = import('nlcst').Root;
export type NlcstRootContent = import('nlcst').RootContent;
export type NlcstSentence = import('nlcst').Sentence;
export type NlcstSentenceContent = import('nlcst').SentenceContent;
export type NlcstWhiteSpace = import('nlcst').WhiteSpace;
export type Point = import('unist').Point;
export type VFile = import('vfile').VFile;
export type Location = import('vfile-location').Location;
/**

@@ -43,12 +38,12 @@ * nlcst parser.

export type ParserInstance = {
tokenizeSentencePlugins: ((node: NlcstSentence) => undefined | void)[]
tokenizeParagraphPlugins: ((node: NlcstParagraph) => undefined | void)[]
tokenizeRootPlugins: ((node: NlcstRoot) => undefined | void)[]
parse(value: string | null | undefined): NlcstRoot
tokenize(value: string | null | undefined): Array<NlcstSentenceContent>
}
tokenizeSentencePlugins: Array<(node: NlcstSentence) => undefined | void>;
tokenizeParagraphPlugins: Array<(node: NlcstParagraph) => undefined | void>;
tokenizeRootPlugins: Array<(node: NlcstRoot) => undefined | void>;
parse(value: string | null | undefined): NlcstRoot;
tokenize(value: string | null | undefined): Array<NlcstSentenceContent>;
};
/**
* Create a new parser.
*/
export type ParserConstructor = new () => ParserInstance
export type ParserConstructor = new () => ParserInstance;
/**

@@ -58,15 +53,15 @@ * Configuration.

export type Options = {
/**
* List of mdast node types to ignore (optional).
*
* The types `'table'`, `'tableRow'`, and `'tableCell'` are always ignored.
*/
ignore?: Array<string> | null | undefined
/**
* List of mdast node types to mark as `source` (optional).
*
* The type `'inlineCode'` is always marked as source.
*/
source?: Array<string> | null | undefined
}
/**
* List of mdast node types to ignore (optional).
*
* The types `'table'`, `'tableRow'`, and `'tableCell'` are always ignored.
*/
ignore?: Array<string> | null | undefined;
/**
* List of mdast node types to mark as `source` (optional).
*
* The type `'inlineCode'` is always marked as source.
*/
source?: Array<string> | null | undefined;
};
/**

@@ -76,22 +71,23 @@ * Info passed around.

export type State = {
/**
* Whole document.
*/
doc: string
/**
* List of mdast node types to ignore.
*/
ignore: Array<string>
/**
* Location info.
*/
place: Location
/**
* Parser.
*/
parser: ParserInstance
/**
* List of mdast node types to mark as source.
*/
source: Array<string>
}
/**
* Whole document.
*/
doc: string;
/**
* List of mdast node types to ignore.
*/
ignore: Array<string>;
/**
* Location info.
*/
place: Location;
/**
* Parser.
*/
parser: ParserInstance;
/**
* List of mdast node types to mark as source.
*/
source: Array<string>;
};
//# sourceMappingURL=index.d.ts.map
{
"name": "mdast-util-to-nlcst",
"version": "7.0.0",
"version": "7.0.1",
"description": "mdast utility to transform to nlcst",

@@ -33,2 +33,3 @@ "license": "MIT",

"lib/",
"index.d.ts.map",
"index.d.ts",

@@ -41,3 +42,3 @@ "index.js"

"@types/unist": "^3.0.0",
"nlcst-to-string": "^3.0.0",
"nlcst-to-string": "^4.0.0",
"unist-util-position": "^5.0.0",

@@ -49,19 +50,19 @@ "vfile": "^6.0.0",

"@types/node": "^20.0.0",
"c8": "^8.0.0",
"c8": "^9.0.0",
"is-hidden": "^2.0.0",
"mdast-util-from-markdown": "^1.0.0",
"mdast-util-frontmatter": "^1.0.0",
"mdast-util-gfm": "^2.0.0",
"micromark-extension-frontmatter": "^1.0.0",
"micromark-extension-gfm": "^2.0.0",
"parse-dutch": "^6.0.0",
"parse-english": "^6.0.0",
"parse-latin": "^6.0.0",
"prettier": "^2.0.0",
"remark-cli": "^11.0.0",
"remark-preset-wooorm": "^9.0.0",
"mdast-util-from-markdown": "^2.0.0",
"mdast-util-frontmatter": "^2.0.0",
"mdast-util-gfm": "^3.0.0",
"micromark-extension-frontmatter": "^2.0.0",
"micromark-extension-gfm": "^3.0.0",
"parse-dutch": "^7.0.0",
"parse-english": "^7.0.0",
"parse-latin": "^7.0.0",
"prettier": "^3.0.0",
"remark-cli": "^12.0.0",
"remark-preset-wooorm": "^10.0.0",
"to-vfile": "^8.0.0",
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
"xo": "^0.54.0"
"xo": "^0.58.0"
},

@@ -71,3 +72,3 @@ "scripts": {

"build": "tsc --build --clean && tsc --build && type-coverage",
"format": "remark . -qfo --ignore-pattern test/ && prettier . -w --loglevel warn && xo --fix",
"format": "remark . -qfo --ignore-pattern test/ && prettier . -w --log-level warn && xo --fix",
"test-api": "node --conditions development test/index.js",

@@ -88,2 +89,3 @@ "test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",

"rules": {
"unicorn/prefer-at": "off",
"unicorn/prefer-switch": "off"

@@ -90,0 +92,0 @@ },

@@ -15,17 +15,17 @@ # mdast-util-to-nlcst

* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`toNlcst(tree, file, Parser[, options])`](#tonlcsttree-file-parser-options)
* [`Options`](#options)
* [`ParserConstructor`](#parserconstructor)
* [`ParserInstance`](#parserinstance)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Related](#related)
* [Contribute](#contribute)
* [License](#license)
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`toNlcst(tree, file, Parser[, options])`](#tonlcsttree-file-parser-options)
* [`Options`](#options)
* [`ParserConstructor`](#parserconstructor)
* [`ParserInstance`](#parserinstance)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Related](#related)
* [Contribute](#contribute)
* [License](#license)

@@ -126,11 +126,11 @@ ## What is this?

* `tree` ([`MdastNode`][mdast-node])
β€” mdast tree to transform
* `file` ([`VFile`][vfile])
β€” virtual file
* `Parser` ([`ParserConstructor`][api-parser-constructor] or
[`ParserInstance`][api-parser-instance])
β€” parser to use
* `options` ([`Options`][api-options], optional)
β€” configuration
* `tree` ([`MdastNode`][mdast-node])
β€” mdast tree to transform
* `file` ([`VFile`][vfile])
β€” virtual file
* `Parser` ([`ParserConstructor`][api-parser-constructor] or
[`ParserInstance`][api-parser-instance])
β€” parser to use
* `options` ([`Options`][api-options], optional)
β€” configuration

@@ -270,12 +270,12 @@ ###### Returns

* [`mdast-util-to-hast`](https://github.com/syntax-tree/mdast-util-to-hast)
β€” transform mdast to hast
* [`hast-util-to-nlcst`](https://github.com/syntax-tree/hast-util-to-nlcst)
β€” transform hast to nlcst
* [`hast-util-to-mdast`](https://github.com/syntax-tree/hast-util-to-mdast)
β€” transform hast to mdast
* [`hast-util-to-xast`](https://github.com/syntax-tree/hast-util-to-xast)
β€” transform hast to xast
* [`hast-util-sanitize`](https://github.com/syntax-tree/hast-util-sanitize)
β€” sanitize hast nodes
* [`mdast-util-to-hast`](https://github.com/syntax-tree/mdast-util-to-hast)
β€” transform mdast to hast
* [`hast-util-to-nlcst`](https://github.com/syntax-tree/hast-util-to-nlcst)
β€” transform hast to nlcst
* [`hast-util-to-mdast`](https://github.com/syntax-tree/hast-util-to-mdast)
β€” transform hast to mdast
* [`hast-util-to-xast`](https://github.com/syntax-tree/hast-util-to-xast)
β€” transform hast to xast
* [`hast-util-sanitize`](https://github.com/syntax-tree/hast-util-sanitize)
β€” sanitize hast nodes

@@ -282,0 +282,0 @@ ## Contribute

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc