Socket
Socket
Sign inDemoInstall

hast-util-whitespace

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 1.0.3

5

index.js

@@ -5,7 +5,6 @@ 'use strict'

/* HTML white-space expression.
* See <https://html.spec.whatwg.org/#space-character>. */
// HTML white-space expression.
// See <https://html.spec.whatwg.org/#space-character>.
var re = /[ \t\n\f\r]/g
/* Check if `node` is a inter-element white-space. */
function interElementWhiteSpace(node) {

@@ -12,0 +11,0 @@ var value

18

package.json
{
"name": "hast-util-whitespace",
"version": "1.0.2",
"version": "1.0.3",
"description": "Check whether a node is inter-element whitespace",

@@ -27,12 +27,12 @@ "license": "MIT",

"browserify": "^16.0.0",
"nyc": "^13.0.0",
"prettier": "^1.13.5",
"nyc": "^14.0.0",
"prettier": "^1.0.0",
"remark-cli": "^6.0.0",
"remark-preset-wooorm": "^4.0.0",
"tape": "^4.4.0",
"tinyify": "^2.4.3",
"xo": "^0.23.0"
"remark-preset-wooorm": "^5.0.0",
"tape": "^4.0.0",
"tinyify": "^2.0.0",
"xo": "^0.24.0"
},
"scripts": {
"format": "remark . -qfo && prettier --write '**/*.js' && xo --fix",
"format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",
"build-bundle": "browserify . -s hastUtilWhitespace > hast-util-whitespace.js",

@@ -57,3 +57,3 @@ "build-mangle": "browserify . -s hastUtilWhitespace -p tinyify > hast-util-whitespace.min.js",

"ignores": [
"hast-util-is-element.js"
"hast-util-whitespace.js"
]

@@ -60,0 +60,0 @@ },

@@ -1,11 +0,19 @@

# hast-util-whitespace [![Build][build-badge]][build] [![Coverage][coverage-badge]][coverage] [![Downloads][downloads-badge]][downloads] [![Chat][chat-badge]][chat]
# hast-util-whitespace
Check whether a [HAST node][hast] is [**inter-element
whitespace**][spec].
[![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
[**hast**][hast] utility to check if a `node` is [*inter-element
whitespace*][spec].
## Install
[npm][]:
```bash
```sh
npm install hast-util-whitespace

@@ -16,3 +24,3 @@ ```

```javascript
```js
var whitespace = require('hast-util-whitespace')

@@ -41,20 +49,25 @@

Check if the given value is [*inter-element whitespace*][spec].
###### Parameters
* `node` ([`Node`][node], optional) — Node whose `value` to check.
* `value` (`string`, optional) — Value to check.
* `node` ([`Node`][node], optional) — Node to check
* `value` (`string`, optional) — Value to check
###### Returns
`boolean` — Whether the `value` (of [`node`][text]) is inter-element
white-space: consisting of zero or more of space, tab (`\t`),
line feed (`\n`), carriage return (`\r`), or form feed (`\f`).
`boolean` — Whether the `value` is inter-element white-space: consisting of zero
or more of space, tab (`\t`), line feed (`\n`), carriage return (`\r`), or form
feed (`\f`).
If `node` is passed it must be a [*text*][text] node.
## Contribute
See [`contributing.md` in `syntax-tree/hast`][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.

@@ -79,5 +92,15 @@ ## License

[size-badge]: https://img.shields.io/bundlephobia/minzip/hast-util-whitespace.svg
[size]: https://bundlephobia.com/result?p=hast-util-whitespace
[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/rehype
[chat]: https://spectrum.chat/unified/syntax-tree

@@ -90,2 +113,8 @@ [npm]: https://docs.npmjs.com/cli/install

[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
[hast]: https://github.com/syntax-tree/hast

@@ -95,8 +124,4 @@

[node]: https://github.com/syntax-tree/unist#node
[node]: https://github.com/syntax-tree/hast#nodes
[text]: https://github.com/syntax-tree/unist#text
[contributing]: https://github.com/syntax-tree/hast/blob/master/contributing.md
[coc]: https://github.com/syntax-tree/hast/blob/master/code-of-conduct.md
[text]: https://github.com/syntax-tree/hast#text
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc