Changelog
[1.3.0] - 2020-06-23
isErrorDocument
function to detect JSON:API Error documents. This function allows you
to treat the argument as if it were an error document (there is obviously no way to know if it
really is a JSON:API error document at runtime).isLikeJapiError
function to detect JSON:API Error. This function allows you to treat
the argument as if it were an JSON:API error (there is obviously no way to know if it really is
a JSON:API error at runtime).isPlainObject
and isObjectObject
functions from internal.Changelog
[1.2.6] - 2020-06-19
Changelog
[1.2.5] - 2020-06-19
Changelog
[1.2.3] - 2020-06-06
Changelog
[1.2.2] - 2020-05-27
Cache
class is now available to use for caching. You can set this in the cache
option
for a Serializer
(use true
if you want the built in cache).Changelog
[1.2.1] - 2020-05-27
package.json
to help user search for this package.Changelog
[1.2.0] - 2020-05-26
So, ts-japi
has only been released a few days, but after some significant use in my APIs, I have
realized a few things:
nullish
data (nullish
meaning
undefined
or null
).relationships object
should be allowed to have custom keys, not dependent on the relators
options
Relator
s should always have a Serializer
; otherwise, they wouldn't relate to any resource
per se.With this in mind, here are the changes.
Serializer
as the second argument in its
constructor (as opposed to the relator's options. Options can go in the third argument.
relationships object
must be keyed
by the related object. If the relator has no serializer, then the relator has no related name,
hence there is no canonical way to key the relationship.relators
on
Serializer
s. By using objects, the key for the relationship generated by the relator will
correspond to the same key for that of the relator's.nullish
(null
or undefined
) arguments:
nullish
arguments.nullish
arguments.nullish
(null
or undefined
):
projection
option has changed significantly (see the option itself) with nullish
values.I want to say this IS unusual to have a breaking change without depreciation, but given the fact this package is only a few days old, I want to apologize if you are bothered by the above break. However, I will guarantee that API changes will go through depreciation before removal, so happy coding :)