Parser for strings to handle file path parsing.
Install with npm:
npm i strings-parser-path --save-dev
Use path
as a Strings parser:
var Strings = require('strings');
var strings = new Strings({
dirname: 'a/b/c',
basename: 'file',
ext: '.html'
});
strings.parser('path', require('strings-parser-path'));
var propstring = ':dirname/:basename:ext';
console.log(strings.template(propstring, 'path'));
//=> 'a/b/c/index.html'
Brian Woodward
Jon Schlinkert
Copyright (c) 2014 Brian Woodward, contributors.
Released under the MIT license
This file was generated by verb-cli on June 28, 2014.