{"analyzedAt":"2022-06-26T11:08:16.871Z","collected":{"metadata":{"name":"remark-license","scope":"unscoped","version":"6.1.0","description":"remark plugin to generate a license section","keywords":["unified","remark","remark-plugin","plugin","mdast","markdown","text","plain","text","license","spdx","readme"],"date":"2021-11-29T18:21:36.663Z","author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com","username":"wooorm"},"publisher":{"username":"wooorm","email":"tituswormer@gmail.com"},"maintainers":[{"username":"johno","email":"johnotander@gmail.com"},{"username":"wooorm","email":"tituswormer@gmail.com"}],"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},{"name":"Ben Briggs","email":"beneb.info@gmail.com","url":"http://beneb.info"}],"repository":{"type":"git","url":"git+https://github.com/remarkjs/remark-license.git"},"links":{"npm":"https://www.npmjs.com/package/remark-license","homepage":"https://github.com/remarkjs/remark-license#readme","repository":"https://github.com/remarkjs/remark-license","bugs":"https://github.com/remarkjs/remark-license/issues"},"license":"MIT","dependencies":{"@types/mdast":"^3.0.0","mdast-util-heading-range":"^3.0.0","parse-author":"^2.0.0","spdx-license-list":"^6.0.0","to-vfile":"^7.0.0","unified":"^10.0.0","vfile-find-up":"^6.0.0"},"devDependencies":{"@types/parse-author":"^2.0.0","@types/tape":"^4.0.0","c8":"^7.0.0","is-hidden":"^2.0.0","prettier":"^2.0.0","remark":"^14.0.0","remark-cli":"^10.0.0","remark-preset-wooorm":"^9.0.0","rimraf":"^3.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","type-fest":"^2.0.0","typescript":"^4.0.0","xo":"^0.47.0"},"releases":[{"from":"2022-05-27T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2022-03-28T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2021-12-28T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2021-06-26T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":2},{"from":"2020-06-26T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":3}],"hasTestScript":true,"hasSelectiveFiles":true,"readme":"# remark-license\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\n**[remark][]** plugin to generate a license section.\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`unified().use(remarkLicense[, options])`](#unifieduseremarklicense-options)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Security](#security)\n*   [Related](#related)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis package is a [unified][] ([remark][]) plugin to generate a license section\nsuch as the one below.\n\n**unified** is a project that transforms content with abstract syntax trees\n(ASTs).\n**remark** adds support for markdown to unified.\n**mdast** is the markdown AST that remark uses.\nThis is a remark plugin that transforms mdast.\n\n## When should I use this?\n\nThis project is useful when you’re writing documentation for an open source\nproject, typically a Node.js package, that has one or more readmes and maybe\nsome other markdown files as well.\nYou want to show the author and license associated with the project.\nWhen this plugin is used, authors can add a certain heading (say, `## License`)\nto documents and this plugin will populate them.\n\n## Install\n\nThis package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).\nIn Node.js (version 12.20+, 14.14+, or 16.0+), install with [npm][]:\n\n```sh\nnpm install remark-license\n```\n\nIn Deno with [Skypack][]:\n\n```js\nimport remarkLicense from 'https://cdn.skypack.dev/remark-license@6?dts'\n```\n\nIn browsers with [Skypack][]:\n\n```html\n<script type=\"module\">\n  import remarkLicense from 'https://cdn.skypack.dev/remark-license@6?min'\n</script>\n```\n\n## Use\n\nSay we have the following file `example.md` in this project:\n\n```markdown\n# Example\n\nSome text.\n\n## Use\n\n## API\n\n## License\n```\n\nAnd our module `example.js` looks as follows:\n\n```js\nimport {read} from 'to-vfile'\nimport {remark} from 'remark'\nimport remarkLicense from 'remark-license'\n\nmain()\n\nasync function main() {\n  const file = await remark()\n    .use(remarkLicense)\n    .process(await read('example.md'))\n\n  console.log(String(file))\n}\n```\n\nNow running `node example.js` yields:\n\n```markdown\n# Example\n\nSome text.\n\n## Use\n\n## API\n\n## License\n\n[MIT](license) © [Titus Wormer](https://wooorm.com)\n```\n\n> 👉 **Note**: This info is inferred from this project’s\n> [`package.json`][package-json] and [`license`][license] file.\n> Running this example in a different package will yield different results.\n\n## API\n\nThis package exports no identifiers.\nThe default export is `remarkLicense`.\n\n### `unified().use(remarkLicense[, options])`\n\nGenerate a license section.\nIn short, this plugin:\n\n*   looks for the heading matching `/^licen[cs]e$/i` or `options.heading`.\n*   if there is a heading, replaces it with a new section\n\n##### `options`\n\nConfiguration (optional in Node.js, required in browsers).\n\n###### `options.name`\n\nLicense holder (`string`).\nIn Node.js, defaults to the `author` field in the closest `package.json`.\n*Throws when neither given nor detected.*\n\n###### `options.license`\n\n[SPDX][] identifier (`string`).\nIn Node.js, defaults to the `license` field in the closest `package.json`.\n*Throws when neither given nor detected.*\n\n###### `options.file`\n\nFile name of license file (`string`, optional).\nIn Node.js, defaults to a file in the directory of the closest `package.json`\nthat matches `/^licen[cs]e(?=$|\\.)/i`.\nIf there is no given or found license file, but `options.license` is a known\n[SPDX][] identifier, then the URL to the license on `spdx.org` is used.\n\n###### `options.url`\n\nURL to license holder (`string`, optional).\nIn Node.js, defaults to the `author` field in the closest `package.json`.\n`http://` is prepended if `url` does not start with an HTTP or HTTPS protocol.\n\n###### `options.ignoreFinalDefinitions`\n\nIgnore definitions that would otherwise trail in the section (`boolean`,\ndefault: `true`).\n\n###### `options.heading`\n\nHeading to look for (`string` (case insensitive) or `RegExp`, default:\n`/^licen[cs]e$/i`).\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports an `Options` type, which specifies the interface of the accepted\noptions.\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with all maintained\nversions of Node.js.\nAs of now, that is Node.js 12.20+, 14.14+, and 16.0+.\nOur projects sometimes work with older versions, but this is not guaranteed.\n\nThis plugin works with `unified` version 6+ and `remark` version 7+.\n\n## Security\n\n`options.url` (or `author.url` in `package.json`) is used and injected into the\ntree when it’s given or found.\nThis could open you up to a [cross-site scripting (XSS)][xss] attack if you pass\nuser provided content in or store user provided content in `package.json`.\n\nThis may become a problem if the markdown is later transformed to **[rehype][]**\n(**[hast][]**) or opened in an unsafe markdown viewer.\n\n## Related\n\n*   [`remark-collapse`](https://github.com/Rokt33r/remark-collapse)\n    – make some sections collapsible\n*   [`remark-contributors`](https://github.com/hughsk/remark-contributors)\n    – generate a contributors section\n*   [`remark-toc`](https://github.com/remarkjs/remark-toc)\n    — generate a table of contents\n*   [`remark-usage`](https://github.com/remarkjs/remark-usage)\n    — generate a usage example\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`remarkjs/.github`][health] for ways\nto get started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[build-badge]: https://github.com/remarkjs/remark-license/workflows/main/badge.svg\n\n[build]: https://github.com/remarkjs/remark-license/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/remarkjs/remark-license.svg\n\n[coverage]: https://codecov.io/github/remarkjs/remark-license\n\n[downloads-badge]: https://img.shields.io/npm/dm/remark-license.svg\n\n[downloads]: https://www.npmjs.com/package/remark-license\n\n[size-badge]: https://img.shields.io/bundlephobia/minzip/remark-license.svg\n\n[size]: https://bundlephobia.com/result?p=remark-license\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[collective]: https://opencollective.com/unified\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/remarkjs/remark/discussions\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[skypack]: https://www.skypack.dev\n\n[health]: https://github.com/remarkjs/.github\n\n[contributing]: https://github.com/remarkjs/.github/blob/HEAD/contributing.md\n\n[support]: https://github.com/remarkjs/.github/blob/HEAD/support.md\n\n[coc]: https://github.com/remarkjs/.github/blob/HEAD/code-of-conduct.md\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[remark]: https://github.com/remarkjs/remark\n\n[unified]: https://github.com/unifiedjs/unified\n\n[spdx]: https://spdx.org/licenses/\n\n[xss]: https://en.wikipedia.org/wiki/Cross-site_scripting\n\n[typescript]: https://www.typescriptlang.org\n\n[rehype]: https://github.com/rehypejs/rehype\n\n[hast]: https://github.com/syntax-tree/hast\n\n[package-json]: package.json"},"npm":{"downloads":[{"from":"2022-06-25T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":39},{"from":"2022-06-19T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":406},{"from":"2022-05-27T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":2130},{"from":"2022-03-28T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":5225},{"from":"2021-12-28T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":14492},{"from":"2021-06-26T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":29243}],"starsCount":0},"github":{"homepage":"https://remark.js.org","starsCount":15,"forksCount":8,"subscribersCount":7,"issues":{"count":15,"openCount":0,"distribution":{"3600":0,"10800":1,"32400":3,"97200":0,"291600":2,"874800":1,"2624400":2,"7873200":1,"23619600":0,"70858800":5,"212576400":0},"isDisabled":false},"contributors":[{"username":"ben-eb","commitsCount":1},{"username":"wooorm","commitsCount":105},{"username":"nnmrts","commitsCount":1},{"username":"greenkeeperio-bot","commitsCount":2}],"commits":[{"from":"2022-06-19T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2022-05-27T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2022-03-28T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2021-12-28T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":2},{"from":"2021-06-26T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":21}]},"source":{"files":{"readmeSize":7671,"testsSize":6038},"badges":[{"urls":{"original":"https://img.shields.io/codecov/c/github/remarkjs/remark-license.svg","service":"https://codecov.io/github/remarkjs/remark-license/graphs/badge.svg","shields":"https://img.shields.io/codecov/c/github/remarkjs/remark-license.svg","content":"https://img.shields.io/codecov/c/github/remarkjs/remark-license.json"},"info":{"service":"codecov","type":"coverage"}},{"urls":{"original":"https://img.shields.io/npm/dm/remark-license.svg","shields":"https://img.shields.io/npm/dm/remark-license.svg","content":"https://img.shields.io/npm/dm/remark-license.json"},"info":{"service":"npm","type":"downloads","modifiers":{"type":"dm"}}}],"linters":["editorconfig","prettier","xo"],"coverage":1}},"evaluation":{"quality":{"carefulness":0.9199999999999999,"tests":0.75,"health":1,"branding":0.3},"popularity":{"communityInterest":34,"downloadsCount":1741.6666666666667,"downloadsAcceleration":-2.1811263318112672,"dependentsCount":0},"maintenance":{"releasesFrequency":0.9,"commitsFrequency":0.9,"openIssues":1,"issuesDistribution":0.9}},"score":{"final":0.6623907376791132,"detail":{"quality":0.9527343756267316,"popularity":0.07600911666703844,"maintenance":0.9999063833075152}}}