The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

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

VERSION

version 2.2

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.