Skip to content

Commit d77384c

Browse files
committed
chore(release): update documentation
1 parent c0136dc commit d77384c

2 files changed

Lines changed: 160 additions & 39 deletions

File tree

packages/kitsu-core/README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
<p align=center><a href=https://github.com/wopian/kitsu/blob/master/packages/kitsu-core/MIGRATING.md>Migration guide</a> for v9 and previous major releases</p>
3030

31-
#
31+
#
3232

3333
## Features
3434

@@ -40,7 +40,7 @@
4040

4141
| Package | Package<br> Size\* | Node | Chrome | Firefox | Safari | Edge |
4242
| -----------: | :----------------: | :--: | :----: | :-----: | :----: | :--: |
43-
| `kitsu-core` | ≤ 1.5 kb | 10+ | 67+ | 68+ | 12+ | 18+ |
43+
| `kitsu-core` | ≤ 1.5 kb | 10+ | 67+ | 68+ | 12+ | 18+ |
4444

4545
\* Including all dependencies, minified & gzipped<br>
4646

@@ -116,7 +116,7 @@ kitsuCore.camel(...)
116116

117117
### deattribute
118118

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")
120120

121121
Hoists attributes to be top-level
122122

@@ -160,13 +160,13 @@ Returns **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
160160

161161
### deserialise
162162

163-
[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")
164164

165165
Deserialises a JSON-API response
166166

167167
#### Parameters
168168

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:API response object
170170

171171
#### Examples
172172

@@ -212,7 +212,7 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
212212

213213
### error
214214

215-
[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")
216216

217217
Uniform error handling for Axios, JSON:API and internal package errors. Mutated Error object is rethrown to the caller.
218218

@@ -249,14 +249,14 @@ error({
249249

250250
### filterIncludes
251251

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")
253253

254254
Filters includes for the specific relationship requested
255255

256256
#### Parameters
257257

258258
- `included` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The response included object
259-
- `relationship` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
259+
- `relationship` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
260260
- `relationship.id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The relationship ID
261261
- `relationship.type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The relationship type
262262

@@ -288,7 +288,7 @@ Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Gl
288288

289289
### linkRelationships
290290

291-
[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")
292292

293293
Links relationships to included data
294294

@@ -326,7 +326,7 @@ Returns **any** Parsed data
326326

327327
### query
328328

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")
330330

331331
Constructs a URL query string for JSON:API parameters
332332

@@ -354,14 +354,14 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
354354

355355
### serialise
356356

357-
[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")
358358

359359
Serialises an object into a JSON-API structure
360360

361361
#### Parameters
362362

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 `{}`)
365365
- `method` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Request type (PATCH, POST, DELETE) (optional, default `'POST'`)
366366
- `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Optional configuration for camelCase and pluralisation handling (optional, default `{}`)
367367
- `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
@@ -400,14 +400,14 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
400400

401401
### splitModel
402402

403-
[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")
404404

405405
Split model name from the model's resource URL
406406

407407
#### Parameters
408408

409409
- `url` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** URL path for the model
410-
- `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
410+
- `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
411411
- `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
412412
- `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)
413413

@@ -443,7 +443,7 @@ Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Gl
443443

444444
### camel
445445

446-
[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")
447447

448448
Converts kebab-case and snake_case into camelCase
449449

@@ -471,7 +471,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
471471

472472
### kebab
473473

474-
[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")
475475

476476
Converts camelCase into kebab-case
477477

@@ -489,7 +489,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
489489

490490
### snake
491491

492-
[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")
493493

494494
Converts camelCase into snake_case
495495

0 commit comments

Comments
 (0)