npm

Need private packages and team management tools?Check out npm Orgs. »

id-gen-path-segments

0.1.0 • Public • Published

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.

install

npm i id-gen-path-segments

Downloadsweekly downloads

3

version

0.1.0

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability