NAME

JSONAPI::Document::Builder::Role::Type - Normalizer for document types

VERSION

version 2.4

DESCRIPTION

Provides methods to correctly format a rows source name.

format_type(Str $type) : Str

Returns a dash cased version of the type.

Useful for deriving resource types for relationships, which are already in the correct singular/plural form and don't require any word manipulations.

document_type(Str $type) : Str

Takes the type and creates its correct, pluralised type.