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

mdast-util-phrasing

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdast-util-phrasing - npm Package Compare versions

Comparing version 3.0.1 to 4.0.0

14

lib/index.d.ts

@@ -1,12 +0,4 @@

/**
* Check if the given value is *phrasing content*.
*
* @param
* Thing to check, typically `Node`.
* @returns
* Whether `node` is phrasing content.
*/
export const phrasing: AssertPredicatePhrasing
export function phrasing(
node?: unknown
): node is import('mdast').PhrasingContent
export type PhrasingContent = import('mdast').PhrasingContent
export type AssertPredicatePhrasing =
import('unist-util-is').AssertPredicate<PhrasingContent>
/**
* @typedef {import('mdast').PhrasingContent} PhrasingContent
* @typedef {import('unist-util-is').AssertPredicate<PhrasingContent>} AssertPredicatePhrasing
*/

@@ -11,3 +10,5 @@

*
* @param
* > 👉 **Note**: Excludes `html`, which can be both phrasing or flow.
*
* @param node
* Thing to check, typically `Node`.

@@ -17,17 +18,20 @@ * @returns

*/
export const phrasing = /** @type {AssertPredicatePhrasing} */ (
convert([
'break',
'delete',
'emphasis',
'footnote',
'footnoteReference',
'image',
'imageReference',
'inlineCode',
'link',
'linkReference',
'strong',
'text'
])
)
export const phrasing =
/** @type {(node?: unknown) => node is PhrasingContent} */
(
convert([
'break',
'delete',
'emphasis',
'footnote',
'footnoteReference',
'image',
'imageReference',
'inlineCode',
'link',
'linkReference',
'strong',
'text'
])
)
{
"name": "mdast-util-phrasing",
"version": "3.0.1",
"version": "4.0.0",
"description": "mdast utility to check if a node is phrasing content",

@@ -28,4 +28,3 @@ "license": "MIT",

"type": "module",
"main": "index.js",
"types": "index.d.ts",
"exports": "./index.js",
"files": [

@@ -37,8 +36,8 @@ "lib/",

"dependencies": {
"@types/mdast": "^3.0.0",
"unist-util-is": "^5.0.0"
"@types/mdast": "^4.0.0",
"unist-util-is": "^6.0.0"
},
"devDependencies": {
"@types/node": "^18.0.0",
"c8": "^7.0.0",
"@types/node": "^20.0.0",
"c8": "^8.0.0",
"prettier": "^2.0.0",

@@ -48,4 +47,4 @@ "remark-cli": "^11.0.0",

"type-coverage": "^2.0.0",
"typescript": "^4.0.0",
"xo": "^0.53.0"
"typescript": "^5.0.0",
"xo": "^0.54.0"
},

@@ -57,19 +56,16 @@ "scripts": {

"test-api": "node --conditions development test.js",
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
"test-coverage": "c8 --100 --reporter lcov npm run test-api",
"test": "npm run build && npm run format && npm run test-coverage"
},
"prettier": {
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"bracketSpacing": false,
"semi": false,
"trailingComma": "none"
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"useTabs": false
},
"xo": {
"prettier": true
},
"remarkConfig": {
"plugins": [
"preset-wooorm"
"remark-preset-wooorm"
]

@@ -80,4 +76,8 @@ },

"detail": true,
"ignoreCatch": true,
"strict": true
},
"xo": {
"prettier": true
}
}

@@ -44,3 +44,3 @@ # mdast-util-phrasing

This package is [ESM only][esm].
In Node.js (version 14.14+ and 16.0+), install with [npm][]:
In Node.js (version 16+), install with [npm][]:

@@ -54,3 +54,3 @@ ```sh

```js
import {phrasing} from 'https://esm.sh/mdast-util-phrasing@3'
import {phrasing} from 'https://esm.sh/mdast-util-phrasing@4'
```

@@ -62,3 +62,3 @@

<script type="module">
import {phrasing} from 'https://esm.sh/mdast-util-phrasing@3?bundle'
import {phrasing} from 'https://esm.sh/mdast-util-phrasing@4?bundle'
</script>

@@ -88,2 +88,4 @@ ```

> 👉 **Note**: Excludes `html`, which can be both phrasing or flow.
###### Parameters

@@ -105,7 +107,10 @@

Projects maintained by the unified collective are compatible with all maintained
Projects maintained by the unified collective are compatible with maintained
versions of Node.js.
As of now, that is Node.js 14.14+ and 16.0+.
Our projects sometimes work with older versions, but this is not guaranteed.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line, `mdast-util-phrasing@^4`,
compatible with Node.js 16.
## Security

@@ -152,5 +157,5 @@

[size-badge]: https://img.shields.io/bundlephobia/minzip/mdast-util-phrasing.svg
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=mdast-util-phrasing
[size]: https://bundlephobia.com/result?p=mdast-util-phrasing
[size]: https://bundlejs.com/?q=mdast-util-phrasing

@@ -157,0 +162,0 @@ [sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg

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