diff --git a/README.md b/README.md index 5d0f843..6ba67bf 100644 --- a/README.md +++ b/README.md @@ -37,22 +37,22 @@ Calling the `serialize` method on the returned object will serialize your `data` #### Available serialization option (`opts` argument) - **attributes**: An array of attributes to show. You can define an attribute as an option if you want to define some relationships (included or not). - - **ref**: If present, it's considered as a relationships. - - **included**: Consider the relationships as [compound document](http://jsonapi.org/format/#document-compound-documents). Default: true. - - **id**: Configurable identifier field for the resource. Default: `id`. - - **attributes**: An array of attributes to show. - - **topLevelLinks**: An object that describes the top-level links. Values can be *string* or a *function* - - **dataLinks**: An object that describes the links inside data. Values can be *string* or a *function* (see examples below) - - **dataMeta**: An object that describes the meta inside data. Values can be a plain value or a *function* (see examples below) - - **relationshipLinks**: An object that describes the links inside relationships. Values can be *string* or a *function* - - **relationshipMeta**: An object that describes the meta inside relationships. Values can be a plain value or a *function* - - **ignoreRelationshipData**: Do not include the `data` key inside the relationship. Default: false. - - **keyForAttribute**: A function or string to customize attributes. Functions are passed the attribute as a single argument and expect a string to be returned. Strings are aliases for inbuilt functions for common case conversions. Options include: `dash-case` (default), `lisp-case`, `spinal-case`, `kebab-case`, `underscore_case`, `snake_case`, `camelCase`, `CamelCase`. - - **nullIfMissing**: Set the attribute to null if missing from your data input. Default: false. - - **pluralizeType**: A boolean to indicate if the type must be pluralized or not. Default: true. - - **typeForAttribute**: A function that maps the attribute (passed as an argument) to the type you want to override. If it returns `undefined`, ignores the flag for that attribute. Option *pluralizeType* ignored if set. - - **meta**: An object to include non-standard meta-information. Values can be a plain value or a *function* - - **transform**: A function to transform each record before the serialization. +- **ref**: If present, it's considered as a relationships. +- **included**: Consider the relationships as [compound document](http://jsonapi.org/format/#document-compound-documents). Default: true. +- **id**: Configurable identifier field for the resource. Default: `id`. +- **attributes**: An array of attributes to show. +- **topLevelLinks**: An object that describes the top-level links. Values can be *string* or a *function* +- **dataLinks**: An object that describes the links inside data. Values can be *string* or a *function* (see examples below) +- **dataMeta**: An object that describes the meta inside data. Values can be a plain value or a *function* (see examples below) +- **relationshipLinks**: An object that describes the links inside relationships. Values can be *string* or a *function* +- **relationshipMeta**: An object that describes the meta inside relationships. Values can be a plain value or a *function* +- **ignoreRelationshipData**: Do not include the `data` key inside the relationship. Default: false. +- **keyForAttribute**: A function or string to customize attributes. Functions are passed the attribute as a single argument and expect a string to be returned. Strings are aliases for inbuilt functions for common case conversions. Options include: `dash-case` (default), `lisp-case`, `spinal-case`, `kebab-case`, `underscore_case`, `snake_case`, `camelCase`, `CamelCase`. +- **nullIfMissing**: Set the attribute to null if missing from your data input. Default: false. +- **pluralizeType**: A boolean to indicate if the type must be pluralized or not. Default: true. +- **typeForAttribute**: A function that maps the attribute (passed as an argument) to the type you want to override. If it returns `undefined`, ignores the flag for that attribute. Option *pluralizeType* ignored if set. +- **meta**: An object to include non-standard meta-information. Values can be a plain value or a *function* +- **transform**: A function to transform each record before the serialization. **Examples**