0.0.5 • Published 4 years ago

copyright v0.0.5

Weekly downloads
31
License
MIT
Repository
github
Last release
4 years ago

Copyright

Always up-to-date copyright notices.

Install

npm install copyright

Usage

const copyright = require('copyright');

Default

copyright();
Copyright © 2020

With name

copyright('Christopher Newton');
Copyright © 2020 Christopher Newton

With options

copyright({
  startYear: 1981,
  endYear: 2081,
  name: 'Christopher Newton'
});
Copyright © 1981-2081 Christopher Newton

Options

propertytypedescription
nameStringName to be appended to the copyright notice.
endYearNumberSets the year, or end year when used with startYear.
startYearNumberSets start year and yields a year range (eg. 1977-2020).
shortBooleanOmits the leading 'Copyright' word
htmlEntitiesBooleanEscapes the copyright symbol; ie. © becomes ©

Examples

Name with start year and end year

copyright({
  name: 'Christopher Newton',
  startYear: 1981,
  endYear: 2081
});
Copyright © 1981-2081 Christopher Newton

Short with name

copyright({
  name: 'Christopher Newton',
  short: true
});
© 2020 Christopher Newton

Everything

copyright({
  name: 'Christopher Newton',
  startYear: 1981,
  endYear: 2081,
  short: true,
  htmlEntities: true
});
© 1981-2020 Christopher Newton
0.0.5

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago

0.0.0

8 years ago