npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

id-gen-path-segments

0.1.0

@jonschlinkert

npmHomeRepoSnykSocket
Downloads:106
$ npm install id-gen-path-segments
DailyWeeklyMonthlyYearly

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

  • github/jonschlinkert
  • twitter/jonschlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license


This file was generated by verb-cli on June 23, 2014.