JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1209
  • Score
    100M100P100Q108405F
  • License MIT

Add a license section to your README

Package Exports

  • remark-license

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (remark-license) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

remark-license Build Status Coverage Status remark

Add a license section to a README.

Installation

npm:

npm install remark-license

remark-license is also available as an AMD, CommonJS, and globals module, uncompressed and compressed.

Usage

Require dependencies:

var remark = require('remark');
var license = require('remark-license');

Process a document:

var doc = remark.use(license).process([
    '## License',
    '',
    'Something nondescript.',
    ''
].join('\n'));

Yields:

## License

[MIT](LICENSE) © [Titus Wormer](http://wooorm.com)

API

remark.use(license[, options])

Add a license section to heading containing /^licen[cs]e$/i. Replaces the original content of the section. Does nothing when no heading is found.

Parameters:

  • license — This plug-in;

  • options (Object, optional):

    • name (string, optional) — License holder. Detected from the package.json in the current working directory, supporting both object and string format of author. Throws when neither given nor detected.

    • license (string, optional) — SPDX identifier. Detected from the package.json’s license field in the current working directory. Deprecated license objects are not supported. Throws when neither given nor detected.

    • file (string, optional) — File-name of license file. Detected from the files in the current working directory, in which case the first file matching /^licen[cs]e(?=$|\.)/i is used.

    • url (string, optional) — URL to license holder. Detected from the package.json in the current working directory, supporting both object and string format of author. http:// is prepended if url starts without HTTP or HTTPS protocol.

License

MIT © Titus Wormer