helpers/helper-slugify

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

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
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'
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:

m 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.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.