Name: helper-slugify
Owner: Helpers
Description: Slugify a URL, path or heading the same way that GitHub formats heading anchors.
Created: 2016-07-19 04:45:55.0
Updated: 2017-09-25 14:23:25.0
Pushed: 2016-07-19 05:13:50.0
Homepage: null
Size: 5
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Slugify a URL, path or heading id using the same format as GitHub heading anchors.
slugify = require('helper-slugify');
Lo-Dash usage
Usage with lodash:
template = require('lodash.template');
options = {imports: {slugify: require('helper-slugify')}};
str = template('<%= slugify("foo bar baz") %>', options)();
ole.log(str);
'foo-bar-baz'
Engine usage
Usage with engine:
Engine = require('engine');
engine = new Engine();
ne.helper('slugify', require('helper-slugify'));
ne.render('<%= slugify("foo bar baz") %>');
ole.log(str);
'foo-bar-baz'
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Install dev dependencies:
m install -d && npm test
Jon Schlinkert
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb, v0.9.0, on July 19, 2016.