Skip to content

Options ​

Shared options (Options) ​

The CLI and Converter methods share the same behaviour.

FieldTypeDefaultDescription
type'json' | 'js' | 'ts'—Output format
flattedbooleanfalseWhen true, run unflatten then flatten for single-level keys
delimiterstring'.'Delimiter when joining keys for flattening
uppercasebooleanfalseUppercase keys
lowercasebooleanfalseLowercase keys

convertForFile (OptionsForFile) ​

FieldDescription
inputPath to the .properties file to read
outputPath to write (extension must match type)

Plus the shared fields above.

convertForContent (OptionsForContent) ​

FieldDescription
contentFull .properties source text

Plus shared fields (type, flatted, …).

Note: If you see extra fields on OptionsForContent in TypeScript definitions, only content and the shared options are used at runtime.

Released under the ISC License.