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: README.md
+58-2Lines changed: 58 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -216,7 +216,48 @@ Downstream browsers include the same properties as core browsers, as well as the
216
216
217
217
#### `outputFormat`
218
218
219
-
By default, this function returns an `Array` of `Objects` which can be manipulated in Javascript or output to JSON. To return a `String` in CSV format, set `outputFormat` to `csv`:
219
+
By default, this function returns an `Array` of `Objects` which can be manipulated in Javascript or output to JSON.
220
+
221
+
To return an `Object` that nests keys , set `outputFormat` to `object`:
222
+
223
+
```javascript
224
+
getAllVersions({
225
+
outputFormat:"object",
226
+
});
227
+
```
228
+
229
+
In thise case, `getAllVersions()` returns a nested object with the browser [IDs listed below](#list-of-downstream-browsers) as keys, and versions as keys within them:
230
+
231
+
```javascript
232
+
{
233
+
"chrome": {
234
+
"53": {
235
+
"year":2016,
236
+
"wa_compatible":false,
237
+
"release_date":"2016-09-07"
238
+
},
239
+
...
240
+
}
241
+
```
242
+
243
+
Downstream browsers will include extra fields for `engine` and `engine_versions`
244
+
245
+
```javascript
246
+
{
247
+
...
248
+
"webview_android": {
249
+
"53": {
250
+
"year":2016,
251
+
"waCompatible":false,
252
+
"release_date":"2016-09-07",
253
+
"engine":"Blink",
254
+
"engine_version":"53"
255
+
},
256
+
...
257
+
}
258
+
```
259
+
260
+
To return a `String` in CSV format, set `outputFormat` to `csv`:
220
261
221
262
```javascript
222
263
getAllVersions({
@@ -227,7 +268,7 @@ getAllVersions({
227
268
`getAllVersions` returns a `String` with a header row and comma-separated values for each browser version that you can write to a file or pass to another service. Core browsers will have "NULL" as the value for their `engine` and `engine_version`:
0 commit comments