Socket
Socket
Sign inDemoInstall

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 2.0.0 to 3.0.0

index.d.ts

16

index.js

@@ -1,6 +0,13 @@

'use strict'
/**
* @typedef {import('mdast').PhrasingContent} PhrasingContent
* @typedef {import('unist-util-is').AssertPredicate<PhrasingContent>} AssertPredicatePhrasing
*/
var convert = require('unist-util-is/convert')
import {convert} from 'unist-util-is'
var isPhrasing = convert([
/**
* @type {AssertPredicatePhrasing}
*/
// @ts-ignore hush, it’s fine!
export const phrasing = convert([
'break',

@@ -19,4 +26,1 @@ 'delete',

])
isPhrasing.displayName = 'isPhrasing'
module.exports = isPhrasing
{
"name": "mdast-util-phrasing",
"version": "2.0.0",
"version": "3.0.0",
"description": "mdast utility to check if a node is phrasing content",

@@ -26,28 +26,34 @@ "license": "MIT",

],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"files": [
"index.d.ts",
"index.js"
],
"dependencies": {
"unist-util-is": "^4.0.0"
"@types/mdast": "^3.0.0",
"unist-util-is": "^5.0.0"
},
"devDependencies": {
"nyc": "^15.0.0",
"prettier": "^1.0.0",
"remark-cli": "^7.0.0",
"remark-preset-wooorm": "^6.0.0",
"tape": "^4.0.0",
"xo": "^0.26.0"
"@types/tape": "^4.0.0",
"c8": "^7.0.0",
"prettier": "^2.0.0",
"remark-cli": "^9.0.0",
"remark-preset-wooorm": "^8.0.0",
"rimraf": "^3.0.0",
"tape": "^5.0.0",
"type-coverage": "^2.0.0",
"typescript": "^4.0.0",
"xo": "^0.38.0"
},
"scripts": {
"format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",
"test-api": "node test",
"test-coverage": "nyc --reporter lcov tape test.js",
"test": "npm run format && npm run test-coverage"
"prepack": "npm run build && npm run format",
"build": "rimraf \"*.d.ts\" && tsc && type-coverage",
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
"test-api": "node test.js",
"test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node test.js",
"test": "npm run build && npm run format && npm run test-coverage"
},
"nyc": {
"check-coverage": true,
"lines": 100,
"functions": 100,
"branches": 100
},
"prettier": {

@@ -63,5 +69,5 @@ "tabWidth": 2,

"prettier": true,
"esnext": false,
"rules": {
"no-multi-assign": "off"
"no-var": "off",
"prefer-arrow-callback": "off"
}

@@ -73,3 +79,8 @@ },

]
},
"typeCoverage": {
"atLeast": 100,
"detail": true,
"strict": true
}
}

@@ -15,2 +15,5 @@ # mdast-util-phrasing

This package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c):
Node 12+ is needed to use it and it must be `import`ed instead of `require`d.
[npm][]:

@@ -25,3 +28,3 @@

```js
var phrasing = require('mdast-util-phrasing')
import {phrasing} from 'mdast-util-phrasing'

@@ -41,2 +44,5 @@ phrasing({

This package exports the following identifiers: `phrasing`.
There is no default export.
### `phrasing(node)`

@@ -60,2 +66,9 @@

## Related
* [`hast-util-phrasing`](https://github.com/syntax-tree/hast-util-phrasing)
— check if a hast node is phrasing content
* [`unist-util-is`](https://github.com/syntax-tree/unist-util-is)
— check if a node passes a test
## Contribute

@@ -77,5 +90,5 @@

[build-badge]: https://img.shields.io/travis/syntax-tree/mdast-util-phrasing.svg
[build-badge]: https://github.com/syntax-tree/mdast-util-phrasing/workflows/main/badge.svg
[build]: https://travis-ci.org/syntax-tree/mdast-util-phrasing
[build]: https://github.com/syntax-tree/mdast-util-phrasing/actions

@@ -100,5 +113,5 @@ [coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/mdast-util-phrasing.svg

[chat-badge]: https://img.shields.io/badge/chat-spectrum-7b16ff.svg
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://spectrum.chat/unified/syntax-tree
[chat]: https://github.com/syntax-tree/unist/discussions

@@ -111,7 +124,7 @@ [npm]: https://docs.npmjs.com/cli/install

[contributing]: https://github.com/syntax-tree/.github/blob/master/contributing.md
[contributing]: https://github.com/syntax-tree/.github/blob/HEAD/contributing.md
[support]: https://github.com/syntax-tree/.github/blob/master/support.md
[support]: https://github.com/syntax-tree/.github/blob/HEAD/support.md
[coc]: https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
[coc]: https://github.com/syntax-tree/.github/blob/HEAD/code-of-conduct.md

@@ -118,0 +131,0 @@ [mdast]: https://github.com/syntax-tree/mdast

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