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.1 to 1.1.2

14

index.js

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

'use strict';
'use strict'
/* Expose. */
module.exports = generated;
module.exports = generated
/* Detect if a node was available in the original document. */
function generated(node) {
var position = optional(optional(node).position);
var start = optional(position.start);
var end = optional(position.end);
var position = optional(optional(node).position)
var start = optional(position.start)
var end = optional(position.end)
return !start.line || !start.column || !end.line || !end.column;
return !start.line || !start.column || !end.line || !end.column
}

@@ -18,3 +18,3 @@

function optional(value) {
return value && typeof value === 'object' ? value : {};
return value && typeof value === 'object' ? value : {}
}
{
"name": "unist-util-generated",
"version": "1.1.1",
"version": "1.1.2",
"description": "Check if a Unist node is generated",

@@ -14,3 +14,3 @@ "license": "MIT",

],
"repository": "https://github.com/syntax-tree/unist-util-generated",
"repository": "syntax-tree/unist-util-generated",
"bugs": "https://github.com/syntax-tree/unist-util-generated/issues",

@@ -25,19 +25,19 @@ "author": "Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)",

"devDependencies": {
"browserify": "^14.1.0",
"browserify": "^16.0.0",
"esmangle": "^1.0.0",
"nyc": "^11.0.0",
"remark-cli": "^3.0.0",
"remark-preset-wooorm": "^3.0.0",
"prettier": "^1.12.1",
"remark-cli": "^5.0.0",
"remark-preset-wooorm": "^4.0.0",
"tape": "^4.5.1",
"xo": "^0.18.2"
"xo": "^0.20.0"
},
"scripts": {
"build-md": "remark . --quiet --frail --output",
"format": "remark . -qfo && prettier --write '**/*.js' && xo --fix",
"build-bundle": "browserify index.js --no-builtins -s unistUtilGenerated > unist-util-generated.js",
"build-mangle": "esmangle unist-util-generated.js > unist-util-generated.min.js",
"build": "npm run build-md && npm run build-bundle && npm run build-mangle",
"lint": "xo",
"build": "npm run build-bundle && npm run build-mangle",
"test-api": "node test",
"test-coverage": "nyc --reporter lcov tape test.js",
"test": "npm run build && npm run lint && npm run test-coverage"
"test": "npm run format && npm run build && npm run test-coverage"
},

@@ -50,5 +50,18 @@ "nyc": {

},
"prettier": {
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"bracketSpacing": false,
"semi": false,
"trailingComma": "none"
},
"xo": {
"space": true,
"prettier": true,
"esnext": false,
"rules": {
"guard-for-in": "off",
"no-var": "off",
"prefer-arrow-callback": "off"
},
"ignores": [

@@ -55,0 +68,0 @@ "unist-util-generated.js"

@@ -16,9 +16,9 @@ # unist-util-generated [![Build Status][build-badge]][build-page] [![Coverage Status][coverage-badge]][coverage-page]

```javascript
var generated = require('unist-util-generated');
var generated = require('unist-util-generated')
generated({}); //=> true
generated({}) // => true
generated({
position: {start: {}, end: {}}
}); //=> true
}) // => true

@@ -30,3 +30,3 @@ generated({

}
}); //=> false
}) // => false
```

@@ -55,4 +55,12 @@

* [`unist-util-stringify-position`](https://github.com/syntax-tree/unist-util-stringify-position)
— Stringify a node, location, or position
— Stringify a node, position, or point
## Contribute
See [`contributing.md` in `syntax-tree/unist`][contributing] for ways to get
started.
This organisation has a [Code of Conduct][coc]. By interacting with this
repository, organisation, or community you agree to abide by its terms.
## License

@@ -83,1 +91,5 @@

[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
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