0.1.0 • Published 10 years ago
id-gen-path-segments v0.1.0
id-gen-path-segments
Generate an id from file path segments.
Install
Install with npm:
npm i id-gen-path-segments --save-dev
Usage
var segments = require('id-gen-path-segments')({sep: '-'});
var IdGenerator = require('id-gen');
var renamer = new IdGenerator(segments);
var filepath = 'templates/foo/bar/baz/quux/zed.hbs';
console.log(renamer.next(filepath));
//=> 'baz-quux-zed'
Author
Jon Schlinkert
License
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license
This file was generated by verb-cli on June 23, 2014.
0.1.0
10 years ago