Socket
Socket
Sign inDemoInstall

unist-util-generated

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unist-util-generated - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

4

index.js
'use strict'
/* Expose. */
module.exports = generated
/* Detect if a node was available in the original document. */
function generated(node) {

@@ -15,6 +13,4 @@ var position = optional(optional(node).position)

/* Return `value` if it’s an object, an empty object
* otherwise. */
function optional(value) {
return value && typeof value === 'object' ? value : {}
}

21

package.json
{
"name": "unist-util-generated",
"version": "1.1.3",
"version": "1.1.4",
"description": "Check if a Unist node is generated",

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

"browserify": "^16.0.0",
"nyc": "^13.0.0",
"prettier": "^1.12.1",
"nyc": "^14.0.0",
"prettier": "^1.0.0",
"remark-cli": "^6.0.0",
"remark-preset-wooorm": "^4.0.0",
"tape": "^4.5.1",
"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 unistUtilGenerated > unist-util-generated.js",

@@ -60,7 +60,2 @@ "build-mangle": "browserify . -s unistUtilGenerated -p tinyify > unist-util-generated.min.js",

"esnext": false,
"rules": {
"guard-for-in": "off",
"no-var": "off",
"prefer-arrow-callback": "off"
},
"ignores": [

@@ -67,0 +62,0 @@ "unist-util-generated.js"

@@ -1,10 +0,18 @@

# unist-util-generated [![Build Status][build-badge]][build-page] [![Coverage Status][coverage-badge]][coverage-page]
# unist-util-generated
Check if a [**Unist**][unist] [node][] is [**generated**][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
[**unist**][unist] utility to check if a [node][] is [*generated*][generated].
## Install
[npm][]:
```bash
```sh
npm install unist-util-generated

@@ -15,3 +23,3 @@ ```

```javascript
```js
var generated = require('unist-util-generated')

@@ -21,11 +29,6 @@

generated({
position: {start: {}, end: {}}
}) // => true
generated({position: {start: {}, end: {}}}) // => true
generated({
position: {
start: {line: 1, column: 1},
end: {line: 1, column: 2}
}
position: {start: {line: 1, column: 1}, end: {line: 1, column: 2}}
}) // => false

@@ -38,3 +41,3 @@ ```

Detect if [`node`][node] is [**generated**][spec].
Check if [`node`][node] is [*generated*][generated].

@@ -60,7 +63,9 @@ ###### Parameters

See [`contributing.md` in `syntax-tree/unist`][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.

@@ -75,8 +80,26 @@ ## License

[build-page]: https://travis-ci.org/syntax-tree/unist-util-generated
[build]: https://travis-ci.org/syntax-tree/unist-util-generated
[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/unist-util-generated.svg
[coverage-page]: https://codecov.io/github/syntax-tree/unist-util-generated?branch=master
[coverage]: https://codecov.io/github/syntax-tree/unist-util-generated
[downloads-badge]: https://img.shields.io/npm/dm/unist-util-generated.svg
[downloads]: https://www.npmjs.com/package/unist-util-generated
[size-badge]: https://img.shields.io/bundlephobia/minzip/unist-util-generated.svg
[size]: https://bundlephobia.com/result?p=unist-util-generated
[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

@@ -88,2 +111,8 @@

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

@@ -93,6 +122,2 @@

[spec]: https://github.com/syntax-tree/unist#location
[contributing]: https://github.com/syntax-tree/unist/blob/master/contributing.md
[coc]: https://github.com/syntax-tree/unist/blob/master/code-of-conduct.md
[generated]: https://github.com/syntax-tree/unist#generated
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