# helper-copyright

> Template helper for adding a basic, one-line copyright statement, with formatting appropriate for LICENSE/LICENSE-MIT or README templates. Used with Verb, but should work with any Handlebars, Lo-Dash, underscore, or any template engine that allows helper

Latest version **2.1.2** (published 2017-01-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install helper-copyright
pnpm add helper-copyright
yarn add helper-copyright
bun add helper-copyright
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.2 |
| Published | 2017-01-08 |
| First published | 2014-11-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 6 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Jon Schlinkert |
| Maintainers | jonschlinkert |
| Keywords | assemble, handlebars, helper, lodash, template, verb |

## Links

- npm: https://www.npmjs.com/package/helper-copyright
- Repository: https://github.com/helpers/helper-copyright
- Issues: https://github.com/helpers/helper-copyright/issues
- npm.io page: https://npm.io/package/helper-copyright

## Dependencies (6)

- [year](https://npm.io/package/year.md) ^0.2.1
- [lazy-cache](https://npm.io/package/lazy-cache.md) ^2.0.1
- [mixin-deep](https://npm.io/package/mixin-deep.md) ^1.1.3
- [parse-author](https://npm.io/package/parse-author.md) ^1.0.0
- [markdown-link](https://npm.io/package/markdown-link.md) ^0.1.1
- [update-copyright](https://npm.io/package/update-copyright.md) ^0.2.3

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 2.1.2 (latest) — 2017-01-08
- 2.1.1 — 2016-05-03
- 2.1.0 — 2016-03-21
- 2.0.1 — 2015-12-27
- 2.0.0 — 2015-11-17
- 1.4.0 — 2015-05-14
- 1.3.0 — 2015-04-25
- 1.2.2 — 2015-04-23
- 1.2.1 — 2015-04-23
- 1.2.0 — 2015-04-23
- 1.1.1 — 2015-02-20
- 1.1.0 — 2015-02-19
- 1.0.1 — 2015-01-02
- 1.0.0 — 2014-12-30
- 0.1.3 — 2014-11-12
- … 3 more at https://npm.io/package/helper-copyright/versions

## README

# helper-copyright [![NPM version](https://img.shields.io/npm/v/helper-copyright.svg?style=flat)](https://www.npmjs.com/package/helper-copyright) [![NPM monthly downloads](https://img.shields.io/npm/dm/helper-copyright.svg?style=flat)](https://npmjs.org/package/helper-copyright)  [![NPM total downloads](https://img.shields.io/npm/dt/helper-copyright.svg?style=flat)](https://npmjs.org/package/helper-copyright) [![Linux Build Status](https://img.shields.io/travis/helpers/helper-copyright.svg?style=flat&label=Travis)](https://travis-ci.org/helpers/helper-copyright)

> Template helper for adding a basic, one-line copyright statement, with formatting appropriate for LICENSE/LICENSE-MIT or README templates. Used with Verb, but should work with any Handlebars, Lo-Dash, underscore, or any template engine that allows helper functions to be registered.

## Install

Install with [npm](https://www.npmjs.com/):

```sh
$ npm install --save helper-copyright
```

## Usage

```js
var copyright = require('helper-copyright');
var handlebars = require('handlebars');

// the top-level export is a function that must be called, so you 
// can optionally pass an options object when registering the helper
handlebars.registerHelper('copyright', copyright({linkify: true}));
```

## Example

Add a copyright statement, with author and year(s) in effect (verb templates):

```js
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
//=> Copyright (c) 2017 Jon Schlinkert

Copyright © 2014, 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
//=> Copyright (c) 2014-2017 Jon Schlinkert

Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
//=> Copyright (c) 2017 [Jon Schlinkert](https://github.com/jonschlinkert)
```

## Examples

> This should work with any engine, here are a few examples

Given the following locals:

```js
var locals = {author: {name: 'Jon Schlinkert', url: 'https://github.com/jonschlinkert'}};
```

### [Lo-Dash](https://github.com/jonschlinkert/template)

As a helper:

```js
_.template('<%= copyright({author: author}) %>', locals, {
  imports: {'helper-copyright': require('helper-copyright')}
});
//=> Copyright (c) 2017 Jon Schlinkert
```

As a mixin:

```js
_.mixin({'helper-copyright': require('helper-copyright')});
_.template('<%= copyright({author: author}) %>', locals);
//=> Copyright (c) 2017 Jon Schlinkert
```

### [template](https://github.com/jonschlinkert/template)

```js
template.helper('helper-copyright', require('helper-copyright'));
template.render('<%= copyright() %>', function(err, content) {
  console.log(content);
  //=> Copyright (c) 2017 Jon Schlinkert'
});
```

### [assemble](https://github.com/assemble/assemble)

```js
assemble.helper('helper-copyright', require('helper-copyright'));
assemble.render('{{copyright this}}', function(err, content) {
  console.log(content);
  //=> Copyright (c) 2017 Jon Schlinkert'
});
```

### [verb](https://github.com/jonschlinkert/verb)

```js
verb.helper('helper-copyright', require('helper-copyright'));
verb.render('Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).', function(err, content) {
  console.log(content);
  //=> Copyright (c) 2017 Jon Schlinkert'
});
```

### [handlebars](https://github.com/wycats/handlebars.js/)

```js
var handlebars = require('handlebars');
handlebars.registerHelper('helper-copyright', require('helper-copyright'));
handlebars.compile('{{copyright this}}')(locals);
//=> Copyright (c) 2017 Jon Schlinkert
```

## About

### Related projects

* [helper-license](https://www.npmjs.com/package/helper-license): Template helper for adding a formatted license statement based on the license type in package.json. | [homepage](https://github.com/helpers/helper-license)
* [helper-reflinks](https://www.npmjs.com/package/helper-reflinks): Async template helper for generating a list of markdown reference links. | [homepage](https://github.com/helpers/helper-reflinks)
* [helper-related](https://www.npmjs.com/package/helper-related): Template helper for generating a list of links to the homepages of related GitHub/npm projects. | [homepage](https://github.com/helpers/helper-related)
* [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb)

### Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).

### Contributors

| **Commits** | **Contributor** |  
| --- | --- |  
| 53 | [jonschlinkert](https://github.com/jonschlinkert) |  
| 1  | [ierceg](https://github.com/ierceg) |  
| 1  | [mightyiam](https://github.com/mightyiam) |

### Building docs

_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_

To generate the readme and API documentation with [verb](https://github.com/verbose/verb):

```sh
$ npm install -g verb verb-generate-readme && verb
```

### Running tests

Install dev dependencies:

```sh
$ npm install -d && npm test
```

### Author

**Jon Schlinkert**

* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

### License

Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT license](LICENSE).

***

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.3.0, on January 08, 2017._

---
_Source: https://npm.io/package/helper-copyright · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
