0.1.1 • Published 9 years ago

strings-parser-date v0.1.1

Weekly downloads
6
License
-
Repository
github
Last release
9 years ago

strings-parser-date NPM version

Parser for strings to handle date parsing.

Install

Install with npm:

npm i strings-parser-date --save

Usage

Add as a strings parser:

var Strings = require('strings');
var date = require('strings-parser-date');

var strings = new Strings();
strings.parser('date', date());

var context = {
  date: '2014-MAY-15'
};
var template = ':YYYY';
var str = strings.template(template, 'date', context);

// expected: '2014'
console.log(str);

Author

Brian Woodward

License

Copyright (c) 2014 Brian Woodward, contributors.
Released under the MIT license


This file was generated by verb-cli on May 15, 2014.