ShareSlug¶
Namespace Nfty.Core.Publish.Community in assembly Nfty.Core.
Turns a collection name into the slug that names a share's Release, files and index entry.
Methods¶
IsValid(string)¶
Whether a string is a slug: 1 to 40 of lowercase letters, digits and inner dashes.
Parameters
slug(string) - The candidate.
Returns. True when valid.
Of(string)¶
The slug for a name: lowercase letters and digits, runs of anything else as one dash, at most 40 characters.
Parameters
collectionName(string) - The collection's published name.
Returns. A valid slug; a name with no ASCII letters or digits gets set- plus eight hex digits of its hash, stable for that name.