Skip to content

Commit

Permalink
Merge pull request #169 from Inist-CNRS/fix-jsdoc
Browse files Browse the repository at this point in the history
Fix JSDoc
  • Loading branch information
parmentf authored Jul 23, 2021
2 parents e0638e6 + 59bc7f5 commit 7a7f1c2
Show file tree
Hide file tree
Showing 111 changed files with 1,658 additions and 1,530 deletions.
64 changes: 28 additions & 36 deletions docs/plugin-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,13 @@ Returns **[Buffer](https://nodejs.org/api/buffer.html)**

### CSVObject

- **See: CSVParse
**

Take an `Array` of arrays and transform rows into objects.

Each row (Array) is tranformed into an object where keys are the values of
the first row.

See [CSVParse](#csvparse).

Input:

```json
Expand Down Expand Up @@ -95,7 +94,7 @@ Input:
```json
[
["a", "a", "b", "b", "b"],
[1, 2, 3, 4, 5],
[1, 2, 3, 4, 5]
]
```

Expand All @@ -107,7 +106,7 @@ Output:
"a2": 2,
"b1": 3,
"b2": 4,
"b3": 5,
"b3": 5
}]
```

Expand All @@ -119,12 +118,12 @@ Returns **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/

### CSVParse

- **See: <https://github.com/Inist-CNRS/node-csv-string>
**
- **See: CSVObject
**
Take `String` and parse it as CSV to generate arrays.

See:

Take `String` and parse it as CSV to generate arrays
- [CSVObject](#csvobject)
- <https://github.com/Inist-CNRS/node-csv-string>

Input:

Expand Down Expand Up @@ -152,14 +151,13 @@ Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Gl

### CSVString

- **See: CSVObject
**

Take an array of objects and transform row into a string where each field is
separated with a character.

The resulting string is CSV-compliant.

See [CSVObject](#csvobject)

Input:

```json
Expand Down Expand Up @@ -244,11 +242,10 @@ Returns **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G

### JSONParse

- **See: <https://github.com/dominictarr/JSONStream>
**

Parse a `String` to JSON and generate objects.

See <https://github.com/dominictarr/JSONStream>

##### Example 1: with separator

Input:
Expand Down Expand Up @@ -337,11 +334,10 @@ Returns **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G

### OBJFlatten

- **See: <https://www.npmjs.com/package/flat>
**

Flatten an `Object` with a path delimiting character.

See <https://www.npmjs.com/package/flat>

Input:

```json
Expand Down Expand Up @@ -574,11 +570,6 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G

### URLParse

- **See: URLString
**
- **See: <https://nodejs.org/api/url.html>
**

Take an URL `String`, parse it and return `Object`.

Fields of the returned object:
Expand All @@ -597,6 +588,11 @@ Fields of the returned object:

URLString statement convert such an object to a string.

See:

- [URLString](#urlstring)
- <https://nodejs.org/api/url.html>

Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**

### URLStream
Expand Down Expand Up @@ -668,18 +664,14 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G

### URLString

- **See: URLParse
**

Take an `Object` representing an URL and stringify it.

See [URLParse](#urlparse)

Returns **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**

### XMLConvert

- **See: <https://www.npmjs.com/package/xml-mapping>
**

Convert each chunk as XML String to JSON Object

##### Example 1: XML to JSON (default parameters)
Expand Down Expand Up @@ -742,6 +734,8 @@ Output:
]
```

See <https://www.npmjs.com/package/xml-mapping>

#### Parameters

- `invert` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** change conversion (JSON to XML) (optional, default `false`)
Expand All @@ -751,9 +745,6 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G

### XMLParse

- **See: <https://www.npmjs.com/package/xml-splitter>
**

Take `String` as XML input, parse it and split it in multi document at each path found

Input:
Expand All @@ -775,6 +766,8 @@ Output:
["x", "y"]
```

See <https://www.npmjs.com/package/xml-splitter>

#### Parameters

- `separator` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** choose a character for flatten keys (optional, default `"/"`)
Expand All @@ -783,9 +776,6 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G

### XMLString

- **See: XMLParse
**

Transform an `Object` into an XML string.

Input:
Expand All @@ -802,6 +792,8 @@ Output:
]
```

See [XMLParse](#xmlparse)

#### Parameters

- `rootElement` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Root element name for the tag which starts and close the feed (optional, default `"items"`)
Expand Down
Loading

0 comments on commit 7a7f1c2

Please sign in to comment.