@bustle/slugify
Advanced tools
Comparing version 1.0.1 to 1.1.1
@@ -23,2 +23,3 @@ const slug = require('slug') | ||
module.exports = { | ||
slug: slugify, | ||
slugUser: user => makeSlug(user.id, user.name), | ||
@@ -25,0 +26,0 @@ slugPost: post => makeSlug(post.id, post.title), |
{ | ||
"name": "@bustle/slugify", | ||
"version": "1.0.1", | ||
"version": "1.1.1", | ||
"description": "Slug all our things into slugs", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -18,2 +18,8 @@ # bustle slugify | ||
## slug(string) -> slug | ||
Slug any string | ||
```js | ||
assert.equal(slug('a generic string'), 'a-generic-string') | ||
``` | ||
## slugUser(user:{id!, name}) -> slug | ||
@@ -20,0 +26,0 @@ Users have the id last, don't use this until [nighthawk](https://github.com/bustlelabs/nighthawk/issues/331) can deal with it. |
@@ -5,2 +5,3 @@ /* eslint-env mocha */ | ||
const slug = slugify.slug | ||
const slugUser = slugify.slugUser | ||
@@ -11,2 +12,8 @@ const slugArticle = slugify.slugArticle | ||
describe('slugify', () => { | ||
describe('#slug', () => { | ||
it('should slugify a string', () => { | ||
assert.equal(slug('a generic string'), 'a-generic-string') | ||
}) | ||
}) | ||
describe('#slugUser', () => { | ||
@@ -13,0 +20,0 @@ it('should put the id at the end', () => { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40863
7
66
47
1