Gathering detailed insights and metrics for unist-util-generated
Gathering detailed insights and metrics for unist-util-generated
Gathering detailed insights and metrics for unist-util-generated
Gathering detailed insights and metrics for unist-util-generated
utility to check if a node is generated
npm install unist-util-generated
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
4 Stars
90 Commits
1 Forks
9 Watching
1 Branches
11 Contributors
Updated on 22 Jan 2023
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-2.2%
791,850
Compared to previous day
Last week
3.5%
4,161,815
Compared to previous week
Last month
12.3%
17,495,055
Compared to previous month
Last year
-22.4%
222,907,685
Compared to previous year
unist utility to check if a node is generated.
This utility can be used to check if a node is said to be generated.
You can use this utility to check is generated. Generated nodes were not in the source of the original file, and thus not authored by a human. This info can then be used to not emit lint messages for generated content.
You might also find the utility unist-util-position
useful to get clean positional info.
To display positional info to users, use
unist-util-stringify-position
.
This package is ESM only. In Node.js (version 16+), install with npm:
1npm install unist-util-generated
In Deno with esm.sh
:
1import {generated} from 'https://esm.sh/unist-util-generated@3'
In browsers with esm.sh
:
1<script type="module"> 2 import {generated} from 'https://esm.sh/unist-util-generated@3?bundle' 3</script>
1import {generated} from 'unist-util-generated' 2 3generated({}) // => true 4 5generated({position: {start: {}, end: {}}}) // => true 6 7generated({ 8 position: {start: {line: 1, column: 1}, end: {line: 1, column: 2}} 9}) // => false
This package exports the identifier generated
.
There is no default export.
generated(node)
Check if node
is generated.
node
(Node
)
— node to checkWhether node
is generated (does not have positional info) (boolean
).
This package is fully typed with TypeScript. It exports no additional types.
Projects maintained by the unified collective are compatible with maintained versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line, unist-util-generated@^2
,
compatible with Node.js 16.
unist-util-position
— get the position of nodesunist-util-source
— get the source of a node or positionunist-util-remove-position
— remove position
sunist-util-stringify-position
— serialize positional infoSee contributing.md
in syntax-tree/.github
for
ways to get started.
See support.md
for ways to get help.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/30 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
Project has not signed or included provenance with any releases.
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More