Skip to main content
Version: 0.17

@orbit/serializers

Classes​

Interfaces​

Type aliases​

Inflector​

Ƭ Inflector: (input: string) => string

Type declaration​

â–¸ (input): string

Parameters​
NameType
inputstring
Returns​

string

Defined in​

inflector.ts:3


InflectorOrName​

Ƭ InflectorOrName: Inflector | StandardInflectorName

Defined in​

string-serializer.ts:10


SerializerClass​

Ƭ SerializerClass<S>: (settings?: unknown) => S

Type parameters​

NameType
SSerializer

Type declaration​

• (settings?)

Parameters​
NameType
settings?unknown

Defined in​

serializer.ts:11


SerializerClassForFn​

Ƭ SerializerClassForFn<S>: (type: string) => SerializerClass<S>

Type parameters​

NameType
SSerializer

Type declaration​

â–¸ (type): SerializerClass<S>

Parameters​
NameType
typestring
Returns​

SerializerClass<S>

Defined in​

serializer-builders.ts:37


SerializerForFn​

Ƭ SerializerForFn<S>: (type: string) => S | undefined

Type parameters​

NameType
SSerializer

Type declaration​

â–¸ (type): S | undefined

Parameters​
NameType
typestring
Returns​

S | undefined

Defined in​

serializer-builders.ts:4


SerializerSettingsForFn​

Ƭ SerializerSettingsForFn: (type: string) => Dict<unknown> | undefined

Type declaration​

â–¸ (type): Dict<unknown> | undefined

Parameters​
NameType
typestring
Returns​

Dict<unknown> | undefined

Defined in​

serializer-builders.ts:47


StandardInflectorName​

Ƭ StandardInflectorName: "camelize" | "dasherize" | "underscore" | "pluralize" | "singularize"

Defined in​

standard-inflectors.ts:64

Variables​

standardInflectors​

• standardInflectors: Object

Type declaration​

NameType
camelize(str: string) => string
dasherize(str: string) => string
pluralize(word: string) => string
singularize(word: string) => string
underscore(str: string) => string

Defined in​

standard-inflectors.ts:71


standardInverseInflectors​

• standardInverseInflectors: Object

Type declaration​

NameType
camelizenull
dasherizestring
pluralizestring
singularizestring
underscorestring

Defined in​

standard-inflectors.ts:79

Functions​

buildInflector​

â–¸ buildInflector(mappings?, fallback?): Inflector

Parameters​

NameType
mappingsDict<string>
fallback?Inflector

Returns​

Inflector

Defined in​

inflector.ts:5


buildSerializerClassFor​

â–¸ buildSerializerClassFor<S>(serializerClasses?): SerializerClassForFn<S>

Type parameters​

NameType
SSerializer<unknown, unknown, unknown, unknown>

Parameters​

NameType
serializerClassesDict<SerializerClass<S>>

Returns​

SerializerClassForFn<S>

Defined in​

serializer-builders.ts:41


buildSerializerFor​

â–¸ buildSerializerFor<S>(settings): SerializerForFn<S>

Type parameters​

NameType
SSerializer<unknown, unknown, unknown, unknown>

Parameters​

NameType
settingsObject
settings.serializerClassFor?SerializerClassForFn<S>
settings.serializerSettingsFor?SerializerSettingsForFn
settings.serializers?Dict<S>

Returns​

SerializerForFn<S>

Defined in​

serializer-builders.ts:6


buildSerializerSettingsFor​

â–¸ buildSerializerSettingsFor(settings): SerializerSettingsForFn

Parameters​

NameType
settingsObject
settings.settingsByType?Dict<Dict<unknown>>
settings.sharedSettings?Dict<unknown>

Returns​

SerializerSettingsForFn

Defined in​

serializer-builders.ts:51


camelize​

â–¸ camelize(str): string

Convert underscored, dasherized, or space-delimited words into lowerCamelCase.

Parameters​

NameType
strstring

Returns​

string

Defined in​

standard-inflectors.ts:12


capitalize​

â–¸ capitalize(str): string

Uppercase the first letter of a string, but don't change the remainder.

Parameters​

NameType
strstring

Returns​

string

Defined in​

standard-inflectors.ts:4


dasherize​

â–¸ dasherize(str): string

Dasherize words that are underscored, space-delimited, or camelCased.

Parameters​

NameType
strstring

Returns​

string

Defined in​

standard-inflectors.ts:32


decamelize​

â–¸ decamelize(str): string

Converts a camelized string into all lowercase separated by underscores.

Parameters​

NameType
strstring

Returns​

string

Defined in​

standard-inflectors.ts:25


pluralize​

â–¸ pluralize(word): string

A naive pluralization method.

Parameters​

NameType
wordstring

Returns​

string

Defined in​

standard-inflectors.ts:49


singularize​

â–¸ singularize(word): string

A naive singularization method.

Parameters​

NameType
wordstring

Returns​

string

Defined in​

standard-inflectors.ts:56


underscore​

â–¸ underscore(str): string

Underscore words that are dasherized, space-delimited, or camelCased.

Parameters​

NameType
strstring

Returns​

string

Defined in​

standard-inflectors.ts:39