Skip to content

Commit a78a075

Browse files
committed
docs(kitsu-core): declare optional parameters in JSDoc syntax
1 parent 95eb9c1 commit a78a075

20 files changed

Lines changed: 87 additions & 89 deletions

File tree

packages/kitsu-core/README.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,13 @@ kitsuCore.camel(...)
116116

117117
### deattribute
118118

119-
[packages/kitsu-core/src/deattribute/index.js:29-51](https://github.com/wopian/kitsu/blob/570ef11d4ba811a0bf77a9e018d86f87ba6da961/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/95eb9c1315f3ef229c3374e740e6af024b3ab60a/packages/kitsu-core/src/deattribute/index.js#L29-L51 "Source code on GitHub")
120120

121121
Hoists attributes to be top-level
122122

123123
#### Parameters
124124

125-
- `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))** Resource data
125+
- `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)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>)** Resource data
126126

127127
#### Examples
128128

@@ -156,11 +156,11 @@ const data = {
156156
const output = deattribute(data) // { id: '1', type: 'users', slug: 'wopian' }
157157
```
158158

159-
Returns **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))** Deattributed resource data
159+
Returns **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>)** Deattributed resource data
160160

161161
### deserialise
162162

163-
[packages/kitsu-core/src/deserialise/index.js:57-72](https://github.com/wopian/kitsu/blob/570ef11d4ba811a0bf77a9e018d86f87ba6da961/packages/kitsu-core/src/deserialise/index.js#L57-L72 "Source code on GitHub")
163+
[packages/kitsu-core/src/deserialise/index.js:57-72](https://github.com/wopian/kitsu/blob/95eb9c1315f3ef229c3374e740e6af024b3ab60a/packages/kitsu-core/src/deserialise/index.js#L57-L72 "Source code on GitHub")
164164

165165
Deserialises a JSON-API response
166166

@@ -212,13 +212,13 @@ 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/570ef11d4ba811a0bf77a9e018d86f87ba6da961/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/95eb9c1315f3ef229c3374e740e6af024b3ab60a/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

219219
#### Parameters
220220

221-
- `E` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The Error
221+
- `Error` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The Error
222222

223223
#### Examples
224224

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

250250
### filterIncludes
251251

252-
[packages/kitsu-core/src/filterIncludes/index.js:33-46](https://github.com/wopian/kitsu/blob/570ef11d4ba811a0bf77a9e018d86f87ba6da961/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/95eb9c1315f3ef229c3374e740e6af024b3ab60a/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

258-
- `included` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The response included object
258+
- `included` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** The response included object
259259
- `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
@@ -284,18 +284,18 @@ const response = filterIncludes(includes, relationship)
284284
// }
285285
```
286286

287-
Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** The matched includes
287+
Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** The matched includes
288288

289289
### linkRelationships
290290

291-
[packages/kitsu-core/src/linkRelationships/index.js:97-117](https://github.com/wopian/kitsu/blob/570ef11d4ba811a0bf77a9e018d86f87ba6da961/packages/kitsu-core/src/linkRelationships/index.js#L97-L117 "Source code on GitHub")
291+
[packages/kitsu-core/src/linkRelationships/index.js:97-117](https://github.com/wopian/kitsu/blob/95eb9c1315f3ef229c3374e740e6af024b3ab60a/packages/kitsu-core/src/linkRelationships/index.js#L97-L117 "Source code on GitHub")
292292

293293
Links relationships to included data
294294

295295
#### Parameters
296296

297297
- `data` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The response data object
298-
- `included` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The response included object (optional, default `[]`)
298+
- `included` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>?** The response included object (optional, default `[]`)
299299

300300
#### Examples
301301

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

327327
### query
328328

329-
[packages/kitsu-core/src/query/index.js:33-44](https://github.com/wopian/kitsu/blob/570ef11d4ba811a0bf77a9e018d86f87ba6da961/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/95eb9c1315f3ef229c3374e740e6af024b3ab60a/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

333333
#### Parameters
334334

335-
- `params` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Parameters to parse
336-
- `prefix` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Prefix for nested parameters - used internally (default `null`) (optional, default `null`)
335+
- `params` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Parameters to parse
336+
- `prefix` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Prefix for nested parameters - used internally (optional, default `null`)
337337

338338
#### Examples
339339

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

355355
### serialise
356356

357-
[packages/kitsu-core/src/serialise/index.js:193-204](https://github.com/wopian/kitsu/blob/570ef11d4ba811a0bf77a9e018d86f87ba6da961/packages/kitsu-core/src/serialise/index.js#L193-L204 "Source code on GitHub")
357+
[packages/kitsu-core/src/serialise/index.js:191-202](https://github.com/wopian/kitsu/blob/95eb9c1315f3ef229c3374e740e6af024b3ab60a/packages/kitsu-core/src/serialise/index.js#L191-L202 "Source code on GitHub")
358358

359359
Serialises an object into a JSON-API structure
360360

361361
#### Parameters
362362

363363
- `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-
- `method` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Request type (PATCH, POST, DELETE) (optional, default `'POST'`)
366-
- `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Optional configuration for camelCase and pluralisation handling (optional, default `{}`)
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
368-
- `options.pluralTypes` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Pluralise types (default no pluralisation). To use parameter, import pluralize (or another pluralisation npm package)
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)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>)?** The data (optional, default `{}`)
365+
- `method` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Request type (PATCH, POST, DELETE) (optional, default `'POST'`)
366+
- `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Optional configuration for camelCase and pluralisation handling (optional, default `{}`)
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 (optional, default `s=>s`)
368+
- `options.pluralTypes` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Pluralise types (default no pluralisation). To use parameter, import pluralize (or another pluralisation npm package) (optional, default `s=>s`)
369369

370370
#### Examples
371371

@@ -400,16 +400,16 @@ 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/570ef11d4ba811a0bf77a9e018d86f87ba6da961/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/95eb9c1315f3ef229c3374e740e6af024b3ab60a/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)**
411-
- `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-
- `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)
410+
- `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**
411+
- `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 (optional, default `s=>s`)
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)
413413

