{%= description %}
If you've ever tried to create a JavaScript regular expression for validating a range of years, you'll know it's not easy. This solves that problem.
{%= include("install-npm", {save: true}) %}
var yearRange = require('{%= name %}');
yearRegex(1992, 2015);
//=> /^(199[2-9]|200[0-9]|201[0-5])$/
yearRange(0, 1999)
//=> /^([0-9]|[1-9][0-9]|[1-9][0-9]{2}|1[0-9]{3})$/
yearRange(2016)
//=> /^(2016)$/
{%= related(verb.related.list) %}
{%= include("tests") %}
{%= include("contributing") %}
{%= include("author") %}
{%= copyright() %} {%= license() %}
{%= include("footer") %}