api/slug

api/slug

Classes

SlugCollection

Members

(static, constant) exports.Slugs :api/slug.SlugCollection

Source:

Provides the singleton instance of a SlugCollection to all other entities.

Type:

Methods

(static) exports.newSlugValidator()

Source:

Custom validator for fields that must contain a previously undefined slug name.

Throws:

Error if there are no Slugs in the SlugCollection.

Returns:

Undefined if the slug value is not previously defined, otherwise errorType 'duplicateSlug'.

(static) module.exports(text) → {string}

Source:

Slugifies the give text.

Parameters:
Name Type Description
text
Returns:
Type
string