414414
#### Examples
415415

@@ -439,17 +439,17 @@ splitModel('libraryEntries', { resourceCase: snake })
439439
// [ 'libraryEntries', 'library_entries' ]
440440
```
441441

442-
Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** Array containing the model name and the resource URL with pluralisation applied
442+
Returns **\[[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)]** } Array containing the model name and the resource URL with pluralisation applied
443443

444444
### camel
445445

446-
[packages/kitsu-core/src/camel/index.js:14-14](https://github.com/wopian/kitsu/blob/570ef11d4ba811a0bf77a9e018d86f87ba6da961/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/95eb9c1315f3ef229c3374e740e6af024b3ab60a/packages/kitsu-core/src/camel/index.js#L14-L14 "Source code on GitHub")
447447

448448
Converts kebab-case and snake_case into camelCase
449449

450450
#### Parameters
451451

452-
- `s` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** String to convert
452+
- `input` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** String to convert
453453

454454
#### Examples
455455

@@ -471,13 +471,13 @@ 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/570ef11d4ba811a0bf77a9e018d86f87ba6da961/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/95eb9c1315f3ef229c3374e740e6af024b3ab60a/packages/kitsu-core/src/kebab/index.js#L11-L11 "Source code on GitHub")
475475

476476
Converts camelCase into kebab-case
477477

478478
#### Parameters
479479

480-
- `s` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** camelCase string
480+
- `input` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** camelCase string
481481

482482
#### Examples
483483

@@ -489,13 +489,13 @@ 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/570ef11d4ba811a0bf77a9e018d86f87ba6da961/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/95eb9c1315f3ef229c3374e740e6af024b3ab60a/packages/kitsu-core/src/snake/index.js#L11-L11 "Source code on GitHub")
493493

494494
Converts camelCase into snake_case
495495

496496
#### Parameters
497497

498-
- `s` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** camelCase string
498+
- `input` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** camelCase string
499499

500500
#### Examples
501501

packages/kitsu-core/src/camel/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Converts kebab-case and snake_case into camelCase
33
*
44
* @name camel
5-
* @param {string} s String to convert
5+
* @param {string} input String to convert
66
* @returns {string} camelCase formatted string
77
*
88
* @example <caption>Convert kebab-case</caption>
@@ -11,4 +11,4 @@
1111
* @example <caption>Convert snake_case</caption>
1212
* camel('hello_world') // 'helloWorld'
1313
*/
14-
export default s => s.replace(/[-_][a-z\u00E0-\u00F6\u00F8-\u00FE]/g, match => match.slice(1).toUpperCase())
14+
export default input => input.replace(/[-_][a-z\u00E0-\u00F6\u00F8-\u00FE]/g, match => match.slice(1).toUpperCase())

packages/kitsu-core/src/deserialise/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ import { linkRelationships } from '../linkRelationships'
44
/**
55
* Deserialises an array from a JSON-API structure
66
*
7-
* @param {*} obj The response
7+
* @param {Object[]} array The response
88
* @returns {Object} The deserialised response
99
* @private
1010
*/
11-
function deserialiseArray (obj) {
12-
for (let value of obj.data) {
13-
if (obj.included) value = linkRelationships(value, obj.included)
11+
function deserialiseArray (array) {
12+
for (let value of array.data) {
13+
if (array.included) value = linkRelationships(value, array.included)
1414
if (value.relationships) value = linkRelationships(value)
1515
if (value.attributes) value = deattribute(value)
16-
obj.data[obj.data.indexOf(value)] = value
16+
array.data[array.data.indexOf(value)] = value
1717
}
18-
return obj
18+
return array
1919
}
2020

2121
/**

packages/kitsu-core/src/error/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Uniform error handling for Axios, JSON:API and internal package errors. Mutated Error object is rethrown to the caller.
33
*
4-
* @param {Object} E The Error
4+
* @param {Object} Error The Error
55
* @throws {Object} The mutated Error
66
*
77
* @example
@@ -24,10 +24,10 @@
2424
* }
2525
* })
2626
*/
27-
export function error (E) {
28-
if (E.response) {
29-
const e = E.response.data
30-
if (e && e.errors) E.errors = e.errors
27+
export function error (Error) {
28+
if (Error.response) {
29+
const e = Error.response.data
30+
if (e?.errors) Error.errors = e.errors
3131
}
32-
throw E
32+
throw Error
3333
}

packages/kitsu-core/src/filterIncludes/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { error } from '../error'
33
/**
44
* Filters includes for the specific relationship requested
55
*
6-
* @param {Object} included The response included object
6+
* @param {Object[]} included The response included object
77
* @param {Object} relationship
88
* @param {string} relationship.id The relationship ID
99
* @param {string} relationship.type The relationship type

packages/kitsu-core/src/kebab/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
* Converts camelCase into kebab-case
33
*
44
* @name kebab
5-
* @param {string} s camelCase string
5+
* @param {string} input camelCase string
66
* @returns {string} kebab-case formatted string
77
*
88
* @example
99
* kebab('helloWorld') // 'hello-world'
1010
*/
11-
export default s => s.charAt(0).toLowerCase() + s.slice(1).replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g, match => '-' + match.toLowerCase())
11+
export default input => input.charAt(0).toLowerCase() + input.slice(1).replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g, match => '-' + match.toLowerCase())

packages/kitsu-core/src/linkRelationships/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import { filterIncludes } from '../filterIncludes'
77
* @param {Object} resource The included resource
88
* @param {string} resource.id Resource ID
99
* @param {string} resource.type Resource type
10-
* @param {Object} resource.meta Meta information
11-
* @param {Object} included The response included object
10+
* @param {Object} [resource.meta] Meta information
11+
* @param {Object[]} included The response included object
1212
* @private
1313
*/
1414
function link ({ id, type, meta }, included) {
@@ -23,7 +23,7 @@ function link ({ id, type, meta }, included) {
2323
* Helper function for multiple relationships
2424
*
2525
* @param {Object} data The response data object
26-
* @param {Object} included The response included object
26+
* @param {Object[]} included The response included object
2727
* @param {string} key Name of the relationship item
2828
* @private
2929
*/
@@ -41,7 +41,7 @@ function linkArray (data, included, key) {
4141
* Helper function for single relationships
4242
*
4343
* @param {Object} data The response data object
44-
* @param {Object} included The response included object
44+
* @param {Object[]} included The response included object
4545
* @param {string} key Name of the relationship item
4646
* @private
4747
*/
@@ -69,7 +69,7 @@ function linkAttr (data, key) {
6969
* Links relationships to included data
7070
*
7171
* @param {Object} data The response data object
72-
* @param {Object} included The response included object
72+
* @param {Object[]} [included] The response included object
7373
* @returns Parsed data
7474
*
7575
* @example

packages/kitsu-core/src/query/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ function queryFormat (value, key) {
1414
/**
1515
* Constructs a URL query string for JSON:API parameters
1616
*
17-
* @param {Object} params Parameters to parse
18-
* @param {string} prefix Prefix for nested parameters - used internally (default `null`)
17+
* @param {Object} [params] Parameters to parse
18+
* @param {string} [prefix] Prefix for nested parameters - used internally
1919
* @returns {string} URL query string
2020
*
2121
* @example

0 commit comments

Comments
 (0)