mdast-util-phrasing
Advanced tools
Comparing version 1.0.1 to 1.0.2
16
index.js
@@ -8,19 +8,19 @@ 'use strict' | ||
var phrasing = [ | ||
'inlineCode', | ||
'emphasis', | ||
'break', | ||
'strong', | ||
'delete', | ||
'emphasis', | ||
'footnote', | ||
'footnoteReference', | ||
'image', | ||
'imageReference', | ||
'inlineCode', | ||
'link', | ||
'image', | ||
'footnote', | ||
'linkReference', | ||
'imageReference', | ||
'footnoteReference', | ||
'strong', | ||
'text' | ||
] | ||
/* Check if a node is a phrasing element */ | ||
// Check if a node is a phrasing element. | ||
function isPhrasing(node) { | ||
return is(phrasing, node) | ||
} |
{ | ||
"name": "mdast-util-phrasing", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Check if a node is a phrasing element", | ||
@@ -8,2 +8,5 @@ "license": "MIT", | ||
"mdast", | ||
"unist", | ||
"util", | ||
"utility", | ||
"remark", | ||
@@ -27,11 +30,11 @@ "markdown", | ||
"devDependencies": { | ||
"nyc": "^13.0.0", | ||
"prettier": "^1.14.3", | ||
"nyc": "^14.0.0", | ||
"prettier": "^1.0.0", | ||
"remark-cli": "^6.0.0", | ||
"remark-preset-wooorm": "^4.0.0", | ||
"tape": "^4.4.0", | ||
"xo": "^0.23.0" | ||
"remark-preset-wooorm": "^5.0.0", | ||
"tape": "^4.0.0", | ||
"xo": "^0.24.0" | ||
}, | ||
"scripts": { | ||
"format": "remark . -qfo && prettier --write '**/*.js' && xo --fix", | ||
"format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix", | ||
"test-api": "node test", | ||
@@ -38,0 +41,0 @@ "test-coverage": "nyc --reporter lcov tape test.js", |
@@ -1,10 +0,18 @@ | ||
# mdast-util-phrasing [![Build Status][build-badge]][build-page] [![Coverage Status][coverage-badge]][coverage-page] | ||
# mdast-util-phrasing | ||
Check if a [MDAST][] (markdown) [node][] is a phrasing element. | ||
[![Build][build-badge]][build] | ||
[![Coverage][coverage-badge]][coverage] | ||
[![Downloads][downloads-badge]][downloads] | ||
[![Size][size-badge]][size] | ||
[![Sponsors][sponsors-badge]][collective] | ||
[![Backers][backers-badge]][collective] | ||
[![Chat][chat-badge]][chat] | ||
## Installation | ||
Check if a [mdast][] [node][] is [phrasing content][phrasing]. | ||
## Install | ||
[npm][]: | ||
```bash | ||
```sh | ||
npm install mdast-util-phrasing | ||
@@ -15,3 +23,3 @@ ``` | ||
```javascript | ||
```js | ||
var phrasing = require('mdast-util-phrasing') | ||
@@ -38,19 +46,21 @@ | ||
`node` (`*`) — Value to check. | ||
`node` (`*`) — Value to check, typically a [node][]. | ||
###### Returns | ||
`boolean` — whether `node` passes the test. | ||
`boolean` — whether `node` is [phrasing content][phrasing]. | ||
## Contribute | ||
See [`contributing.md` in `syntax-tree/mdast`][contributing] for ways to get | ||
See [`contributing.md` in `syntax-tree/.github`][contributing] for ways to get | ||
started. | ||
See [`support.md`][support] for ways to get help. | ||
This organisation has a [Code of Conduct][coc]. By interacting with this | ||
repository, organisation, or community you agree to abide by its terms. | ||
This project has a [Code of Conduct][coc]. | ||
By interacting with this repository, organisation, or community you agree to | ||
abide by its terms. | ||
## License | ||
[MIT][license] | ||
[MIT][license] © [Victor Felder][author] | ||
@@ -61,8 +71,26 @@ <!-- Definitions --> | ||
[build-page]: https://travis-ci.org/syntax-tree/mdast-util-phrasing | ||
[build]: https://travis-ci.org/syntax-tree/mdast-util-phrasing | ||
[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/mdast-util-phrasing.svg | ||
[coverage-page]: https://codecov.io/github/syntax-tree/mdast-util-phrasing?branch=master | ||
[coverage]: https://codecov.io/github/syntax-tree/mdast-util-phrasing | ||
[downloads-badge]: https://img.shields.io/npm/dm/mdast-util-phrasing.svg | ||
[downloads]: https://www.npmjs.com/package/mdast-util-phrasing | ||
[size-badge]: https://img.shields.io/bundlephobia/minzip/mdast-util-phrasing.svg | ||
[size]: https://bundlephobia.com/result?p=mdast-util-phrasing | ||
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg | ||
[backers-badge]: https://opencollective.com/unified/backers/badge.svg | ||
[collective]: https://opencollective.com/unified | ||
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg | ||
[chat]: https://spectrum.chat/unified/syntax-tree | ||
[npm]: https://docs.npmjs.com/cli/install | ||
@@ -72,8 +100,14 @@ | ||
[node]: https://github.com/syntax-tree/mdast#ast | ||
[author]: https://draft.li | ||
[contributing]: https://github.com/syntax-tree/.github/blob/master/contributing.md | ||
[support]: https://github.com/syntax-tree/.github/blob/master/support.md | ||
[coc]: https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md | ||
[mdast]: https://github.com/syntax-tree/mdast | ||
[contributing]: https://github.com/syntax-tree/mdast/blob/master/contributing.md | ||
[node]: https://github.com/syntax-tree/mdast#nodes | ||
[coc]: https://github.com/syntax-tree/mdast/blob/master/code-of-conduct.md | ||
[phrasing]: https://github.com/syntax-tree/mdast#phrasingcontent |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
5745
110
0