0.1.0 • Published 10 years ago

id-gen-path-segments v0.1.0

Weekly downloads
2
License
-
Repository
github
Last release
10 years ago

id-gen-path-segments NPM version

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.