Skip to content

Commit 5b313a6

Browse files
committed
fix
1 parent c2db329 commit 5b313a6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Serializer.register(type, options);
4545
* **type**: A _string_ or a _function_ `function(relationshipData, data) { ... }` for the type to use for serializing the relationship (type need to be register).
4646
* **alternativeKey** (optional): An alternative key (string or path) to use if relationship key not exist (example: 'author_id' as an alternative key for 'author' relationship). See [issue #12](https://github.com/danivek/json-api-serializer/issues/12).
4747
* **schema** (optional): A custom schema for serializing the relationship. If no schema define, it use the default one.
48-
* **data** (optional): A _function_ `function(data) { ... }` returns the data to serialize for the relationship.
48+
* **data** (optional): A _function_ `function(data) { ... }` that returns the data to serialize for the relationship.
4949
* **links** (optional): Describes the links for the relationship. It can be:
5050
* An _object_ (values can be string or function).
5151
* A _function_ with one argument `function(data) { ... }` or with two arguments `function(data, extraData) { ... }`

lib/JSONAPISerializer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,7 @@ module.exports = class JSONAPISerializer {
10001000
* @property {string|Function} type a string or a function for the type to use for serializing the relationship (type need to be register)
10011001
* @property {string} [alternativeKey] an alternative key (string or path) to use if relationship key not exist (example: 'author_id' as an alternative key for 'author' relationship)
10021002
* @property {string} [schema] a custom schema for serializing the relationship. If no schema define, it use the default one.
1003-
* @property {Function} [data] a function which returns the data to serialize for the relationship
1003+
* @property {Function} [data] a function that returns the data to serialize for the relationship
10041004
* @property {Function|object} [links] describes the links for the relationship
10051005
* @property {Function|object} [meta] describes meta that contains non-standard meta-information about the relationship
10061006
* @property {Function} [deserialize] describes the function which should be used to deserialize a related property which is not included in the JSON:API document

0 commit comments

Comments
 (0)