0.1.2 • Published 9 years ago

template-error v0.1.2

Weekly downloads
28,534
License
MIT
Repository
github
Last release
9 years ago

template-error NPM version

Make template errors easy to understand and fix.

Install

Install with npm

$ npm i template-error --save

Usage

var rethrow = require('template-error');

rethrow('\n<%= a %>\n<%= b %>', {
  data: {a: 'aaa'}
});

When a template variable is not defined, like <%= b %> in the example above, instead of getting a cryptic error message and wasting time on debugging, you get this:

Related projects

rethrow: Re-throw an error to get better error reporting for templates. | homepage

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on August 21, 2015.