helper-slugify

Slugify a URL, path or heading id using the same format as GitHub heading anchors.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
helper-slugify
0.2.08 years ago11 years agoMinified + gzip package size for helper-slugify in KB

Readme

helper-slugify NPM version NPM downloads Build Status
Slugify a URL, path or heading id using the same format as GitHub heading anchors.

Usage

var slugify = require('helper-slugify');

Lo-Dash usage
Usage with lodash:
var template = require('lodash.template');
var options = {imports: {slugify: require('helper-slugify')}};

var str = template('<%= slugify("foo bar baz") %>', options)();
console.log(str);
//=> 'foo-bar-baz'

Engine usage
Usage with engine:
var Engine = require('engine');
var engine = new Engine();

engine.helper('slugify', require('helper-slugify'));

engine.render('<%= slugify("foo bar baz") %>');
console.log(str);
//=> 'foo-bar-baz'

About

Related projects

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Running tests

Install dev dependencies:
$ npm install -d && npm test

Author

Jon Schlinkert

License

Copyright © 2016, Jon Schlinkert. Released under the MIT license.

This file was generated by verb
, v0.9.0, on July 19, 2016.