## Usage ```js var copyright = require('{%= name %}'); 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() %} //=> Copyright (c) {%= year %} Jon Schlinkert {%= copyright({year: 2014}) %} //=> Copyright (c) 2014-{%= year %} Jon Schlinkert {%= copyright({linkify: true}) %} //=> Copyright (c) {%= year %} [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: {'{%= alias %}': require('{%= name %}')} }); //=> Copyright (c) {%= year %} Jon Schlinkert ``` As a mixin: ```js _.mixin({'{%= alias %}': require('{%= name %}')}); _.template('<%= copyright({author: author}) %>', locals); //=> Copyright (c) {%= year %} Jon Schlinkert ``` ### [template](https://github.com/jonschlinkert/template) ```js template.helper('{%= alias %}', require('{%= name %}')); template.render('<%= copyright() %>', function(err, content) { console.log(content); //=> Copyright (c) {%= year %} Jon Schlinkert' }); ``` ### [assemble](https://github.com/assemble/assemble) ```js assemble.helper('{%= alias %}', require('{%= name %}')); assemble.render('{{copyright this}}', function(err, content) { console.log(content); //=> Copyright (c) {%= year %} Jon Schlinkert' }); ``` ### [verb](https://github.com/jonschlinkert/verb) ```js verb.helper('{%= alias %}', require('{%= name %}')); verb.render('{%= copyright() %}', function(err, content) { console.log(content); //=> Copyright (c) {%= year %} Jon Schlinkert' }); ``` ### [handlebars](https://github.com/wycats/handlebars.js/) ```js var handlebars = require('handlebars'); handlebars.registerHelper('{%= alias %}', require('{%= name %}')); handlebars.compile('{{copyright this}}')(locals); //=> Copyright (c) {%= year %} Jon Schlinkert ```