unist-util-generated
Advanced tools
Comparing version 1.1.6 to 2.0.0
24
index.js
@@ -1,6 +0,22 @@ | ||
'use strict' | ||
/** | ||
* @typedef {Object} PointLike | ||
* @property {number} [line] | ||
* @property {number} [column] | ||
* @property {number} [offset] | ||
* | ||
* @typedef {Object} PositionLike | ||
* @property {PointLike} [start] | ||
* @property {PointLike} [end] | ||
* | ||
* @typedef {Object} NodeLike | ||
* @property {PositionLike} [position] | ||
*/ | ||
module.exports = generated | ||
function generated(node) { | ||
/** | ||
* Check if `node` is *generated*. | ||
* | ||
* @param {NodeLike} [node] | ||
* @returns {boolean} | ||
*/ | ||
export function generated(node) { | ||
return ( | ||
@@ -7,0 +23,0 @@ !node || |
{ | ||
"name": "unist-util-generated", | ||
"version": "1.1.6", | ||
"version": "2.0.0", | ||
"description": "unist utility to check if a node is generated", | ||
@@ -25,30 +25,30 @@ "license": "MIT", | ||
], | ||
"sideEffects": false, | ||
"type": "module", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"files": [ | ||
"index.d.ts", | ||
"index.js" | ||
], | ||
"devDependencies": { | ||
"browserify": "^17.0.0", | ||
"nyc": "^15.0.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", | ||
"tinyify": "^3.0.0", | ||
"xo": "^0.34.0" | ||
"type-coverage": "^2.0.0", | ||
"typescript": "^4.0.0", | ||
"xo": "^0.38.0" | ||
}, | ||
"scripts": { | ||
"prepack": "npm run build && npm run format", | ||
"build": "rimraf \"*.d.ts\" && tsc && type-coverage", | ||
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix", | ||
"build-bundle": "browserify . -s unistUtilGenerated -o unist-util-generated.js", | ||
"build-mangle": "browserify . -s unistUtilGenerated -o unist-util-generated.min.js -p tinyify", | ||
"build": "npm run build-bundle && npm run build-mangle", | ||
"test-api": "node test", | ||
"test-coverage": "nyc --reporter lcov tape test.js", | ||
"test": "npm run format && npm run build && npm run test-coverage" | ||
"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": { | ||
@@ -64,6 +64,6 @@ "tabWidth": 2, | ||
"prettier": true, | ||
"esnext": false, | ||
"ignores": [ | ||
"unist-util-generated.js" | ||
] | ||
"rules": { | ||
"no-var": "off", | ||
"prefer-arrow-callback": "off" | ||
} | ||
}, | ||
@@ -74,3 +74,8 @@ "remarkConfig": { | ||
] | ||
}, | ||
"typeCoverage": { | ||
"atLeast": 100, | ||
"detail": true, | ||
"strict": true | ||
} | ||
} |
@@ -15,2 +15,5 @@ # unist-util-generated | ||
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 generated = require('unist-util-generated') | ||
import {generated} from 'unist-util-generated' | ||
@@ -39,2 +42,5 @@ generated({}) // => true | ||
This package exports the following identifiers: `generated`. | ||
There is no default export. | ||
### `generated(node)` | ||
@@ -79,5 +85,5 @@ | ||
[build-badge]: https://img.shields.io/travis/syntax-tree/unist-util-generated.svg | ||
[build-badge]: https://github.com/syntax-tree/unist-util-generated/workflows/main/badge.svg | ||
[build]: https://travis-ci.org/syntax-tree/unist-util-generated | ||
[build]: https://github.com/syntax-tree/unist-util-generated/actions | ||
@@ -84,0 +90,0 @@ [coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/unist-util-generated.svg |
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
7856
5
63
125
Yes
10