Gathering detailed insights and metrics for remark-license
Gathering detailed insights and metrics for remark-license
Gathering detailed insights and metrics for remark-license
Gathering detailed insights and metrics for remark-license
@fox-land/remark-license
[**remark**][remark] plugin to add a [license][section] section to your readme.
@elboman/remark-jsx
[](https://www.npmjs.com/package/@elboman/remark-jsx) [](license)
remark-embed-images-sync
## License - CC0
@gera2ld/gatsby-remark-emoji
  
npm install remark-license
Typescript
Module System
Node Version
NPM Version
79.9
Supply Chain
99.5
Quality
79.2
Maintenance
100
Vulnerability
98.9
License
JavaScript (100%)
Total Downloads
163,491
Last Day
581
Last Week
5,386
Last Month
14,111
Last Year
43,245
MIT License
19 Stars
121 Commits
8 Forks
9 Watchers
1 Branches
17 Contributors
Updated on Dec 25, 2023
Minified
Minified + Gzipped
Latest Version
6.1.0
Package Id
remark-license@6.1.0
Unpacked Size
20.09 kB
Size
6.83 kB
File Count
15
NPM Version
8.1.0
Node Version
17.0.1
Published on
Nov 29, 2021
Cumulative downloads
Total Downloads
Last Day
175.4%
581
Compared to previous day
Last Week
31.8%
5,386
Compared to previous week
Last Month
98.3%
14,111
Compared to previous month
Last Year
64.4%
43,245
Compared to previous year
remark plugin to generate a license section.
This package is a unified (remark) plugin to generate a license section such as the one below.
unified is a project that transforms content with abstract syntax trees (ASTs). remark adds support for markdown to unified. mdast is the markdown AST that remark uses. This is a remark plugin that transforms mdast.
This project is useful when you’re writing documentation for an open source
project, typically a Node.js package, that has one or more readmes and maybe
some other markdown files as well.
You want to show the author and license associated with the project.
When this plugin is used, authors can add a certain heading (say, ## License
)
to documents and this plugin will populate them.
This package is ESM only. In Node.js (version 12.20+, 14.14+, or 16.0+), install with npm:
1npm install remark-license
In Deno with Skypack:
1import remarkLicense from 'https://cdn.skypack.dev/remark-license@6?dts'
In browsers with Skypack:
1<script type="module"> 2 import remarkLicense from 'https://cdn.skypack.dev/remark-license@6?min' 3</script>
Say we have the following file example.md
in this project:
1# Example 2 3Some text. 4 5## Use 6 7## API 8 9## License
And our module example.js
looks as follows:
1import {read} from 'to-vfile' 2import {remark} from 'remark' 3import remarkLicense from 'remark-license' 4 5main() 6 7async function main() { 8 const file = await remark() 9 .use(remarkLicense) 10 .process(await read('example.md')) 11 12 console.log(String(file)) 13}
Now running node example.js
yields:
1# Example 2 3Some text. 4 5## Use 6 7## API 8 9## License 10 11[MIT](license) © [Titus Wormer](https://wooorm.com)
???? Note: This info is inferred from this project’s
package.json
andlicense
file. Running this example in a different package will yield different results.
This package exports no identifiers.
The default export is remarkLicense
.
unified().use(remarkLicense[, options])
Generate a license section. In short, this plugin:
/^licen[cs]e$/i
or options.heading
.options
Configuration (optional in Node.js, required in browsers).
options.name
License holder (string
).
In Node.js, defaults to the author
field in the closest package.json
.
Throws when neither given nor detected.
options.license
SPDX identifier (string
).
In Node.js, defaults to the license
field in the closest package.json
.
Throws when neither given nor detected.
options.file
File name of license file (string
, optional).
In Node.js, defaults to a file in the directory of the closest package.json
that matches /^licen[cs]e(?=$|\.)/i
.
If there is no given or found license file, but options.license
is a known
SPDX identifier, then the URL to the license on spdx.org
is used.
options.url
URL to license holder (string
, optional).
In Node.js, defaults to the author
field in the closest package.json
.
http://
is prepended if url
does not start with an HTTP or HTTPS protocol.
options.ignoreFinalDefinitions
Ignore definitions that would otherwise trail in the section (boolean
,
default: true
).
options.heading
Heading to look for (string
(case insensitive) or RegExp
, default:
/^licen[cs]e$/i
).
This package is fully typed with TypeScript.
It exports an Options
type, which specifies the interface of the accepted
options.
Projects maintained by the unified collective are compatible with all maintained versions of Node.js. As of now, that is Node.js 12.20+, 14.14+, and 16.0+. Our projects sometimes work with older versions, but this is not guaranteed.
This plugin works with unified
version 6+ and remark
version 7+.
options.url
(or author.url
in package.json
) is used and injected into the
tree when it’s given or found.
This could open you up to a cross-site scripting (XSS) attack if you pass
user provided content in or store user provided content in package.json
.
This may become a problem if the markdown is later transformed to rehype (hast) or opened in an unsafe markdown viewer.
remark-collapse
– make some sections collapsibleremark-contributors
– generate a contributors sectionremark-toc
— generate a table of contentsremark-usage
— generate a usage exampleSee contributing.md
in remarkjs/.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
detected GitHub workflow tokens with excessive permissions
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
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
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 2025-04-28
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