You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/kitsu-core/README.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@
28
28
29
29
<palign=center><ahref=https://github.com/wopian/kitsu/blob/master/packages/kitsu-core/MIGRATING.md>Migration guide</a> for v9 and previous major releases</p>
\* Including all dependencies, minified & gzipped<br>
46
46
@@ -116,7 +116,7 @@ kitsuCore.camel(...)
116
116
117
117
### deattribute
118
118
119
-
[packages/kitsu-core/src/deattribute/index.js:29-51](https://github.com/wopian/kitsu/blob/b67829002325934b88c342ed3344f48113ce843e/packages/kitsu-core/src/deattribute/index.js#L29-L51"Source code on GitHub")
119
+
[packages/kitsu-core/src/deattribute/index.js:29-51](https://github.com/wopian/kitsu/blob/c0136dcfd6fd0700ebbc9bde10da6d57656072bc/packages/kitsu-core/src/deattribute/index.js#L29-L51"Source code on GitHub")
[packages/kitsu-core/src/deserialise/index.js:57-74](https://github.com/wopian/kitsu/blob/b67829002325934b88c342ed3344f48113ce843e/packages/kitsu-core/src/deserialise/index.js#L57-L74"Source code on GitHub")
163
+
[packages/kitsu-core/src/deserialise/index.js:57-72](https://github.com/wopian/kitsu/blob/c0136dcfd6fd0700ebbc9bde10da6d57656072bc/packages/kitsu-core/src/deserialise/index.js#L57-L72"Source code on GitHub")
164
164
165
165
Deserialises a JSON-API response
166
166
167
167
#### Parameters
168
168
169
-
-`obj`**[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The response
169
+
-`response`**[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The raw JSON:APIresponse object
[packages/kitsu-core/src/error/index.js:27-33](https://github.com/wopian/kitsu/blob/b67829002325934b88c342ed3344f48113ce843e/packages/kitsu-core/src/error/index.js#L27-L33"Source code on GitHub")
215
+
[packages/kitsu-core/src/error/index.js:27-33](https://github.com/wopian/kitsu/blob/c0136dcfd6fd0700ebbc9bde10da6d57656072bc/packages/kitsu-core/src/error/index.js#L27-L33"Source code on GitHub")
216
216
217
217
Uniform error handling for Axios, JSON:API and internal package errors. Mutated Error object is rethrown to the caller.
218
218
@@ -249,14 +249,14 @@ error({
249
249
250
250
### filterIncludes
251
251
252
-
[packages/kitsu-core/src/filterIncludes/index.js:33-46](https://github.com/wopian/kitsu/blob/b67829002325934b88c342ed3344f48113ce843e/packages/kitsu-core/src/filterIncludes/index.js#L33-L46"Source code on GitHub")
252
+
[packages/kitsu-core/src/filterIncludes/index.js:33-46](https://github.com/wopian/kitsu/blob/c0136dcfd6fd0700ebbc9bde10da6d57656072bc/packages/kitsu-core/src/filterIncludes/index.js#L33-L46"Source code on GitHub")
253
253
254
254
Filters includes for the specific relationship requested
255
255
256
256
#### Parameters
257
257
258
258
-`included`**[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The response included object
[packages/kitsu-core/src/linkRelationships/index.js:98-118](https://github.com/wopian/kitsu/blob/b67829002325934b88c342ed3344f48113ce843e/packages/kitsu-core/src/linkRelationships/index.js#L98-L118"Source code on GitHub")
291
+
[packages/kitsu-core/src/linkRelationships/index.js:97-117](https://github.com/wopian/kitsu/blob/c0136dcfd6fd0700ebbc9bde10da6d57656072bc/packages/kitsu-core/src/linkRelationships/index.js#L97-L117"Source code on GitHub")
292
292
293
293
Links relationships to included data
294
294
@@ -326,7 +326,7 @@ Returns **any** Parsed data
326
326
327
327
### query
328
328
329
-
[packages/kitsu-core/src/query/index.js:33-44](https://github.com/wopian/kitsu/blob/b67829002325934b88c342ed3344f48113ce843e/packages/kitsu-core/src/query/index.js#L33-L44"Source code on GitHub")
329
+
[packages/kitsu-core/src/query/index.js:33-44](https://github.com/wopian/kitsu/blob/c0136dcfd6fd0700ebbc9bde10da6d57656072bc/packages/kitsu-core/src/query/index.js#L33-L44"Source code on GitHub")
330
330
331
331
Constructs a URL query string for JSON:API parameters
[packages/kitsu-core/src/serialise/index.js:119-152](https://github.com/wopian/kitsu/blob/b67829002325934b88c342ed3344f48113ce843e/packages/kitsu-core/src/serialise/index.js#L119-L152"Source code on GitHub")
357
+
[packages/kitsu-core/src/serialise/index.js:188-202](https://github.com/wopian/kitsu/blob/c0136dcfd6fd0700ebbc9bde10da6d57656072bc/packages/kitsu-core/src/serialise/index.js#L188-L202"Source code on GitHub")
358
358
359
359
Serialises an object into a JSON-API structure
360
360
361
361
#### Parameters
362
362
363
-
-`model`**[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**Request model
364
-
-`obj`**[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The data (optional, default `{}`)
363
+
-`type`**[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**Resource type
364
+
-`data`**([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\|[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))** The data (optional, default `{}`)
365
365
-`method`**[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Request type (PATCH, POST, DELETE) (optional, default `'POST'`)
366
366
-`options`**[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Optional configuration for camelCase and pluralisation handling (optional, default `{}`)
367
367
-`options.camelCaseTypes`**[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Convert library-entries and library_entries to libraryEntries (default no conversion). To use parameter, import camel from kitsu-core
[packages/kitsu-core/src/splitModel/index.js:29-39](https://github.com/wopian/kitsu/blob/b67829002325934b88c342ed3344f48113ce843e/packages/kitsu-core/src/splitModel/index.js#L29-L39"Source code on GitHub")
403
+
[packages/kitsu-core/src/splitModel/index.js:29-39](https://github.com/wopian/kitsu/blob/c0136dcfd6fd0700ebbc9bde10da6d57656072bc/packages/kitsu-core/src/splitModel/index.js#L29-L39"Source code on GitHub")
404
404
405
405
Split model name from the model's resource URL
406
406
407
407
#### Parameters
408
408
409
409
-`url`**[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** URL path for the model
-`options.resourceCase`**[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Convert libraryEntries to library-entries or library_entries (default no conversion). To use parameter, import kebab or snake from kitsu-core
412
412
-`options.pluralModel`**[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Pluralise models (default no pluralisation). To use parameter, import pluralize (or another pluralisation npm package)
[packages/kitsu-core/src/camel/index.js:14-14](https://github.com/wopian/kitsu/blob/b67829002325934b88c342ed3344f48113ce843e/packages/kitsu-core/src/camel/index.js#L14-L14"Source code on GitHub")
446
+
[packages/kitsu-core/src/camel/index.js:14-14](https://github.com/wopian/kitsu/blob/c0136dcfd6fd0700ebbc9bde10da6d57656072bc/packages/kitsu-core/src/camel/index.js#L14-L14"Source code on GitHub")
[packages/kitsu-core/src/kebab/index.js:11-11](https://github.com/wopian/kitsu/blob/b67829002325934b88c342ed3344f48113ce843e/packages/kitsu-core/src/kebab/index.js#L11-L11"Source code on GitHub")
474
+
[packages/kitsu-core/src/kebab/index.js:11-11](https://github.com/wopian/kitsu/blob/c0136dcfd6fd0700ebbc9bde10da6d57656072bc/packages/kitsu-core/src/kebab/index.js#L11-L11"Source code on GitHub")
[packages/kitsu-core/src/snake/index.js:11-11](https://github.com/wopian/kitsu/blob/b67829002325934b88c342ed3344f48113ce843e/packages/kitsu-core/src/snake/index.js#L11-L11"Source code on GitHub")
492
+
[packages/kitsu-core/src/snake/index.js:11-11](https://github.com/wopian/kitsu/blob/c0136dcfd6fd0700ebbc9bde10da6d57656072bc/packages/kitsu-core/src/snake/index.js#L11-L11"Source code on GitHub")
0 commit comments