0.1.0 • Published 10 years ago
strings-parser-url v0.1.0
strings-parser-url
Parser for strings to handle url parsing.
Install
Install with npm:
npm i strings-parser-url --save
Usage
Add as a strings
parser:
var Strings = require('strings');
var url = require('strings-parser-url');
var strings = new Strings();
strings.parser('url', url());
var context = {
url: 'https://github.com/assemble/strings.git?sortby=name'
};
var template = ':protocol';
var dest = strings.template(template, 'url', context);
// expected: 'https:'
console.log(dest);
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.
0.1.0
10 years ago