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

    2

    Version

    0.1.0

    License

    none

    Last publish

    Collaborators

    • doowb
    • jonschlinkert