diff --git a/api-docs/cloud/ref.yml b/api-docs/cloud/ref.yml index b2dbeaf37..f955da4d7 100644 --- a/api-docs/cloud/ref.yml +++ b/api-docs/cloud/ref.yml @@ -8348,17 +8348,16 @@ paths: `write` rate limits apply. For more information, see [limits and adjustable - quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). + quotas](/influxdb/cloud/account-management/limits/). #### Related guides - - [Delete - data](https://docs.influxdata.com/influxdb/cloud/write-data/delete-data/). + - [Delete data](/influxdb/cloud/write-data/delete-data/). - Learn how to use [delete predicate - syntax](https://docs.influxdata.com/influxdb/cloud/reference/syntax/delete-predicate/). + syntax](/influxdb/cloud/reference/syntax/delete-predicate/). - Learn how InfluxDB handles [deleted tags](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagkeys/) @@ -8457,11 +8456,10 @@ paths: #### Related guides - - [Delete - data](https://docs.influxdata.com/influxdb/cloud/write-data/delete-data/). + - [Delete data](/influxdb/cloud/write-data/delete-data/). - Learn how to use [delete predicate - syntax](https://docs.influxdata.com/influxdb/cloud/reference/syntax/delete-predicate/). + syntax](/influxdb/cloud/reference/syntax/delete-predicate/). required: true responses: '204': @@ -9966,14 +9964,14 @@ paths: `read` rate limits apply. For more information, see [limits and adjustable - quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). + quotas](/influxdb/cloud/account-management/limits/). #### Related guides - [Query with the InfluxDB - API](https://docs.influxdata.com/influxdb/cloud/query-data/execute-queries/influx-api/). + API](/influxdb/cloud/query-data/execute-queries/influx-api/). - [Get started with Flux](https://docs.influxdata.com/flux/v0.x/get-started/) @@ -12463,8 +12461,8 @@ paths: Use this endpoint to send data in [line - protocol](https://docs.influxdata.com/influxdb/cloud/reference/syntax/line-protocol/) - format to InfluxDB. + protocol](/influxdb/cloud/reference/syntax/line-protocol/) format to + InfluxDB. #### InfluxDB Cloud @@ -12504,20 +12502,20 @@ paths: `write` rate limits apply. For more information, see [limits and adjustable - quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). + quotas](/influxdb/cloud/account-management/limits/). #### Related guides - [Write data with the InfluxDB - API](https://docs.influxdata.com/influxdb/cloud/write-data/developer-tools/api). + API](/influxdb/cloud/write-data/developer-tools/api). - [Optimize writes to - InfluxDB](https://docs.influxdata.com/influxdb/cloud/write-data/best-practices/optimize-writes/). + InfluxDB](/influxdb/cloud/write-data/best-practices/optimize-writes/). - [Troubleshoot issues writing - data](https://docs.influxdata.com/influxdb/cloud/write-data/troubleshoot/) + data](/influxdb/cloud/write-data/troubleshoot/) operationId: PostWrite parameters: - $ref: '#/components/parameters/TraceSpan' @@ -12685,7 +12683,7 @@ paths: - [Best practices for optimizing - writes](https://docs.influxdata.com/influxdb/cloud/write-data/best-practices/optimize-writes/). + writes](/influxdb/cloud/write-data/best-practices/optimize-writes/). required: true responses: '204': diff --git a/api-docs/openapi/plugins/decorators/replace-shortcodes.js b/api-docs/openapi/plugins/decorators/replace-shortcodes.js index d700c513b..4b43cc54c 100644 --- a/api-docs/openapi/plugins/decorators/replace-shortcodes.js +++ b/api-docs/openapi/plugins/decorators/replace-shortcodes.js @@ -3,14 +3,12 @@ module.exports = ReplaceShortcodes; function replaceDocsUrl(field) { if(!field) { return } /** Regex to match the URL "shortcode" {{% INFLUXDB_DOCS_URL %}}. - * [^]* matches line breaks (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#using_regular_expression_on_multiple_lines). + * [^]* matches line breaks. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#using_regular_expression_on_multiple_lines */ - const shortcodeRe = /\{\{[^]*%\s*[^]*INFLUXDB_DOCS_URL[^]*\s*[^]*%\}\}/g + const shortcode = /\{\{[^]*%\s*[^]*INFLUXDB_DOCS_URL[^]*\s*[^]*%\}\}/g let replacement = `/influxdb/${process.env.INFLUXDB_VERSION}`; - let replaced = field.replaceAll(shortcodeRe, replacement); - const fullUrl = 'https://docs.influxdata.com/influxdb/'; - replacement = "/influxdb/"; - return replaced.replaceAll(fullUrl, replacement); + return field.replaceAll(shortcode, replacement) + .replaceAll('https://docs.influxdata.com/influxdb/', '/influxdb/'); } /** @type {import('@redocly/openapi-cli').OasDecorator} */ @@ -27,11 +25,21 @@ function docsUrl() { node.description = replaceDocsUrl(node.description); }, }, + Header: { + leave(node, ctx) { + node.description = replaceDocsUrl(node.description); + }, + }, Info: { leave(node, ctx) { node.description = replaceDocsUrl(node.description); }, }, + Operation: { + leave(node, ctx) { + node.description = replaceDocsUrl(node.description); + }, + }, Parameter: { leave(node, ctx) { node.description = replaceDocsUrl(node.description); @@ -42,6 +50,11 @@ function docsUrl() { node.description = replaceDocsUrl(node.description); } }, + RequestBody: { + leave(node, ctx) { + node.description = replaceDocsUrl(node.description); + } + }, Response: { leave(node, ctx) { node.description = replaceDocsUrl(node.description); @@ -57,6 +70,11 @@ function docsUrl() { node.description = replaceDocsUrl(node.description); } }, + Server: { + leave(node, ctx) { + node.description = replaceDocsUrl(node.description); + } + }, Tag: { leave(node, ctx) { node.description = replaceDocsUrl(node.description); @@ -68,7 +86,6 @@ function docsUrl() { } } } - } } diff --git a/api-docs/v2.3/ref.yml b/api-docs/v2.3/ref.yml index 4921795ce..031dc1b36 100644 --- a/api-docs/v2.3/ref.yml +++ b/api-docs/v2.3/ref.yml @@ -7385,7 +7385,7 @@ paths: - [View your runtime server - configuration](https://docs.influxdata.com/influxdb/v2.3/reference/config-options/#view-your-runtime-server-configuration) + configuration](/influxdb/v2.3/reference/config-options/#view-your-runtime-server-configuration) operationId: GetConfig parameters: - $ref: '#/components/parameters/TraceSpan' @@ -8389,7 +8389,7 @@ paths: primitives - **cpu**: (Optional) Program counters sampled from the executing stack. - Include by passing the `cpu` query parameter with a [duration](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#duration) value. + Include by passing the `cpu` query parameter with a [duration](/influxdb/v2.3/reference/glossary/#duration) value. Equivalent to the report from [`GET /debug/pprof/profile?seconds=NUMBER_OF_SECONDS`](#operation/GetDebugPprofProfile). - **goroutine**: All current goroutines @@ -9282,17 +9282,16 @@ paths: `write` rate limits apply. For more information, see [limits and adjustable - quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). + quotas](/influxdb/cloud/account-management/limits/). #### Related guides - - [Delete - data](https://docs.influxdata.com/influxdb/v2.3/write-data/delete-data/). + - [Delete data](/influxdb/v2.3/write-data/delete-data/). - Learn how to use [delete predicate - syntax](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/delete-predicate/). + syntax](/influxdb/v2.3/reference/syntax/delete-predicate/). - Learn how InfluxDB handles [deleted tags](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagkeys/) @@ -9391,11 +9390,10 @@ paths: #### Related guides - - [Delete - data](https://docs.influxdata.com/influxdb/v2.3/write-data/delete-data/). + - [Delete data](/influxdb/v2.3/write-data/delete-data/). - Learn how to use [delete predicate - syntax](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/delete-predicate/). + syntax](/influxdb/v2.3/reference/syntax/delete-predicate/). required: true responses: '204': @@ -9702,13 +9700,13 @@ paths: - For the list of metrics categories, see [InfluxDB OSS - metrics](https://docs.influxdata.com/influxdb/v2.3/reference/internals/metrics/). + metrics](/influxdb/v2.3/reference/internals/metrics/). - Learn how to use InfluxDB to [scrape Prometheus - metrics](https://docs.influxdata.com/influxdb/v2.3write-data/developer-tools/scrape-prometheus-metrics/). + metrics](/influxdb/v2.3write-data/developer-tools/scrape-prometheus-metrics/). - Learn how InfluxDB [parses the Prometheus exposition - format](https://docs.influxdata.com/influxdb/v2.3/reference/prometheus-metrics/). + format](/influxdb/v2.3/reference/prometheus-metrics/). operationId: GetMetrics parameters: - $ref: '#/components/parameters/TraceSpan' @@ -10907,14 +10905,14 @@ paths: `read` rate limits apply. For more information, see [limits and adjustable - quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). + quotas](/influxdb/cloud/account-management/limits/). #### Related guides - [Query with the InfluxDB - API](https://docs.influxdata.com/influxdb/v2.3/query-data/execute-queries/influx-api/). + API](/influxdb/v2.3/query-data/execute-queries/influx-api/). - [Get started with Flux](https://docs.influxdata.com/flux/v0.x/get-started/) @@ -14406,8 +14404,8 @@ paths: Use this endpoint to send data in [line - protocol](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/line-protocol/) - format to InfluxDB. + protocol](/influxdb/v2.3/reference/syntax/line-protocol/) format to + InfluxDB. #### InfluxDB Cloud @@ -14447,20 +14445,20 @@ paths: `write` rate limits apply. For more information, see [limits and adjustable - quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). + quotas](/influxdb/cloud/account-management/limits/). #### Related guides - [Write data with the InfluxDB - API](https://docs.influxdata.com/influxdb/v2.3/write-data/developer-tools/api). + API](/influxdb/v2.3/write-data/developer-tools/api). - [Optimize writes to - InfluxDB](https://docs.influxdata.com/influxdb/v2.3/write-data/best-practices/optimize-writes/). + InfluxDB](/influxdb/v2.3/write-data/best-practices/optimize-writes/). - [Troubleshoot issues writing - data](https://docs.influxdata.com/influxdb/v2.3/write-data/troubleshoot/) + data](/influxdb/v2.3/write-data/troubleshoot/) operationId: PostWrite parameters: - $ref: '#/components/parameters/TraceSpan' @@ -14628,7 +14626,7 @@ paths: - [Best practices for optimizing - writes](https://docs.influxdata.com/influxdb/v2.3/write-data/best-practices/optimize-writes/). + writes](/influxdb/v2.3/write-data/best-practices/optimize-writes/). required: true responses: '204': diff --git a/content/flux/v0.x/release-notes.md b/content/flux/v0.x/release-notes.md index 9ad999327..3b5bd0e4d 100644 --- a/content/flux/v0.x/release-notes.md +++ b/content/flux/v0.x/release-notes.md @@ -10,6 +10,65 @@ aliases: - /influxdb/cloud/reference/release-notes/flux/ --- + +## v0.174.0 [2022-07-05] + +### Features + +- Add coloring highlights to test outputs. +- Promote [`experimental.to()`](/flux/v0.x/stdlib/experimental/to/) to + [`influxdata.influxdb.wideTo()`](/flux/v0.x/stdlib/influxdata/influxdb/wideto/). +- Allow physical plan + [`attributes`](https://github.com/influxdata/flux/blob/master/plan/attributes.go) + to contribute to + [`formatter`](https://github.com/influxdata/flux/blob/master/plan/format.go) + details. +- Add tagging support to Flux tests. +- Add new function [`experimental.catch()`](/flux/v0.x/stdlib/experimental/catch/). +- Add new function [`testing.shouldError()`](flux/v0.x/stdlib/testing/shoulderror/). + +### Bug fixes + +- Update `httpWriter` struct to skip invalid floats. +- Update [`join()`](/flux/v0.x/stdlib/join/) to validate group keys. +- Fix unit tests for [`covariance()`](/flux/v0.x/stdlib/universe/covariance/). +- Update all Flux packages to additionally live as Go packages. + +--- + +## v0.173.0 [2022-06-29] + +### Breaking changes + +- Format scripts with a trailing newline by default when running the formatter. + +### Features + +- Deprecate [`experimental.http.get`](/flux/v0.x/stdlib/experimental/http/get/). +- Deprecate [`experimental.csv.from()`](/flux/v0.x/stdlib/experimental/csv/from/). +- Promote the following functions from `experimental.array` into the + [`array`](/flux/v0.x/stdlib/array) package: + - [`array.concat()`](/flux/v0.x/stdlib/array/concat/) + - [`array.filter()`](/flux/v0.x/stdlib/array/filter/) + - [`array.map()`](/flux/v0.x/stdlib/array/map/) +- Promote the following functions from `experimental.http.requests` into the + [`http.requests`](/flux/v0.x/stdlib/http/requests/) package: + - [`http.requests.do()`](/flux/v0.x/stdlib/http/requests/do/) + - [`http.requests.get()`](/flux/v0.x/stdlib/http/requests/get/) + - [`http.requests.peek()`](/flux/v0.x/stdlib/http/requests/peek/) + - [`http.requests.post()`](/flux/v0.x/stdlib/http/requests/post/) +- Promote `experimental.bitwise` into the [`bitwise`](/flux/v0.x/stdlib/bitwise/) + package. +- Remove all `Test` statements. New statements are written with `TestCase`. +- Format scripts with a trailing newline by default when running the formatter. + +### Bug fixes + +- Return an error if the user modifies group key while using + [`join`](/flux/v0.x/stdlib/join/) + +--- + ## v0.172.0 [2022-06-24] ### Features @@ -116,7 +175,7 @@ aliases: - Add [`experimental.preview()`](/flux/v0.x/stdlib/experimental/preview/). ### Bug fixes -- Update `date.add()` and `date.sub()` to ork correctly with timezones enabled. +- Update `date.add()` and `date.sub()` to work correctly with timezones enabled. - Fix failing continuous integration tests. - Update `hourSelection()` to support overnight time ranges. - Fix logic error in aggregate window planner rule preserve the rule if diff --git a/content/flux/v0.x/stdlib/array/_index.md b/content/flux/v0.x/stdlib/array/_index.md index 915b31405..6214d0028 100644 --- a/content/flux/v0.x/stdlib/array/_index.md +++ b/content/flux/v0.x/stdlib/array/_index.md @@ -1,7 +1,7 @@ --- title: array package description: > - The `array` package provides functions for building tables from Flux arrays. + The `array` package provides functions for manipulating array and building tables from arrays. menu: flux_0_x_ref: name: array @@ -29,7 +29,7 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md -------------------------------------------------------------------------------> -The `array` package provides functions for building tables from Flux arrays. +The `array` package provides functions for manipulating array and building tables from arrays. Import the `array` package: ```js diff --git a/content/flux/v0.x/stdlib/array/concat.md b/content/flux/v0.x/stdlib/array/concat.md new file mode 100644 index 000000000..0117ccb69 --- /dev/null +++ b/content/flux/v0.x/stdlib/array/concat.md @@ -0,0 +1,93 @@ +--- +title: array.concat() function +description: > + `array.concat()` appends two arrays and returns a new array. +menu: + flux_0_x_ref: + name: array.concat + parent: array + identifier: array/concat +weight: 101 + +introduced: 0.173.0 +--- + + + +`array.concat()` appends two arrays and returns a new array. + + + +Neither input array is mutated and a new array is returned. + +##### Function type signature + +```js +(<-arr: [A], v: [A]) => [A] +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### arr + +First array. Default is the piped-forward array (`<-`). + + + +### v +({{< req >}}) +Array to append to the first array. + + + + +## Examples + +### Merge two arrays + +```js +import "array" + +a = [1, 2, 3] +b = [4, 5, 6] + +c = a |> array.concat(v: b) + +// Returns [1, 2, 3, 4, 5, 6] +// Output each value in the array as a row in a table +array.from(rows: c |> array.map(fn: (x) => ({_value: x}))) + +``` + +{{< expand-wrapper >}} +{{% expand "View example output" %}} + +#### Output data + +| _value | +| ------- | +| 1 | +| 2 | +| 3 | +| 4 | +| 5 | +| 6 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/array/filter.md b/content/flux/v0.x/stdlib/array/filter.md new file mode 100644 index 000000000..a27fe5c63 --- /dev/null +++ b/content/flux/v0.x/stdlib/array/filter.md @@ -0,0 +1,95 @@ +--- +title: array.filter() function +description: > + `array.filter()` iterates over an array, evaluates each element with a predicate function, and then returns + a new array with only elements that match the predicate. +menu: + flux_0_x_ref: + name: array.filter + parent: array + identifier: array/filter +weight: 101 + +introduced: 0.173.0 +--- + + + +`array.filter()` iterates over an array, evaluates each element with a predicate function, and then returns +a new array with only elements that match the predicate. + + + +##### Function type signature + +```js +(<-arr: [A], fn: (x: A) => bool) => [A] +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### arr + +Array to filter. Default is the piped-forward array (`<-`). + + + +### fn +({{< req >}}) +Predicate function to evaluate on each element. +The element is represented by `x` in the predicate function. + + + + +## Examples + +### Filter array of integers + +```js +import "array" + +a = [ + 1, + 2, + 3, + 4, + 5, +] +b = a |> array.filter(fn: (x) => x >= 3) + +// b returns [3, 4, 5] +// Output the filtered array as a table +array.from(rows: b |> array.map(fn: (x) => ({_value: x}))) + +``` + +{{< expand-wrapper >}} +{{% expand "View example output" %}} + +#### Output data + +| _value | +| ------- | +| 3 | +| 4 | +| 5 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/array/from.md b/content/flux/v0.x/stdlib/array/from.md index c9ca87a68..26e610c2f 100644 --- a/content/flux/v0.x/stdlib/array/from.md +++ b/content/flux/v0.x/stdlib/array/from.md @@ -62,6 +62,7 @@ import "array" rows = [{foo: "bar", baz: 21.2}, {foo: "bar", baz: 23.8}] array.from(rows: rows) + ``` {{< expand-wrapper >}} @@ -88,5 +89,6 @@ tags = v1.tagValues(bucket: "example-bucket", tag: "host") wildcard_tag = array.from(rows: [{_value: "*"}]) union(tables: [tags, wildcard_tag]) + ``` diff --git a/content/flux/v0.x/stdlib/array/map.md b/content/flux/v0.x/stdlib/array/map.md new file mode 100644 index 000000000..e4265e183 --- /dev/null +++ b/content/flux/v0.x/stdlib/array/map.md @@ -0,0 +1,96 @@ +--- +title: array.map() function +description: > + `array.map()` iterates over an array, applies a function to each element to produce a new element, + and then returns a new array. +menu: + flux_0_x_ref: + name: array.map + parent: array + identifier: array/map +weight: 101 + +introduced: 0.173.0 +--- + + + +`array.map()` iterates over an array, applies a function to each element to produce a new element, +and then returns a new array. + + + +##### Function type signature + +```js +(<-arr: [A], fn: (x: A) => B) => [B] +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### arr + +Array to operate on. Defaults is the piped-forward array (`<-`). + + + +### fn +({{< req >}}) +Function to apply to elements. The element is represented by `x` in the function. + + + + +## Examples + +### Convert an array of integers to an array of records + +```js +import "array" + +a = [ + 1, + 2, + 3, + 4, + 5, +] +b = a |> array.map(fn: (x) => ({_value: x})) + +// b returns [{_value: 1}, {_value: 2}, {_value: 3}, {_value: 4}, {_value: 5}] +// Output the array of records as a table +array.from(rows: b) + +``` + +{{< expand-wrapper >}} +{{% expand "View example output" %}} + +#### Output data + +| _value | +| ------- | +| 1 | +| 2 | +| 3 | +| 4 | +| 5 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/bitwise/_index.md b/content/flux/v0.x/stdlib/bitwise/_index.md new file mode 100644 index 000000000..2d78011dc --- /dev/null +++ b/content/flux/v0.x/stdlib/bitwise/_index.md @@ -0,0 +1,47 @@ +--- +title: bitwise package +description: > + The `bitwise` package provides functions for performing bitwise operations on integers. +menu: + flux_0_x_ref: + name: bitwise + parent: stdlib + identifier: bitwise +weight: 11 +cascade: + flux/v0.x/tags: [bitwise] + introduced: 0.173.0 +--- + + + +The `bitwise` package provides functions for performing bitwise operations on integers. +Import the `bitwise` package: + +```js +import "bitwise" +``` + +All integers are 64 bit integers. + +Functions prefixed with s operate on signed integers (int). +Functions prefixed with u operate on unsigned integers (uint). + + +## Functions + +{{< children type="functions" show="pages" >}} diff --git a/content/flux/v0.x/stdlib/bitwise/sand.md b/content/flux/v0.x/stdlib/bitwise/sand.md new file mode 100644 index 000000000..25db7b9cc --- /dev/null +++ b/content/flux/v0.x/stdlib/bitwise/sand.md @@ -0,0 +1,128 @@ +--- +title: bitwise.sand() function +description: > + `bitwise.sand()` performs the bitwise operation, `a AND b`, with integers. +menu: + flux_0_x_ref: + name: bitwise.sand + parent: bitwise + identifier: bitwise/sand +weight: 101 +--- + + + +`bitwise.sand()` performs the bitwise operation, `a AND b`, with integers. + + + +##### Function type signature + +```js +(a: int, b: int) => int +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### a +({{< req >}}) +Left hand operand. + + + +### b +({{< req >}}) +Right hand operand. + + + + +## Examples + +- [Perform a bitwise AND operation](#perform-a-bitwise-and-operation) +- [Perform a bitwise AND operation on a stream of tables](#perform-a-bitwise-and-operation-on-a-stream-of-tables) + +### Perform a bitwise AND operation + +```js +import "bitwise" + +bitwise.sand(a: 1234, b: 4567)// Returns 210 + + +``` + + +### Perform a bitwise AND operation on a stream of tables + +```js +import "bitwise" +import "sampledata" + +sampledata.int() + |> map(fn: (r) => ({r with _value: bitwise.sand(a: r._value, b: 3)})) + +``` + +{{< expand-wrapper >}} +{{% expand "View example input and ouput" %}} + +#### Input data + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | -2 | t1 | +| 2021-01-01T00:00:10Z | 10 | t1 | +| 2021-01-01T00:00:20Z | 7 | t1 | +| 2021-01-01T00:00:30Z | 17 | t1 | +| 2021-01-01T00:00:40Z | 15 | t1 | +| 2021-01-01T00:00:50Z | 4 | t1 | + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | 19 | t2 | +| 2021-01-01T00:00:10Z | 4 | t2 | +| 2021-01-01T00:00:20Z | -3 | t2 | +| 2021-01-01T00:00:30Z | 19 | t2 | +| 2021-01-01T00:00:40Z | 13 | t2 | +| 2021-01-01T00:00:50Z | 1 | t2 | + + +#### Output data + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | 2 | t1 | +| 2021-01-01T00:00:10Z | 2 | t1 | +| 2021-01-01T00:00:20Z | 3 | t1 | +| 2021-01-01T00:00:30Z | 1 | t1 | +| 2021-01-01T00:00:40Z | 3 | t1 | +| 2021-01-01T00:00:50Z | 0 | t1 | + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | 3 | t2 | +| 2021-01-01T00:00:10Z | 0 | t2 | +| 2021-01-01T00:00:20Z | 1 | t2 | +| 2021-01-01T00:00:30Z | 3 | t2 | +| 2021-01-01T00:00:40Z | 1 | t2 | +| 2021-01-01T00:00:50Z | 1 | t2 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/bitwise/sclear.md b/content/flux/v0.x/stdlib/bitwise/sclear.md new file mode 100644 index 000000000..8eeca7019 --- /dev/null +++ b/content/flux/v0.x/stdlib/bitwise/sclear.md @@ -0,0 +1,130 @@ +--- +title: bitwise.sclear() function +description: > + `bitwise.sclear()` performs the bitwise operation `a AND NOT b`. + Both `a` and `b` are integers. +menu: + flux_0_x_ref: + name: bitwise.sclear + parent: bitwise + identifier: bitwise/sclear +weight: 101 +--- + + + +`bitwise.sclear()` performs the bitwise operation `a AND NOT b`. +Both `a` and `b` are integers. + + + +##### Function type signature + +```js +(a: int, b: int) => int +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### a +({{< req >}}) +Left hand operand. + + + +### b +({{< req >}}) +Bits to clear. + + + + +## Examples + +- [Perform a bitwise AND NOT operation](#perform-a-bitwise-and-not-operation) +- [Perform a bitwise AND NOT operation on a stream of tables](#perform-a-bitwise-and-not-operation-on-a-stream-of-tables) + +### Perform a bitwise AND NOT operation + +```js +import "bitwise" + +bitwise.sclear(a: 1234, b: 4567)// Returns 1024 + + +``` + + +### Perform a bitwise AND NOT operation on a stream of tables + +```js +import "bitwise" +import "sampledata" + +sampledata.int() + |> map(fn: (r) => ({r with _value: bitwise.sclear(a: r._value, b: 3)})) + +``` + +{{< expand-wrapper >}} +{{% expand "View example input and ouput" %}} + +#### Input data + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | -2 | t1 | +| 2021-01-01T00:00:10Z | 10 | t1 | +| 2021-01-01T00:00:20Z | 7 | t1 | +| 2021-01-01T00:00:30Z | 17 | t1 | +| 2021-01-01T00:00:40Z | 15 | t1 | +| 2021-01-01T00:00:50Z | 4 | t1 | + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | 19 | t2 | +| 2021-01-01T00:00:10Z | 4 | t2 | +| 2021-01-01T00:00:20Z | -3 | t2 | +| 2021-01-01T00:00:30Z | 19 | t2 | +| 2021-01-01T00:00:40Z | 13 | t2 | +| 2021-01-01T00:00:50Z | 1 | t2 | + + +#### Output data + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | -4 | t1 | +| 2021-01-01T00:00:10Z | 8 | t1 | +| 2021-01-01T00:00:20Z | 4 | t1 | +| 2021-01-01T00:00:30Z | 16 | t1 | +| 2021-01-01T00:00:40Z | 12 | t1 | +| 2021-01-01T00:00:50Z | 4 | t1 | + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | 16 | t2 | +| 2021-01-01T00:00:10Z | 4 | t2 | +| 2021-01-01T00:00:20Z | -4 | t2 | +| 2021-01-01T00:00:30Z | 16 | t2 | +| 2021-01-01T00:00:40Z | 12 | t2 | +| 2021-01-01T00:00:50Z | 0 | t2 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/bitwise/slshift.md b/content/flux/v0.x/stdlib/bitwise/slshift.md new file mode 100644 index 000000000..66fdcdd39 --- /dev/null +++ b/content/flux/v0.x/stdlib/bitwise/slshift.md @@ -0,0 +1,130 @@ +--- +title: bitwise.slshift() function +description: > + `bitwise.slshift()` shifts the bits in `a` left by `b` bits. + Both `a` and `b` are integers. +menu: + flux_0_x_ref: + name: bitwise.slshift + parent: bitwise + identifier: bitwise/slshift +weight: 101 +--- + + + +`bitwise.slshift()` shifts the bits in `a` left by `b` bits. +Both `a` and `b` are integers. + + + +##### Function type signature + +```js +(a: int, b: int) => int +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### a +({{< req >}}) +Left hand operand. + + + +### b +({{< req >}}) +Number of bits to shift. + + + + +## Examples + +- [Shift bits left in an integer](#shift-bits-left-in-an-integer) +- [Shift bits left in integers in a stream of tables](#shift-bits-left-in-integers-in-a-stream-of-tables) + +### Shift bits left in an integer + +```js +import "bitwise" + +bitwise.slshift(a: 1234, b: 2)// Returns 4936 + + +``` + + +### Shift bits left in integers in a stream of tables + +```js +import "bitwise" +import "sampledata" + +sampledata.int() + |> map(fn: (r) => ({r with _value: bitwise.slshift(a: r._value, b: 3)})) + +``` + +{{< expand-wrapper >}} +{{% expand "View example input and ouput" %}} + +#### Input data + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | -2 | t1 | +| 2021-01-01T00:00:10Z | 10 | t1 | +| 2021-01-01T00:00:20Z | 7 | t1 | +| 2021-01-01T00:00:30Z | 17 | t1 | +| 2021-01-01T00:00:40Z | 15 | t1 | +| 2021-01-01T00:00:50Z | 4 | t1 | + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | 19 | t2 | +| 2021-01-01T00:00:10Z | 4 | t2 | +| 2021-01-01T00:00:20Z | -3 | t2 | +| 2021-01-01T00:00:30Z | 19 | t2 | +| 2021-01-01T00:00:40Z | 13 | t2 | +| 2021-01-01T00:00:50Z | 1 | t2 | + + +#### Output data + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | -16 | t1 | +| 2021-01-01T00:00:10Z | 80 | t1 | +| 2021-01-01T00:00:20Z | 56 | t1 | +| 2021-01-01T00:00:30Z | 136 | t1 | +| 2021-01-01T00:00:40Z | 120 | t1 | +| 2021-01-01T00:00:50Z | 32 | t1 | + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | 152 | t2 | +| 2021-01-01T00:00:10Z | 32 | t2 | +| 2021-01-01T00:00:20Z | -24 | t2 | +| 2021-01-01T00:00:30Z | 152 | t2 | +| 2021-01-01T00:00:40Z | 104 | t2 | +| 2021-01-01T00:00:50Z | 8 | t2 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/bitwise/snot.md b/content/flux/v0.x/stdlib/bitwise/snot.md new file mode 100644 index 000000000..5f5da8ba5 --- /dev/null +++ b/content/flux/v0.x/stdlib/bitwise/snot.md @@ -0,0 +1,122 @@ +--- +title: bitwise.snot() function +description: > + `bitwise.snot()` inverts every bit in `a`, an integer. +menu: + flux_0_x_ref: + name: bitwise.snot + parent: bitwise + identifier: bitwise/snot +weight: 101 +--- + + + +`bitwise.snot()` inverts every bit in `a`, an integer. + + + +##### Function type signature + +```js +(a: int) => int +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### a +({{< req >}}) +Integer to invert. + + + + +## Examples + +- [Invert bits in an integer](#invert-bits-in-an-integer) +- [Invert bits in integers in a stream of tables](#invert-bits-in-integers-in-a-stream-of-tables) + +### Invert bits in an integer + +```js +import "bitwise" + +bitwise.snot(a: 1234)// Returns -1235 + + +``` + + +### Invert bits in integers in a stream of tables + +```js +import "bitwise" +import "sampledata" + +sampledata.int() + |> map(fn: (r) => ({r with _value: bitwise.snot(a: r._value)})) + +``` + +{{< expand-wrapper >}} +{{% expand "View example input and ouput" %}} + +#### Input data + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | -2 | t1 | +| 2021-01-01T00:00:10Z | 10 | t1 | +| 2021-01-01T00:00:20Z | 7 | t1 | +| 2021-01-01T00:00:30Z | 17 | t1 | +| 2021-01-01T00:00:40Z | 15 | t1 | +| 2021-01-01T00:00:50Z | 4 | t1 | + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | 19 | t2 | +| 2021-01-01T00:00:10Z | 4 | t2 | +| 2021-01-01T00:00:20Z | -3 | t2 | +| 2021-01-01T00:00:30Z | 19 | t2 | +| 2021-01-01T00:00:40Z | 13 | t2 | +| 2021-01-01T00:00:50Z | 1 | t2 | + + +#### Output data + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | 1 | t1 | +| 2021-01-01T00:00:10Z | -11 | t1 | +| 2021-01-01T00:00:20Z | -8 | t1 | +| 2021-01-01T00:00:30Z | -18 | t1 | +| 2021-01-01T00:00:40Z | -16 | t1 | +| 2021-01-01T00:00:50Z | -5 | t1 | + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | -20 | t2 | +| 2021-01-01T00:00:10Z | -5 | t2 | +| 2021-01-01T00:00:20Z | 2 | t2 | +| 2021-01-01T00:00:30Z | -20 | t2 | +| 2021-01-01T00:00:40Z | -14 | t2 | +| 2021-01-01T00:00:50Z | -2 | t2 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/bitwise/sor.md b/content/flux/v0.x/stdlib/bitwise/sor.md new file mode 100644 index 000000000..000bbdb40 --- /dev/null +++ b/content/flux/v0.x/stdlib/bitwise/sor.md @@ -0,0 +1,128 @@ +--- +title: bitwise.sor() function +description: > + `bitwise.sor()` performs the bitwise operation, `a OR b`, with integers. +menu: + flux_0_x_ref: + name: bitwise.sor + parent: bitwise + identifier: bitwise/sor +weight: 101 +--- + + + +`bitwise.sor()` performs the bitwise operation, `a OR b`, with integers. + + + +##### Function type signature + +```js +(a: int, b: int) => int +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### a +({{< req >}}) +Left hand operand. + + + +### b +({{< req >}}) +Right hand operand. + + + + +## Examples + +- [Perform a bitwise OR operation](#perform-a-bitwise-or-operation) +- [Perform a bitwise OR operation on a stream of tables](#perform-a-bitwise-or-operation-on-a-stream-of-tables) + +### Perform a bitwise OR operation + +```js +import "bitwise" + +bitwise.sor(a: 1234, b: 4567)// Returns 5591 + + +``` + + +### Perform a bitwise OR operation on a stream of tables + +```js +import "bitwise" +import "sampledata" + +sampledata.int() + |> map(fn: (r) => ({r with _value: bitwise.sor(a: r._value, b: 3)})) + +``` + +{{< expand-wrapper >}} +{{% expand "View example input and ouput" %}} + +#### Input data + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | -2 | t1 | +| 2021-01-01T00:00:10Z | 10 | t1 | +| 2021-01-01T00:00:20Z | 7 | t1 | +| 2021-01-01T00:00:30Z | 17 | t1 | +| 2021-01-01T00:00:40Z | 15 | t1 | +| 2021-01-01T00:00:50Z | 4 | t1 | + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | 19 | t2 | +| 2021-01-01T00:00:10Z | 4 | t2 | +| 2021-01-01T00:00:20Z | -3 | t2 | +| 2021-01-01T00:00:30Z | 19 | t2 | +| 2021-01-01T00:00:40Z | 13 | t2 | +| 2021-01-01T00:00:50Z | 1 | t2 | + + +#### Output data + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | -1 | t1 | +| 2021-01-01T00:00:10Z | 11 | t1 | +| 2021-01-01T00:00:20Z | 7 | t1 | +| 2021-01-01T00:00:30Z | 19 | t1 | +| 2021-01-01T00:00:40Z | 15 | t1 | +| 2021-01-01T00:00:50Z | 7 | t1 | + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | 19 | t2 | +| 2021-01-01T00:00:10Z | 7 | t2 | +| 2021-01-01T00:00:20Z | -1 | t2 | +| 2021-01-01T00:00:30Z | 19 | t2 | +| 2021-01-01T00:00:40Z | 15 | t2 | +| 2021-01-01T00:00:50Z | 3 | t2 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/bitwise/srshift.md b/content/flux/v0.x/stdlib/bitwise/srshift.md new file mode 100644 index 000000000..c2bc09d31 --- /dev/null +++ b/content/flux/v0.x/stdlib/bitwise/srshift.md @@ -0,0 +1,130 @@ +--- +title: bitwise.srshift() function +description: > + `bitwise.srshift()` shifts the bits in `a` right by `b` bits. + Both `a` and `b` are integers. +menu: + flux_0_x_ref: + name: bitwise.srshift + parent: bitwise + identifier: bitwise/srshift +weight: 101 +--- + + + +`bitwise.srshift()` shifts the bits in `a` right by `b` bits. +Both `a` and `b` are integers. + + + +##### Function type signature + +```js +(a: int, b: int) => int +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### a +({{< req >}}) +Left hand operand. + + + +### b +({{< req >}}) +Number of bits to shift. + + + + +## Examples + +- [Shift bits right in an integer](#shift-bits-right-in-an-integer) +- [Shift bits right in integers in a stream of tables](#shift-bits-right-in-integers-in-a-stream-of-tables) + +### Shift bits right in an integer + +```js +import "bitwise" + +bitwise.srshift(a: 1234, b: 2)// Returns 308 + + +``` + + +### Shift bits right in integers in a stream of tables + +```js +import "bitwise" +import "sampledata" + +sampledata.int() + |> map(fn: (r) => ({r with _value: bitwise.srshift(a: r._value, b: 3)})) + +``` + +{{< expand-wrapper >}} +{{% expand "View example input and ouput" %}} + +#### Input data + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | -2 | t1 | +| 2021-01-01T00:00:10Z | 10 | t1 | +| 2021-01-01T00:00:20Z | 7 | t1 | +| 2021-01-01T00:00:30Z | 17 | t1 | +| 2021-01-01T00:00:40Z | 15 | t1 | +| 2021-01-01T00:00:50Z | 4 | t1 | + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | 19 | t2 | +| 2021-01-01T00:00:10Z | 4 | t2 | +| 2021-01-01T00:00:20Z | -3 | t2 | +| 2021-01-01T00:00:30Z | 19 | t2 | +| 2021-01-01T00:00:40Z | 13 | t2 | +| 2021-01-01T00:00:50Z | 1 | t2 | + + +#### Output data + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | -1 | t1 | +| 2021-01-01T00:00:10Z | 1 | t1 | +| 2021-01-01T00:00:20Z | 0 | t1 | +| 2021-01-01T00:00:30Z | 2 | t1 | +| 2021-01-01T00:00:40Z | 1 | t1 | +| 2021-01-01T00:00:50Z | 0 | t1 | + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | 2 | t2 | +| 2021-01-01T00:00:10Z | 0 | t2 | +| 2021-01-01T00:00:20Z | -1 | t2 | +| 2021-01-01T00:00:30Z | 2 | t2 | +| 2021-01-01T00:00:40Z | 1 | t2 | +| 2021-01-01T00:00:50Z | 0 | t2 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/bitwise/sxor.md b/content/flux/v0.x/stdlib/bitwise/sxor.md new file mode 100644 index 000000000..819539a0b --- /dev/null +++ b/content/flux/v0.x/stdlib/bitwise/sxor.md @@ -0,0 +1,128 @@ +--- +title: bitwise.sxor() function +description: > + `bitwise.sxor()` performs the bitwise operation, `a XOR b`, with integers. +menu: + flux_0_x_ref: + name: bitwise.sxor + parent: bitwise + identifier: bitwise/sxor +weight: 101 +--- + + + +`bitwise.sxor()` performs the bitwise operation, `a XOR b`, with integers. + + + +##### Function type signature + +```js +(a: int, b: int) => int +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### a +({{< req >}}) +Left hand operand. + + + +### b +({{< req >}}) +Right hand operand. + + + + +## Examples + +- [Perform a bitwise XOR operation](#perform-a-bitwise-xor-operation) +- [Perform a bitwise XOR operation on a stream of tables](#perform-a-bitwise-xor-operation-on-a-stream-of-tables) + +### Perform a bitwise XOR operation + +```js +import "bitwise" + +bitwise.sxor(a: 1234, b: 4567)// Returns 5381 + + +``` + + +### Perform a bitwise XOR operation on a stream of tables + +```js +import "bitwise" +import "sampledata" + +sampledata.int() + |> map(fn: (r) => ({r with _value: bitwise.sxor(a: r._value, b: 3)})) + +``` + +{{< expand-wrapper >}} +{{% expand "View example input and ouput" %}} + +#### Input data + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | -2 | t1 | +| 2021-01-01T00:00:10Z | 10 | t1 | +| 2021-01-01T00:00:20Z | 7 | t1 | +| 2021-01-01T00:00:30Z | 17 | t1 | +| 2021-01-01T00:00:40Z | 15 | t1 | +| 2021-01-01T00:00:50Z | 4 | t1 | + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | 19 | t2 | +| 2021-01-01T00:00:10Z | 4 | t2 | +| 2021-01-01T00:00:20Z | -3 | t2 | +| 2021-01-01T00:00:30Z | 19 | t2 | +| 2021-01-01T00:00:40Z | 13 | t2 | +| 2021-01-01T00:00:50Z | 1 | t2 | + + +#### Output data + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | -3 | t1 | +| 2021-01-01T00:00:10Z | 9 | t1 | +| 2021-01-01T00:00:20Z | 4 | t1 | +| 2021-01-01T00:00:30Z | 18 | t1 | +| 2021-01-01T00:00:40Z | 12 | t1 | +| 2021-01-01T00:00:50Z | 7 | t1 | + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | 16 | t2 | +| 2021-01-01T00:00:10Z | 7 | t2 | +| 2021-01-01T00:00:20Z | -2 | t2 | +| 2021-01-01T00:00:30Z | 16 | t2 | +| 2021-01-01T00:00:40Z | 14 | t2 | +| 2021-01-01T00:00:50Z | 2 | t2 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/bitwise/uand.md b/content/flux/v0.x/stdlib/bitwise/uand.md new file mode 100644 index 000000000..fe859540e --- /dev/null +++ b/content/flux/v0.x/stdlib/bitwise/uand.md @@ -0,0 +1,128 @@ +--- +title: bitwise.uand() function +description: > + `bitwise.uand()` performs the bitwise operation, `a AND b`, with unsigned integers. +menu: + flux_0_x_ref: + name: bitwise.uand + parent: bitwise + identifier: bitwise/uand +weight: 101 +--- + + + +`bitwise.uand()` performs the bitwise operation, `a AND b`, with unsigned integers. + + + +##### Function type signature + +```js +(a: uint, b: uint) => uint +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### a +({{< req >}}) +Left hand operand. + + + +### b +({{< req >}}) +Right hand operand. + + + + +## Examples + +- [Perform a bitwise AND operation](#perform-a-bitwise-and-operation) +- [Perform a bitwise AND operation on a stream of tables](#perform-a-bitwise-and-operation-on-a-stream-of-tables) + +### Perform a bitwise AND operation + +```js +import "bitwise" + +bitwise.uand(a: uint(v: 1234), b: uint(v: 4567))// Returns 210 (uint) + + +``` + + +### Perform a bitwise AND operation on a stream of tables + +```js +import "bitwise" +import "sampledata" + +sampledata.uint() + |> map(fn: (r) => ({r with _value: bitwise.uand(a: r._value, b: uint(v: 3))})) + +``` + +{{< expand-wrapper >}} +{{% expand "View example input and ouput" %}} + +#### Input data + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 18446744073709551614 | t1 | +| 2021-01-01T00:00:10Z | 10 | t1 | +| 2021-01-01T00:00:20Z | 7 | t1 | +| 2021-01-01T00:00:30Z | 17 | t1 | +| 2021-01-01T00:00:40Z | 15 | t1 | +| 2021-01-01T00:00:50Z | 4 | t1 | + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 19 | t2 | +| 2021-01-01T00:00:10Z | 4 | t2 | +| 2021-01-01T00:00:20Z | 18446744073709551613 | t2 | +| 2021-01-01T00:00:30Z | 19 | t2 | +| 2021-01-01T00:00:40Z | 13 | t2 | +| 2021-01-01T00:00:50Z | 1 | t2 | + + +#### Output data + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | 2 | t1 | +| 2021-01-01T00:00:10Z | 2 | t1 | +| 2021-01-01T00:00:20Z | 3 | t1 | +| 2021-01-01T00:00:30Z | 1 | t1 | +| 2021-01-01T00:00:40Z | 3 | t1 | +| 2021-01-01T00:00:50Z | 0 | t1 | + +| _time | _value | *tag | +| -------------------- | ------- | ---- | +| 2021-01-01T00:00:00Z | 3 | t2 | +| 2021-01-01T00:00:10Z | 0 | t2 | +| 2021-01-01T00:00:20Z | 1 | t2 | +| 2021-01-01T00:00:30Z | 3 | t2 | +| 2021-01-01T00:00:40Z | 1 | t2 | +| 2021-01-01T00:00:50Z | 1 | t2 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/bitwise/uclear.md b/content/flux/v0.x/stdlib/bitwise/uclear.md new file mode 100644 index 000000000..0c0b4d06f --- /dev/null +++ b/content/flux/v0.x/stdlib/bitwise/uclear.md @@ -0,0 +1,128 @@ +--- +title: bitwise.uclear() function +description: > + `bitwise.uclear()` performs the bitwise operation `a AND NOT b`, with unsigned integers. +menu: + flux_0_x_ref: + name: bitwise.uclear + parent: bitwise + identifier: bitwise/uclear +weight: 101 +--- + + + +`bitwise.uclear()` performs the bitwise operation `a AND NOT b`, with unsigned integers. + + + +##### Function type signature + +```js +(a: uint, b: uint) => uint +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### a +({{< req >}}) +Left hand operand. + + + +### b +({{< req >}}) +Bits to clear. + + + + +## Examples + +- [Perform a bitwise AND NOT operation](#perform-a-bitwise-and-not-operation) +- [Perform a bitwise AND NOT operation on a stream of tables](#perform-a-bitwise-and-not-operation-on-a-stream-of-tables) + +### Perform a bitwise AND NOT operation + +```js +import "bitwise" + +bitwise.uclear(a: uint(v: 1234), b: uint(v: 4567))// Returns 1024 (uint) + + +``` + + +### Perform a bitwise AND NOT operation on a stream of tables + +```js +import "bitwise" +import "sampledata" + +sampledata.uint() + |> map(fn: (r) => ({r with _value: bitwise.uclear(a: r._value, b: uint(v: 3))})) + +``` + +{{< expand-wrapper >}} +{{% expand "View example input and ouput" %}} + +#### Input data + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 18446744073709551614 | t1 | +| 2021-01-01T00:00:10Z | 10 | t1 | +| 2021-01-01T00:00:20Z | 7 | t1 | +| 2021-01-01T00:00:30Z | 17 | t1 | +| 2021-01-01T00:00:40Z | 15 | t1 | +| 2021-01-01T00:00:50Z | 4 | t1 | + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 19 | t2 | +| 2021-01-01T00:00:10Z | 4 | t2 | +| 2021-01-01T00:00:20Z | 18446744073709551613 | t2 | +| 2021-01-01T00:00:30Z | 19 | t2 | +| 2021-01-01T00:00:40Z | 13 | t2 | +| 2021-01-01T00:00:50Z | 1 | t2 | + + +#### Output data + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 18446744073709551612 | t1 | +| 2021-01-01T00:00:10Z | 8 | t1 | +| 2021-01-01T00:00:20Z | 4 | t1 | +| 2021-01-01T00:00:30Z | 16 | t1 | +| 2021-01-01T00:00:40Z | 12 | t1 | +| 2021-01-01T00:00:50Z | 4 | t1 | + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 16 | t2 | +| 2021-01-01T00:00:10Z | 4 | t2 | +| 2021-01-01T00:00:20Z | 18446744073709551612 | t2 | +| 2021-01-01T00:00:30Z | 16 | t2 | +| 2021-01-01T00:00:40Z | 12 | t2 | +| 2021-01-01T00:00:50Z | 0 | t2 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/bitwise/ulshift.md b/content/flux/v0.x/stdlib/bitwise/ulshift.md new file mode 100644 index 000000000..6ae526d40 --- /dev/null +++ b/content/flux/v0.x/stdlib/bitwise/ulshift.md @@ -0,0 +1,130 @@ +--- +title: bitwise.ulshift() function +description: > + `bitwise.ulshift()` shifts the bits in `a` left by `b` bits. + Both `a` and `b` are unsigned integers. +menu: + flux_0_x_ref: + name: bitwise.ulshift + parent: bitwise + identifier: bitwise/ulshift +weight: 101 +--- + + + +`bitwise.ulshift()` shifts the bits in `a` left by `b` bits. +Both `a` and `b` are unsigned integers. + + + +##### Function type signature + +```js +(a: uint, b: uint) => uint +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### a +({{< req >}}) +Left hand operand. + + + +### b +({{< req >}}) +Number of bits to shift. + + + + +## Examples + +- [Shift bits left in an unsigned integer](#shift-bits-left-in-an-unsigned-integer) +- [Shift bits left in unsigned integers in a stream of tables](#shift-bits-left-in-unsigned-integers-in-a-stream-of-tables) + +### Shift bits left in an unsigned integer + +```js +import "bitwise" + +bitwise.ulshift(a: uint(v: 1234), b: uint(v: 2))// Returns 4936 (uint) + + +``` + + +### Shift bits left in unsigned integers in a stream of tables + +```js +import "bitwise" +import "sampledata" + +sampledata.uint() + |> map(fn: (r) => ({r with _value: bitwise.ulshift(a: r._value, b: uint(v: 3))})) + +``` + +{{< expand-wrapper >}} +{{% expand "View example input and ouput" %}} + +#### Input data + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 18446744073709551614 | t1 | +| 2021-01-01T00:00:10Z | 10 | t1 | +| 2021-01-01T00:00:20Z | 7 | t1 | +| 2021-01-01T00:00:30Z | 17 | t1 | +| 2021-01-01T00:00:40Z | 15 | t1 | +| 2021-01-01T00:00:50Z | 4 | t1 | + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 19 | t2 | +| 2021-01-01T00:00:10Z | 4 | t2 | +| 2021-01-01T00:00:20Z | 18446744073709551613 | t2 | +| 2021-01-01T00:00:30Z | 19 | t2 | +| 2021-01-01T00:00:40Z | 13 | t2 | +| 2021-01-01T00:00:50Z | 1 | t2 | + + +#### Output data + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 18446744073709551600 | t1 | +| 2021-01-01T00:00:10Z | 80 | t1 | +| 2021-01-01T00:00:20Z | 56 | t1 | +| 2021-01-01T00:00:30Z | 136 | t1 | +| 2021-01-01T00:00:40Z | 120 | t1 | +| 2021-01-01T00:00:50Z | 32 | t1 | + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 152 | t2 | +| 2021-01-01T00:00:10Z | 32 | t2 | +| 2021-01-01T00:00:20Z | 18446744073709551592 | t2 | +| 2021-01-01T00:00:30Z | 152 | t2 | +| 2021-01-01T00:00:40Z | 104 | t2 | +| 2021-01-01T00:00:50Z | 8 | t2 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/bitwise/unot.md b/content/flux/v0.x/stdlib/bitwise/unot.md new file mode 100644 index 000000000..cb20817a8 --- /dev/null +++ b/content/flux/v0.x/stdlib/bitwise/unot.md @@ -0,0 +1,122 @@ +--- +title: bitwise.unot() function +description: > + `bitwise.unot()` inverts every bit in `a`, an unsigned integer. +menu: + flux_0_x_ref: + name: bitwise.unot + parent: bitwise + identifier: bitwise/unot +weight: 101 +--- + + + +`bitwise.unot()` inverts every bit in `a`, an unsigned integer. + + + +##### Function type signature + +```js +(a: uint) => uint +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### a +({{< req >}}) +Unsigned integer to invert. + + + + +## Examples + +- [Invert bits in an unsigned integer](#invert-bits-in-an-unsigned-integer) +- [Invert bits in unsigned integers in a stream of tables](#invert-bits-in-unsigned-integers-in-a-stream-of-tables) + +### Invert bits in an unsigned integer + +```js +import "bitwise" + +bitwise.unot(a: uint(v: 1234))// Returns 18446744073709550381 (uint) + + +``` + + +### Invert bits in unsigned integers in a stream of tables + +```js +import "bitwise" +import "sampledata" + +sampledata.uint() + |> map(fn: (r) => ({r with _value: bitwise.unot(a: r._value)})) + +``` + +{{< expand-wrapper >}} +{{% expand "View example input and ouput" %}} + +#### Input data + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 18446744073709551614 | t1 | +| 2021-01-01T00:00:10Z | 10 | t1 | +| 2021-01-01T00:00:20Z | 7 | t1 | +| 2021-01-01T00:00:30Z | 17 | t1 | +| 2021-01-01T00:00:40Z | 15 | t1 | +| 2021-01-01T00:00:50Z | 4 | t1 | + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 19 | t2 | +| 2021-01-01T00:00:10Z | 4 | t2 | +| 2021-01-01T00:00:20Z | 18446744073709551613 | t2 | +| 2021-01-01T00:00:30Z | 19 | t2 | +| 2021-01-01T00:00:40Z | 13 | t2 | +| 2021-01-01T00:00:50Z | 1 | t2 | + + +#### Output data + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 1 | t1 | +| 2021-01-01T00:00:10Z | 18446744073709551605 | t1 | +| 2021-01-01T00:00:20Z | 18446744073709551608 | t1 | +| 2021-01-01T00:00:30Z | 18446744073709551598 | t1 | +| 2021-01-01T00:00:40Z | 18446744073709551600 | t1 | +| 2021-01-01T00:00:50Z | 18446744073709551611 | t1 | + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 18446744073709551596 | t2 | +| 2021-01-01T00:00:10Z | 18446744073709551611 | t2 | +| 2021-01-01T00:00:20Z | 2 | t2 | +| 2021-01-01T00:00:30Z | 18446744073709551596 | t2 | +| 2021-01-01T00:00:40Z | 18446744073709551602 | t2 | +| 2021-01-01T00:00:50Z | 18446744073709551614 | t2 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/bitwise/uor.md b/content/flux/v0.x/stdlib/bitwise/uor.md new file mode 100644 index 000000000..387d46e74 --- /dev/null +++ b/content/flux/v0.x/stdlib/bitwise/uor.md @@ -0,0 +1,128 @@ +--- +title: bitwise.uor() function +description: > + `bitwise.uor()` performs the bitwise operation, `a OR b`, with unsigned integers. +menu: + flux_0_x_ref: + name: bitwise.uor + parent: bitwise + identifier: bitwise/uor +weight: 101 +--- + + + +`bitwise.uor()` performs the bitwise operation, `a OR b`, with unsigned integers. + + + +##### Function type signature + +```js +(a: uint, b: uint) => uint +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### a +({{< req >}}) +Left hand operand. + + + +### b +({{< req >}}) +Right hand operand. + + + + +## Examples + +- [Perform a bitwise OR operation](#perform-a-bitwise-or-operation) +- [Perform a bitwise OR operation on a stream of tables](#perform-a-bitwise-or-operation-on-a-stream-of-tables) + +### Perform a bitwise OR operation + +```js +import "bitwise" + +bitwise.uor(a: uint(v: 1234), b: uint(v: 4567))// Returns 5591 (uint) + + +``` + + +### Perform a bitwise OR operation on a stream of tables + +```js +import "bitwise" +import "sampledata" + +sampledata.uint() + |> map(fn: (r) => ({r with _value: bitwise.uor(a: r._value, b: uint(v: 3))})) + +``` + +{{< expand-wrapper >}} +{{% expand "View example input and ouput" %}} + +#### Input data + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 18446744073709551614 | t1 | +| 2021-01-01T00:00:10Z | 10 | t1 | +| 2021-01-01T00:00:20Z | 7 | t1 | +| 2021-01-01T00:00:30Z | 17 | t1 | +| 2021-01-01T00:00:40Z | 15 | t1 | +| 2021-01-01T00:00:50Z | 4 | t1 | + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 19 | t2 | +| 2021-01-01T00:00:10Z | 4 | t2 | +| 2021-01-01T00:00:20Z | 18446744073709551613 | t2 | +| 2021-01-01T00:00:30Z | 19 | t2 | +| 2021-01-01T00:00:40Z | 13 | t2 | +| 2021-01-01T00:00:50Z | 1 | t2 | + + +#### Output data + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 18446744073709551615 | t1 | +| 2021-01-01T00:00:10Z | 11 | t1 | +| 2021-01-01T00:00:20Z | 7 | t1 | +| 2021-01-01T00:00:30Z | 19 | t1 | +| 2021-01-01T00:00:40Z | 15 | t1 | +| 2021-01-01T00:00:50Z | 7 | t1 | + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 19 | t2 | +| 2021-01-01T00:00:10Z | 7 | t2 | +| 2021-01-01T00:00:20Z | 18446744073709551615 | t2 | +| 2021-01-01T00:00:30Z | 19 | t2 | +| 2021-01-01T00:00:40Z | 15 | t2 | +| 2021-01-01T00:00:50Z | 3 | t2 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/bitwise/urshift.md b/content/flux/v0.x/stdlib/bitwise/urshift.md new file mode 100644 index 000000000..b9dceadd9 --- /dev/null +++ b/content/flux/v0.x/stdlib/bitwise/urshift.md @@ -0,0 +1,130 @@ +--- +title: bitwise.urshift() function +description: > + `bitwise.urshift()` shifts the bits in `a` right by `b` bits. + Both `a` and `b` are unsigned integers. +menu: + flux_0_x_ref: + name: bitwise.urshift + parent: bitwise + identifier: bitwise/urshift +weight: 101 +--- + + + +`bitwise.urshift()` shifts the bits in `a` right by `b` bits. +Both `a` and `b` are unsigned integers. + + + +##### Function type signature + +```js +(a: uint, b: uint) => uint +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### a +({{< req >}}) +Left hand operand. + + + +### b +({{< req >}}) +Number of bits to shift. + + + + +## Examples + +- [Shift bits right in an unsigned integer](#shift-bits-right-in-an-unsigned-integer) +- [Shift bits right in unsigned integers in a stream of tables](#shift-bits-right-in-unsigned-integers-in-a-stream-of-tables) + +### Shift bits right in an unsigned integer + +```js +import "bitwise" + +bitwise.urshift(a: uint(v: 1234), b: uint(v: 2))// Returns 308 (uint) + + +``` + + +### Shift bits right in unsigned integers in a stream of tables + +```js +import "bitwise" +import "sampledata" + +sampledata.uint() + |> map(fn: (r) => ({r with _value: bitwise.urshift(a: r._value, b: uint(v: 3))})) + +``` + +{{< expand-wrapper >}} +{{% expand "View example input and ouput" %}} + +#### Input data + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 18446744073709551614 | t1 | +| 2021-01-01T00:00:10Z | 10 | t1 | +| 2021-01-01T00:00:20Z | 7 | t1 | +| 2021-01-01T00:00:30Z | 17 | t1 | +| 2021-01-01T00:00:40Z | 15 | t1 | +| 2021-01-01T00:00:50Z | 4 | t1 | + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 19 | t2 | +| 2021-01-01T00:00:10Z | 4 | t2 | +| 2021-01-01T00:00:20Z | 18446744073709551613 | t2 | +| 2021-01-01T00:00:30Z | 19 | t2 | +| 2021-01-01T00:00:40Z | 13 | t2 | +| 2021-01-01T00:00:50Z | 1 | t2 | + + +#### Output data + +| _time | _value | *tag | +| -------------------- | ------------------- | ---- | +| 2021-01-01T00:00:00Z | 2305843009213693951 | t1 | +| 2021-01-01T00:00:10Z | 1 | t1 | +| 2021-01-01T00:00:20Z | 0 | t1 | +| 2021-01-01T00:00:30Z | 2 | t1 | +| 2021-01-01T00:00:40Z | 1 | t1 | +| 2021-01-01T00:00:50Z | 0 | t1 | + +| _time | _value | *tag | +| -------------------- | ------------------- | ---- | +| 2021-01-01T00:00:00Z | 2 | t2 | +| 2021-01-01T00:00:10Z | 0 | t2 | +| 2021-01-01T00:00:20Z | 2305843009213693951 | t2 | +| 2021-01-01T00:00:30Z | 2 | t2 | +| 2021-01-01T00:00:40Z | 1 | t2 | +| 2021-01-01T00:00:50Z | 0 | t2 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/bitwise/uxor.md b/content/flux/v0.x/stdlib/bitwise/uxor.md new file mode 100644 index 000000000..c3aa31eb3 --- /dev/null +++ b/content/flux/v0.x/stdlib/bitwise/uxor.md @@ -0,0 +1,128 @@ +--- +title: bitwise.uxor() function +description: > + `bitwise.uxor()` performs the bitwise operation, `a XOR b`, with unsigned integers. +menu: + flux_0_x_ref: + name: bitwise.uxor + parent: bitwise + identifier: bitwise/uxor +weight: 101 +--- + + + +`bitwise.uxor()` performs the bitwise operation, `a XOR b`, with unsigned integers. + + + +##### Function type signature + +```js +(a: uint, b: uint) => uint +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### a +({{< req >}}) +Left hand operand. + + + +### b +({{< req >}}) +Right hand operand. + + + + +## Examples + +- [Perform a bitwise XOR operation](#perform-a-bitwise-xor-operation) +- [Perform a bitwise XOR operation on a stream of tables](#perform-a-bitwise-xor-operation-on-a-stream-of-tables) + +### Perform a bitwise XOR operation + +```js +import "bitwise" + +bitwise.uxor(a: uint(v: 1234), b: uint(v: 4567))// Returns 5381 (uint) + + +``` + + +### Perform a bitwise XOR operation on a stream of tables + +```js +import "bitwise" +import "sampledata" + +sampledata.uint() + |> map(fn: (r) => ({r with _value: bitwise.uxor(a: r._value, b: uint(v: 3))})) + +``` + +{{< expand-wrapper >}} +{{% expand "View example input and ouput" %}} + +#### Input data + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 18446744073709551614 | t1 | +| 2021-01-01T00:00:10Z | 10 | t1 | +| 2021-01-01T00:00:20Z | 7 | t1 | +| 2021-01-01T00:00:30Z | 17 | t1 | +| 2021-01-01T00:00:40Z | 15 | t1 | +| 2021-01-01T00:00:50Z | 4 | t1 | + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 19 | t2 | +| 2021-01-01T00:00:10Z | 4 | t2 | +| 2021-01-01T00:00:20Z | 18446744073709551613 | t2 | +| 2021-01-01T00:00:30Z | 19 | t2 | +| 2021-01-01T00:00:40Z | 13 | t2 | +| 2021-01-01T00:00:50Z | 1 | t2 | + + +#### Output data + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 18446744073709551613 | t1 | +| 2021-01-01T00:00:10Z | 9 | t1 | +| 2021-01-01T00:00:20Z | 4 | t1 | +| 2021-01-01T00:00:30Z | 18 | t1 | +| 2021-01-01T00:00:40Z | 12 | t1 | +| 2021-01-01T00:00:50Z | 7 | t1 | + +| _time | _value | *tag | +| -------------------- | -------------------- | ---- | +| 2021-01-01T00:00:00Z | 16 | t2 | +| 2021-01-01T00:00:10Z | 7 | t2 | +| 2021-01-01T00:00:20Z | 18446744073709551614 | t2 | +| 2021-01-01T00:00:30Z | 16 | t2 | +| 2021-01-01T00:00:40Z | 14 | t2 | +| 2021-01-01T00:00:50Z | 2 | t2 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/contrib/anaisdg/anomalydetection/mad.md b/content/flux/v0.x/stdlib/contrib/anaisdg/anomalydetection/mad.md index 9302c3352..6ee0a8db1 100644 --- a/content/flux/v0.x/stdlib/contrib/anaisdg/anomalydetection/mad.md +++ b/content/flux/v0.x/stdlib/contrib/anaisdg/anomalydetection/mad.md @@ -69,6 +69,7 @@ import "sampledata" sampledata.float() |> anomalydetection.mad(threshold: 1.0) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/contrib/anaisdg/statsmodels/linearregression.md b/content/flux/v0.x/stdlib/contrib/anaisdg/statsmodels/linearregression.md index 317d63243..daf253acc 100644 --- a/content/flux/v0.x/stdlib/contrib/anaisdg/statsmodels/linearregression.md +++ b/content/flux/v0.x/stdlib/contrib/anaisdg/statsmodels/linearregression.md @@ -85,5 +85,6 @@ import "sampledata" sampledata.float() |> statsmodels.linearRegression() + ``` diff --git a/content/flux/v0.x/stdlib/contrib/bonitoo-io/alerta/alert.md b/content/flux/v0.x/stdlib/contrib/bonitoo-io/alerta/alert.md index 55af9cc1f..e6993d82f 100644 --- a/content/flux/v0.x/stdlib/contrib/bonitoo-io/alerta/alert.md +++ b/content/flux/v0.x/stdlib/contrib/bonitoo-io/alerta/alert.md @@ -184,5 +184,6 @@ alerta.alert( type: "exampleAlertType", timestamp: now(), ) + ``` diff --git a/content/flux/v0.x/stdlib/contrib/bonitoo-io/hex/bytes.md b/content/flux/v0.x/stdlib/contrib/bonitoo-io/hex/bytes.md index 68ea35492..5f0b12097 100644 --- a/content/flux/v0.x/stdlib/contrib/bonitoo-io/hex/bytes.md +++ b/content/flux/v0.x/stdlib/contrib/bonitoo-io/hex/bytes.md @@ -57,5 +57,6 @@ import "contrib/bonitoo-io/hex" hex.bytes(v: "FF5733")// Returns [255 87 51] (bytes) + ``` diff --git a/content/flux/v0.x/stdlib/contrib/bonitoo-io/hex/int.md b/content/flux/v0.x/stdlib/contrib/bonitoo-io/hex/int.md index 4f4efc60b..a93c5312e 100644 --- a/content/flux/v0.x/stdlib/contrib/bonitoo-io/hex/int.md +++ b/content/flux/v0.x/stdlib/contrib/bonitoo-io/hex/int.md @@ -57,5 +57,6 @@ import "contrib/bonitoo-io/hex" hex.int(v: "4d2")// Returns 1234 + ``` diff --git a/content/flux/v0.x/stdlib/contrib/bonitoo-io/hex/string.md b/content/flux/v0.x/stdlib/contrib/bonitoo-io/hex/string.md index 49e12c333..df300eba1 100644 --- a/content/flux/v0.x/stdlib/contrib/bonitoo-io/hex/string.md +++ b/content/flux/v0.x/stdlib/contrib/bonitoo-io/hex/string.md @@ -68,6 +68,7 @@ import "contrib/bonitoo-io/hex" hex.string(v: 1234)// Returns 4d2 + ``` @@ -78,6 +79,7 @@ import "contrib/bonitoo-io/hex" hex.string(v: true)// Returns "true" + ``` @@ -88,6 +90,7 @@ import "contrib/bonitoo-io/hex" hex.string(v: 1m)// Returns "1m" + ``` @@ -98,6 +101,7 @@ import "contrib/bonitoo-io/hex" hex.string(v: 2021-01-01T00:00:00Z)// Returns "2021-01-01T00:00:00Z" + ``` @@ -108,6 +112,7 @@ import "contrib/bonitoo-io/hex" hex.string(v: 1234)// Returns "4d2" + ``` @@ -118,6 +123,7 @@ import "contrib/bonitoo-io/hex" hex.string(v: uint(v: 5678))// Returns "162e" + ``` @@ -128,6 +134,7 @@ import "contrib/bonitoo-io/hex" hex.string(v: 10.12)// Returns "10.12" + ``` @@ -138,6 +145,7 @@ import "contrib/bonitoo-io/hex" hex.string(v: bytes(v: "Hello world!"))// Returns "48656c6c6f20776f726c6421" + ``` @@ -157,6 +165,7 @@ data = data |> map(fn: (r) => ({r with _value: hex.string(v: r.foo)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/contrib/bonitoo-io/hex/uint.md b/content/flux/v0.x/stdlib/contrib/bonitoo-io/hex/uint.md index 5edcd7f21..41086bdc7 100644 --- a/content/flux/v0.x/stdlib/contrib/bonitoo-io/hex/uint.md +++ b/content/flux/v0.x/stdlib/contrib/bonitoo-io/hex/uint.md @@ -57,5 +57,6 @@ import "contrib/bonitoo-io/hex" hex.uint(v: "4d2")// Returns 1234 + ``` diff --git a/content/flux/v0.x/stdlib/contrib/bonitoo-io/servicenow/event.md b/content/flux/v0.x/stdlib/contrib/bonitoo-io/servicenow/event.md index 52dd86fc4..780cd6bed 100644 --- a/content/flux/v0.x/stdlib/contrib/bonitoo-io/servicenow/event.md +++ b/content/flux/v0.x/stdlib/contrib/bonitoo-io/servicenow/event.md @@ -175,5 +175,6 @@ servicenow.event( "info", additionalInfo: {"devId": r.dev_id}, ) + ``` diff --git a/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/alert.md b/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/alert.md index 71410b465..1a03cdf86 100644 --- a/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/alert.md +++ b/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/alert.md @@ -171,5 +171,6 @@ from(bucket: "example-bucket") warn: (r) => r._value > 20, info: (r) => r._value > 10, ) + ``` diff --git a/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/deadman.md b/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/deadman.md index 61d345872..eec5427a5 100644 --- a/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/deadman.md +++ b/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/deadman.md @@ -145,5 +145,6 @@ from(bucket: "example-bucket") measurement: "pulse", threshold: 2, ) + ``` diff --git a/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/definecheck.md b/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/definecheck.md index ac66194e1..825a36bf0 100644 --- a/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/definecheck.md +++ b/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/definecheck.md @@ -77,5 +77,6 @@ tickscript.defineCheck(id: "000000000000", name: "Example check name")// Returns // tags: {} // } + ``` diff --git a/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/groupby.md b/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/groupby.md index 8289e1ffe..b35a7b4a6 100644 --- a/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/groupby.md +++ b/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/groupby.md @@ -65,6 +65,7 @@ import "contrib/bonitoo-io/tickscript" data |> tickscript.groupBy(columns: ["host", "region"]) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/join.md b/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/join.md index 1dbf3ad6f..f83f8b124 100644 --- a/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/join.md +++ b/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/join.md @@ -97,6 +97,7 @@ states = |> group(columns: ["host"]) tickscript.join(tables: {metric: metrics, state: states}, on: ["_time", "host"], measurement: "example-m") + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/select.md b/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/select.md index d9d5b7c75..ad1b1bb4b 100644 --- a/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/select.md +++ b/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/select.md @@ -92,6 +92,7 @@ import "sampledata" sampledata.int() |> tickscript.select(as: "example-name") + ``` {{< expand-wrapper >}} @@ -149,6 +150,7 @@ import "sampledata" sampledata.int() |> tickscript.select(as: "sum", fn: sum) + ``` {{< expand-wrapper >}} @@ -196,6 +198,7 @@ import "sampledata" sampledata.int() |> tickscript.select(as: "max", fn: max) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/selectwindow.md b/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/selectwindow.md index 39ff769ad..97dc3eb3b 100644 --- a/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/selectwindow.md +++ b/content/flux/v0.x/stdlib/contrib/bonitoo-io/tickscript/selectwindow.md @@ -104,6 +104,7 @@ import "contrib/bonitoo-io/tickscript" data |> tickscript.selectWindow(fn: sum, as: "example-name", every: 1h, defaultValue: 0) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/contrib/bonitoo-io/victorops/alert.md b/content/flux/v0.x/stdlib/contrib/bonitoo-io/victorops/alert.md index 1dc9ed53b..62abb0093 100644 --- a/content/flux/v0.x/stdlib/contrib/bonitoo-io/victorops/alert.md +++ b/content/flux/v0.x/stdlib/contrib/bonitoo-io/victorops/alert.md @@ -127,5 +127,6 @@ victorops.alert( entityDisplayName: "Example Alert 1", stateMessage: "Last reported cpu_idle was ${string(v: r._value)}.", ) + ``` diff --git a/content/flux/v0.x/stdlib/contrib/bonitoo-io/zenoss/event.md b/content/flux/v0.x/stdlib/contrib/bonitoo-io/zenoss/event.md index a3355bdca..98004ddc6 100644 --- a/content/flux/v0.x/stdlib/contrib/bonitoo-io/zenoss/event.md +++ b/content/flux/v0.x/stdlib/contrib/bonitoo-io/zenoss/event.md @@ -200,5 +200,6 @@ zenoss.event( else "Clear", ) + ``` diff --git a/content/flux/v0.x/stdlib/contrib/chobbs/discord/send.md b/content/flux/v0.x/stdlib/contrib/chobbs/discord/send.md index d315cc729..50acf1da7 100644 --- a/content/flux/v0.x/stdlib/contrib/chobbs/discord/send.md +++ b/content/flux/v0.x/stdlib/contrib/chobbs/discord/send.md @@ -102,5 +102,6 @@ discord.send( content: "The current status is \"${lastReported.status}\".", avatar_url: "https://staff-photos.net/pic.jpg", ) + ``` diff --git a/content/flux/v0.x/stdlib/contrib/jsternberg/aggregate/table.md b/content/flux/v0.x/stdlib/contrib/jsternberg/aggregate/table.md index b89a5794c..6db15e1d6 100644 --- a/content/flux/v0.x/stdlib/contrib/jsternberg/aggregate/table.md +++ b/content/flux/v0.x/stdlib/contrib/jsternberg/aggregate/table.md @@ -85,6 +85,7 @@ import "contrib/jsternberg/aggregate" sampledata.float() |> aggregate.table(columns: {"min_bottom_degrees": aggregate.min(column: "_value")}) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/contrib/jsternberg/influxdb/from.md b/content/flux/v0.x/stdlib/contrib/jsternberg/influxdb/from.md index 953e25720..32744d125 100644 --- a/content/flux/v0.x/stdlib/contrib/jsternberg/influxdb/from.md +++ b/content/flux/v0.x/stdlib/contrib/jsternberg/influxdb/from.md @@ -112,6 +112,7 @@ InfluxDB [API token](https://docs.influxdata.com/influxdb/latest/security/tokens import "contrib/jsternberg/influxdb" influxdb.from(bucket: "example-bucket") + ``` @@ -121,6 +122,7 @@ influxdb.from(bucket: "example-bucket") import "contrib/jsternberg/influxdb" influxdb.from(bucketID: "0261d8287f4d6000") + ``` @@ -133,5 +135,6 @@ import "influxdata/influxdb/secrets" token = secrets.get(key: "INFLUXDB_CLOUD_TOKEN") from(bucket: "example-bucket", host: "https://us-west-2-1.aws.cloud2.influxdata.com", org: "example-org", token: token) + ``` diff --git a/content/flux/v0.x/stdlib/contrib/jsternberg/influxdb/select.md b/content/flux/v0.x/stdlib/contrib/jsternberg/influxdb/select.md index d8acdea97..0e4855dc6 100644 --- a/content/flux/v0.x/stdlib/contrib/jsternberg/influxdb/select.md +++ b/content/flux/v0.x/stdlib/contrib/jsternberg/influxdb/select.md @@ -146,6 +146,7 @@ InfluxDB [API token](https://docs.influxdata.com/influxdb/latest/security/tokens import "contrib/jsternberg/influxdb" influxdb.select(from: "example-bucket", start: -1d, m: "example-measurement", fields: ["field1"]) + ``` @@ -155,6 +156,7 @@ influxdb.select(from: "example-bucket", start: -1d, m: "example-measurement", fi import "contrib/jsternberg/influxdb" influxdb.select(from: "example-bucket", start: -1d, m: "example-measurement", fields: ["field1", "field2", "field3"]) + ``` @@ -169,6 +171,7 @@ influxdb.select( m: "example-measurement", where: (r) => r.host == "host1" and r.region == "us-west", ) + ``` @@ -189,5 +192,6 @@ influxdb.select( org: "example-org", token: token, ) + ``` diff --git a/content/flux/v0.x/stdlib/contrib/rhajek/bigpanda/sendalert.md b/content/flux/v0.x/stdlib/contrib/rhajek/bigpanda/sendalert.md index c773515b6..d709c0bad 100644 --- a/content/flux/v0.x/stdlib/contrib/rhajek/bigpanda/sendalert.md +++ b/content/flux/v0.x/stdlib/contrib/rhajek/bigpanda/sendalert.md @@ -111,5 +111,6 @@ bigpanda.sendAlert( description: "${lastReported._field} is ${lastReported.status}: ${string(v: lastReported._value)}", }, ) + ``` diff --git a/content/flux/v0.x/stdlib/contrib/rhajek/bigpanda/statusfromlevel.md b/content/flux/v0.x/stdlib/contrib/rhajek/bigpanda/statusfromlevel.md index 6b68edc6f..754893c65 100644 --- a/content/flux/v0.x/stdlib/contrib/rhajek/bigpanda/statusfromlevel.md +++ b/content/flux/v0.x/stdlib/contrib/rhajek/bigpanda/statusfromlevel.md @@ -66,6 +66,7 @@ import "contrib/rhajek/bigpanda" bigpanda.statusFromLevel(level: "crit")// Returns "critical" + ``` @@ -78,6 +79,7 @@ import "contrib/rhajek/bigpanda" data |> map(fn: (r) => ({r with big_panda_status: bigpanda.statusFromLevel(level: r._level)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/contrib/sranka/opsgenie/sendalert.md b/content/flux/v0.x/stdlib/contrib/sranka/opsgenie/sendalert.md index 393ee6341..c007f022b 100644 --- a/content/flux/v0.x/stdlib/contrib/sranka/opsgenie/sendalert.md +++ b/content/flux/v0.x/stdlib/contrib/sranka/opsgenie/sendalert.md @@ -160,5 +160,6 @@ opsgenie.sendAlert( alias: "example-disk-usage", responders: ["user:john@example.com", "team:itcrowd"], ) + ``` diff --git a/content/flux/v0.x/stdlib/contrib/sranka/sensu/event.md b/content/flux/v0.x/stdlib/contrib/sranka/sensu/event.md index 5fd7f8476..a4e516c4c 100644 --- a/content/flux/v0.x/stdlib/contrib/sranka/sensu/event.md +++ b/content/flux/v0.x/stdlib/contrib/sranka/sensu/event.md @@ -144,5 +144,6 @@ sensu.event( checkName: "diskUsage", text: "Disk usage is **${lastReported.status}**.", ) + ``` diff --git a/content/flux/v0.x/stdlib/contrib/sranka/sensu/tosensuname.md b/content/flux/v0.x/stdlib/contrib/sranka/sensu/tosensuname.md index c840e2c60..d30cb698a 100644 --- a/content/flux/v0.x/stdlib/contrib/sranka/sensu/tosensuname.md +++ b/content/flux/v0.x/stdlib/contrib/sranka/sensu/tosensuname.md @@ -58,5 +58,6 @@ import "contrib/sranka/sensu" sensu.toSensuName(v: "Example name conversion")// Returns "Example_name_conversion" + ``` diff --git a/content/flux/v0.x/stdlib/contrib/sranka/teams/message.md b/content/flux/v0.x/stdlib/contrib/sranka/teams/message.md index 406a3c5f7..eba72eed9 100644 --- a/content/flux/v0.x/stdlib/contrib/sranka/teams/message.md +++ b/content/flux/v0.x/stdlib/contrib/sranka/teams/message.md @@ -89,5 +89,6 @@ teams.message( text: "Disk usage is: *${lastReported.status}*.", summary: "Disk usage is ${lastReported.status}", ) + ``` diff --git a/content/flux/v0.x/stdlib/contrib/sranka/telegram/endpoint.md b/content/flux/v0.x/stdlib/contrib/sranka/telegram/endpoint.md index 36b3052d3..53e5a51c2 100644 --- a/content/flux/v0.x/stdlib/contrib/sranka/telegram/endpoint.md +++ b/content/flux/v0.x/stdlib/contrib/sranka/telegram/endpoint.md @@ -117,5 +117,6 @@ crit_statuses = crit_statuses |> endpoint(mapFn: (r) => ({channel: "-12345", text: "Disk usage is **${r.status}**.", silent: true}))() + ``` diff --git a/content/flux/v0.x/stdlib/contrib/sranka/telegram/message.md b/content/flux/v0.x/stdlib/contrib/sranka/telegram/message.md index 3e1a73eca..e0f21c393 100644 --- a/content/flux/v0.x/stdlib/contrib/sranka/telegram/message.md +++ b/content/flux/v0.x/stdlib/contrib/sranka/telegram/message.md @@ -116,5 +116,6 @@ lastReported = |> findRecord(fn: (key) => true, idx: 0) telegram.message(token: token, channel: "-12345", text: "Disk usage is **${lastReported.status}**.") + ``` diff --git a/content/flux/v0.x/stdlib/contrib/sranka/webexteams/message.md b/content/flux/v0.x/stdlib/contrib/sranka/webexteams/message.md index f7fd56813..1c41b8bde 100644 --- a/content/flux/v0.x/stdlib/contrib/sranka/webexteams/message.md +++ b/content/flux/v0.x/stdlib/contrib/sranka/webexteams/message.md @@ -104,5 +104,6 @@ webexteams.message( text: "Disk usage is ${lastReported.status}.", markdown: "Disk usage is **${lastReported.status}**.", ) + ``` diff --git a/content/flux/v0.x/stdlib/contrib/tomhollingworth/events/duration.md b/content/flux/v0.x/stdlib/contrib/tomhollingworth/events/duration.md index 815bfe4aa..8478a5912 100644 --- a/content/flux/v0.x/stdlib/contrib/tomhollingworth/events/duration.md +++ b/content/flux/v0.x/stdlib/contrib/tomhollingworth/events/duration.md @@ -115,6 +115,7 @@ import "contrib/tomhollingworth/events" data |> events.duration(unit: 1m, stop: 2020-01-02T00:00:00Z) + ``` {{< expand-wrapper >}} @@ -170,6 +171,7 @@ union( ], ) |> pivot(rowKey: ["_time", "state"], columnKey: ["function"], valueColumn: "value") + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/csv/from.md b/content/flux/v0.x/stdlib/csv/from.md index 347c3b5ad..ea88ebcf7 100644 --- a/content/flux/v0.x/stdlib/csv/from.md +++ b/content/flux/v0.x/stdlib/csv/from.md @@ -80,6 +80,7 @@ header row and all subsequent rows as data. import "csv" csv.from(file: "path/to/data-file.csv") + ``` @@ -89,6 +90,7 @@ csv.from(file: "path/to/data-file.csv") import "csv" csv.from(file: "/path/to/data-file.csv", mode: "raw") + ``` @@ -112,6 +114,7 @@ csvData = " csv.from(csv: csvData) + ``` {{< expand-wrapper >}} @@ -151,6 +154,7 @@ _start,_stop,_time,region,host,_value " csv.from(csv: csvData, mode: "raw") + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/date/add.md b/content/flux/v0.x/stdlib/date/add.md index 5a8350276..38914072e 100644 --- a/content/flux/v0.x/stdlib/date/add.md +++ b/content/flux/v0.x/stdlib/date/add.md @@ -74,6 +74,7 @@ import "date" date.add(d: 6h, to: 2019-09-16T12:00:00Z)// Returns 2019-09-16T18:00:00.000000000Z + ``` @@ -90,6 +91,7 @@ option now = () => 2021-12-10T16:27:40Z date.add(d: 1mo, to: -1d)// Returns 2022-01-09T16:27:40Z + ``` @@ -102,5 +104,6 @@ option now = () => 2022-01-01T12:00:00Z date.add(d: 6h, to: 3h)// Returns 2022-01-01T21:00:00.000000000Z + ``` diff --git a/content/flux/v0.x/stdlib/date/boundaries/friday.md b/content/flux/v0.x/stdlib/date/boundaries/friday.md index 7137db9f2..2c329d36b 100644 --- a/content/flux/v0.x/stdlib/date/boundaries/friday.md +++ b/content/flux/v0.x/stdlib/date/boundaries/friday.md @@ -55,6 +55,7 @@ option now = () => 2021-12-30T00:40:44Z boundaries.friday()// Returns {start: 2021-12-24T08:00:00Z, stop:2022-12-25T08:00:00Z } + ``` @@ -67,5 +68,6 @@ day = boundaries.friday() from(bucket: "example-bucket") |> range(start: day.start, stop: day.stop) + ``` diff --git a/content/flux/v0.x/stdlib/date/boundaries/monday.md b/content/flux/v0.x/stdlib/date/boundaries/monday.md index e6c5daacc..06eed72aa 100644 --- a/content/flux/v0.x/stdlib/date/boundaries/monday.md +++ b/content/flux/v0.x/stdlib/date/boundaries/monday.md @@ -57,6 +57,7 @@ option now = () => 2021-12-30T00:40:44Z boundaries.monday()// Returns {start: 2021-12-27T08:00:00Z, stop:2021-12-28T08:00:00Z } + ``` @@ -69,5 +70,6 @@ day = boundaries.monday() from(bucket: "example-bucket") |> range(start: day.start, stop: day.stop) + ``` diff --git a/content/flux/v0.x/stdlib/date/boundaries/month.md b/content/flux/v0.x/stdlib/date/boundaries/month.md index 8312c0d4c..d618f5517 100644 --- a/content/flux/v0.x/stdlib/date/boundaries/month.md +++ b/content/flux/v0.x/stdlib/date/boundaries/month.md @@ -64,6 +64,7 @@ option now = () => 2022-05-10T10:10:00Z boundaries.month()// Returns {start:2022-05-01T00:00:00.000000000Z, stop:2022-06-01T00:00:00.000000000Z} + ``` @@ -76,6 +77,7 @@ thisMonth = boundaries.month() from(bucket: "example-bucket") |> range(start: thisMonth.start, stop: thisMonth.stop) + ``` @@ -88,5 +90,6 @@ lastMonth = boundaries.month(month_offset: -1) from(bucket: "example-bucket") |> range(start: lastMonth.start, stop: lastMonth.stop) + ``` diff --git a/content/flux/v0.x/stdlib/date/boundaries/saturday.md b/content/flux/v0.x/stdlib/date/boundaries/saturday.md index 62d3000a1..97093994c 100644 --- a/content/flux/v0.x/stdlib/date/boundaries/saturday.md +++ b/content/flux/v0.x/stdlib/date/boundaries/saturday.md @@ -55,6 +55,7 @@ option now = () => 2021-12-30T00:40:44Z boundaries.saturday()// Returns {start: 2022-12-25T08:00:00Z, stop:2022-12-26T08:00:00Z } + ``` @@ -67,5 +68,6 @@ day = boundaries.saturday() from(bucket: "example-bucket") |> range(start: day.start, stop: day.stop) + ``` diff --git a/content/flux/v0.x/stdlib/date/boundaries/sunday.md b/content/flux/v0.x/stdlib/date/boundaries/sunday.md index f57852af0..657e90cc5 100644 --- a/content/flux/v0.x/stdlib/date/boundaries/sunday.md +++ b/content/flux/v0.x/stdlib/date/boundaries/sunday.md @@ -55,6 +55,7 @@ option now = () => 2021-12-30T00:40:44Z boundaries.sunday()// Returns {start: 2021-12-26T08:00:00Z, stop:2021-12-27T08:00:00Z } + ``` @@ -67,5 +68,6 @@ day = boundaries.sunday() from(bucket: "example-bucket") |> range(start: day.start, stop: day.stop) + ``` diff --git a/content/flux/v0.x/stdlib/date/boundaries/thursday.md b/content/flux/v0.x/stdlib/date/boundaries/thursday.md index 6a7ebe687..1a9a73487 100644 --- a/content/flux/v0.x/stdlib/date/boundaries/thursday.md +++ b/content/flux/v0.x/stdlib/date/boundaries/thursday.md @@ -55,6 +55,7 @@ option now = () => 2021-12-30T00:40:44Z boundaries.thursday()// Returns {start: 2021-12-23T08:00:00Z, stop:2021-12-24T08:00:00Z } + ``` @@ -67,5 +68,6 @@ day = boundaries.thursday() from(bucket: "example-bucket") |> range(start: day.start, stop: day.stop) + ``` diff --git a/content/flux/v0.x/stdlib/date/boundaries/tuesday.md b/content/flux/v0.x/stdlib/date/boundaries/tuesday.md index 5de57ead0..108a34698 100644 --- a/content/flux/v0.x/stdlib/date/boundaries/tuesday.md +++ b/content/flux/v0.x/stdlib/date/boundaries/tuesday.md @@ -55,6 +55,7 @@ option now = () => 2021-12-30T00:40:44Z boundaries.tuesday()// Returns {start: 2021-12-28T08:00:00Z, stop:2021-12-29T08:00:00Z } + ``` @@ -67,5 +68,6 @@ day = boundaries.tuesday() from(bucket: "example-bucket") |> range(start: day.start, stop: day.stop) + ``` diff --git a/content/flux/v0.x/stdlib/date/boundaries/wednesday.md b/content/flux/v0.x/stdlib/date/boundaries/wednesday.md index f960f9ec3..1297f48a4 100644 --- a/content/flux/v0.x/stdlib/date/boundaries/wednesday.md +++ b/content/flux/v0.x/stdlib/date/boundaries/wednesday.md @@ -51,6 +51,7 @@ day = boundaries.wednesday() from(bucket: "example-bucket") |> range(start: day.start, stop: day.stop) + ``` This will return all records from Wednesday this week diff --git a/content/flux/v0.x/stdlib/date/boundaries/week.md b/content/flux/v0.x/stdlib/date/boundaries/week.md index 8b1087305..4e780c511 100644 --- a/content/flux/v0.x/stdlib/date/boundaries/week.md +++ b/content/flux/v0.x/stdlib/date/boundaries/week.md @@ -73,6 +73,7 @@ option now = () => 2022-05-10T00:00:00.00001Z boundaries.week()// Returns {start: 2022-05-09T00:00:00.000000000Z, stop: 2022-05-16T00:00:00.000000000Z} + ``` @@ -87,6 +88,7 @@ boundaries.week( start_sunday: true, )// Returns {start: 2022-05-08T00:00:00.000000000Z, stop: 2022-05-14T00:00:00.000000000Z} + ``` @@ -99,6 +101,7 @@ thisWeek = boundaries.week() from(bucket: "example-bucket") |> range(start: thisWeek.start, stop: thisWeek.stop) + ``` @@ -111,5 +114,6 @@ lastWeek = boundaries.week(week_offset: -1) from(bucket: "example-bucket") |> range(start: lastWeek.start, stop: lastWeek.stop) + ``` diff --git a/content/flux/v0.x/stdlib/date/boundaries/yesterday.md b/content/flux/v0.x/stdlib/date/boundaries/yesterday.md index f6aa1a51b..85223ec25 100644 --- a/content/flux/v0.x/stdlib/date/boundaries/yesterday.md +++ b/content/flux/v0.x/stdlib/date/boundaries/yesterday.md @@ -55,6 +55,7 @@ option now = () => 2022-01-02T13:45:28Z boundaries.yesterday()// Returns {start: 2022-01-01T00:00:00.000000000Z, stop: 2022-01-02T00:00:00.000000000Z} + ``` @@ -67,5 +68,6 @@ day = boundaries.yesterday() from(bucket: "example-bucket") |> range(start: day.start, stop: day.stop) + ``` diff --git a/content/flux/v0.x/stdlib/date/hour.md b/content/flux/v0.x/stdlib/date/hour.md index 4a5362f7f..a4982f7fb 100644 --- a/content/flux/v0.x/stdlib/date/hour.md +++ b/content/flux/v0.x/stdlib/date/hour.md @@ -67,6 +67,7 @@ import "date" date.hour(t: 2020-02-11T12:21:03.29353494Z)// Returns 12 + ``` @@ -79,5 +80,6 @@ option now = () => 2020-02-11T12:21:03.29353494Z date.hour(t: -8h)// Returns 7 + ``` diff --git a/content/flux/v0.x/stdlib/date/microsecond.md b/content/flux/v0.x/stdlib/date/microsecond.md index 4fbaccc60..ffa3f6136 100644 --- a/content/flux/v0.x/stdlib/date/microsecond.md +++ b/content/flux/v0.x/stdlib/date/microsecond.md @@ -62,6 +62,7 @@ import "date" date.microsecond(t: 2020-02-11T12:21:03.29353494Z)// Returns 293534 + ``` @@ -74,5 +75,6 @@ option now = () => 2020-02-11T12:21:03.29353494Z date.microsecond(t: -1890us)// Returns 322661 + ``` diff --git a/content/flux/v0.x/stdlib/date/millisecond.md b/content/flux/v0.x/stdlib/date/millisecond.md index 66a3291e1..29140572c 100644 --- a/content/flux/v0.x/stdlib/date/millisecond.md +++ b/content/flux/v0.x/stdlib/date/millisecond.md @@ -62,6 +62,7 @@ import "date" date.millisecond(t: 2020-02-11T12:21:03.29353494Z)// Returns 293 + ``` @@ -74,5 +75,6 @@ option now = () => 2020-02-11T12:21:03.29353494Z date.millisecond(t: -150ms)// Returns 127 + ``` diff --git a/content/flux/v0.x/stdlib/date/minute.md b/content/flux/v0.x/stdlib/date/minute.md index 059a8a78f..983ac7c1d 100644 --- a/content/flux/v0.x/stdlib/date/minute.md +++ b/content/flux/v0.x/stdlib/date/minute.md @@ -67,6 +67,7 @@ import "date" date.minute(t: 2020-02-11T12:21:03.29353494Z)// Returns 21 + ``` @@ -79,5 +80,6 @@ option now = () => 2020-02-11T12:21:03.29353494Z date.minute(t: -45m)// Returns 6 + ``` diff --git a/content/flux/v0.x/stdlib/date/month.md b/content/flux/v0.x/stdlib/date/month.md index ce76d07dc..59c67c84e 100644 --- a/content/flux/v0.x/stdlib/date/month.md +++ b/content/flux/v0.x/stdlib/date/month.md @@ -67,6 +67,7 @@ import "date" date.month(t: 2020-02-11T12:21:03.29353494Z)// Returns 2 + ``` @@ -79,5 +80,6 @@ option now = () => 2020-02-11T12:21:03.29353494Z date.month(t: -3mo)// Returns 8 + ``` diff --git a/content/flux/v0.x/stdlib/date/monthday.md b/content/flux/v0.x/stdlib/date/monthday.md index 6af0fd6e5..4bc14d0c8 100644 --- a/content/flux/v0.x/stdlib/date/monthday.md +++ b/content/flux/v0.x/stdlib/date/monthday.md @@ -69,6 +69,7 @@ import "date" date.monthDay(t: 2020-02-11T12:21:03.29353494Z)// Returns 11 + ``` @@ -81,5 +82,6 @@ option now = () => 2020-02-11T12:21:03.29353494Z date.monthDay(t: -8d)// Returns 25 + ``` diff --git a/content/flux/v0.x/stdlib/date/nanosecond.md b/content/flux/v0.x/stdlib/date/nanosecond.md index 7f5a049ce..6fb1a301d 100644 --- a/content/flux/v0.x/stdlib/date/nanosecond.md +++ b/content/flux/v0.x/stdlib/date/nanosecond.md @@ -62,6 +62,7 @@ import "date" date.nanosecond(t: 2020-02-11T12:21:03.29353494Z)// Returns 293534940 + ``` @@ -74,5 +75,6 @@ option now = () => 2020-02-11T12:21:03.29353494Z date.nanosecond(t: -2111984ns)// Returns 128412016 + ``` diff --git a/content/flux/v0.x/stdlib/date/quarter.md b/content/flux/v0.x/stdlib/date/quarter.md index 33f627254..da36d9e5b 100644 --- a/content/flux/v0.x/stdlib/date/quarter.md +++ b/content/flux/v0.x/stdlib/date/quarter.md @@ -67,6 +67,7 @@ import "date" date.quarter(t: 2020-02-11T12:21:03.29353494Z)// Returns 1 + ``` @@ -79,5 +80,6 @@ option now = () => 2020-02-11T12:21:03.29353494Z date.quarter(t: -7mo)// Returns 2 + ``` diff --git a/content/flux/v0.x/stdlib/date/scale.md b/content/flux/v0.x/stdlib/date/scale.md index d3572b7cd..314fcbc89 100644 --- a/content/flux/v0.x/stdlib/date/scale.md +++ b/content/flux/v0.x/stdlib/date/scale.md @@ -69,6 +69,7 @@ d = date.scale(d: 1h, n: n) date.add(d: d, to: 2022-05-10T00:00:00Z)// Returns 2022-05-10T00:00:00.000000000Z + ``` @@ -82,5 +83,6 @@ d = date.scale(d: 1mo1h, n: 5) date.add(d: d, to: 2022-01-01T00:00:00Z)// Returns 2022-06-01T05:00:00.000000000Z + ``` diff --git a/content/flux/v0.x/stdlib/date/second.md b/content/flux/v0.x/stdlib/date/second.md index e06625215..d0ef60a29 100644 --- a/content/flux/v0.x/stdlib/date/second.md +++ b/content/flux/v0.x/stdlib/date/second.md @@ -60,6 +60,7 @@ import "date" date.second(t: 2020-02-11T12:21:03.29353494Z)// Returns 3 + ``` @@ -72,5 +73,6 @@ option now = () => 2020-02-11T12:21:03.29353494Z date.second(t: -50s)// Returns 28 + ``` diff --git a/content/flux/v0.x/stdlib/date/sub.md b/content/flux/v0.x/stdlib/date/sub.md index f29b4949b..7108041d2 100644 --- a/content/flux/v0.x/stdlib/date/sub.md +++ b/content/flux/v0.x/stdlib/date/sub.md @@ -74,6 +74,7 @@ import "date" date.sub(from: 2019-09-16T12:00:00Z, d: 6h)// Returns 2019-09-16T06:00:00.000000000Z + ``` @@ -86,6 +87,7 @@ option now = () => 2022-01-01T12:00:00Z date.sub(d: 6h, from: -3h)// Returns 2022-01-01T03:00:00.000000000Z + ``` @@ -102,5 +104,6 @@ option now = () => 2021-12-10T16:27:40Z date.sub(from: -1h, d: 2d)// Returns 2021-12-08T15:27:40Z + ``` diff --git a/content/flux/v0.x/stdlib/date/time.md b/content/flux/v0.x/stdlib/date/time.md index 14ac09169..18f28c921 100644 --- a/content/flux/v0.x/stdlib/date/time.md +++ b/content/flux/v0.x/stdlib/date/time.md @@ -69,6 +69,7 @@ import "date" date.time(t: 2020-02-11T12:21:03.29353494Z)// Returns 2020-02-11T12:21:03.293534940Z + ``` @@ -81,5 +82,6 @@ option now = () => 2022-01-01T00:00:00Z date.time(t: -1h)// Returns 2021-12-31T23:00:00.000000000Z + ``` diff --git a/content/flux/v0.x/stdlib/date/truncate.md b/content/flux/v0.x/stdlib/date/truncate.md index 10e2768b1..2b6dbaf27 100644 --- a/content/flux/v0.x/stdlib/date/truncate.md +++ b/content/flux/v0.x/stdlib/date/truncate.md @@ -92,6 +92,7 @@ date.truncate(t: 2019-06-03T13:59:01Z, unit: 1mo) // Returns 2019-05-31T22:00:00.000000000Z date.truncate(t: 2019-06-03T13:59:01Z, unit: 1y)// Returns 2018-12-31T23:00:00.000000000Z + ``` @@ -110,5 +111,6 @@ date.truncate(t: -1m, unit: 1m) // Returns 2019-12-31T23:59:00.000000000Z date.truncate(t: -1h, unit: 1h)// Returns 2019-12-31T23:00:00.000000000Z + ``` diff --git a/content/flux/v0.x/stdlib/date/week.md b/content/flux/v0.x/stdlib/date/week.md index 3a9688914..fa257816d 100644 --- a/content/flux/v0.x/stdlib/date/week.md +++ b/content/flux/v0.x/stdlib/date/week.md @@ -69,6 +69,7 @@ import "date" date.week(t: 2020-02-11T12:21:03.29353494Z)// Returns 7 + ``` @@ -81,5 +82,6 @@ option now = () => 2020-02-11T12:21:03.29353494Z date.week(t: -12d)// Returns 42 + ``` diff --git a/content/flux/v0.x/stdlib/date/weekday.md b/content/flux/v0.x/stdlib/date/weekday.md index 5422c83c2..4c424d4c3 100644 --- a/content/flux/v0.x/stdlib/date/weekday.md +++ b/content/flux/v0.x/stdlib/date/weekday.md @@ -69,6 +69,7 @@ import "date" date.weekDay(t: 2020-02-11T12:21:03.29353494Z)// Returns 2 + ``` @@ -81,5 +82,6 @@ option now = () => 2020-02-11T12:21:03.29353494Z date.weekDay(t: -84h)// Returns 6 + ``` diff --git a/content/flux/v0.x/stdlib/date/year.md b/content/flux/v0.x/stdlib/date/year.md index febddb561..db4ab5f59 100644 --- a/content/flux/v0.x/stdlib/date/year.md +++ b/content/flux/v0.x/stdlib/date/year.md @@ -67,6 +67,7 @@ import "date" date.year(t: 2020-02-11T12:21:03.29353494Z)// Returns 2020 + ``` @@ -79,5 +80,6 @@ option now = () => 2020-02-11T12:21:03.29353494Z date.year(t: -14y)// Returns 2007 + ``` diff --git a/content/flux/v0.x/stdlib/date/yearday.md b/content/flux/v0.x/stdlib/date/yearday.md index 0c73e902b..1e40cef86 100644 --- a/content/flux/v0.x/stdlib/date/yearday.md +++ b/content/flux/v0.x/stdlib/date/yearday.md @@ -69,6 +69,7 @@ import "date" date.yearDay(t: 2020-02-11T12:21:03.29353494Z)// Returns 42 + ``` @@ -81,5 +82,6 @@ option now = () => 2020-02-11T12:21:03.29353494Z date.yearDay(t: -1mo)// Returns 276 + ``` diff --git a/content/flux/v0.x/stdlib/dict/fromlist.md b/content/flux/v0.x/stdlib/dict/fromlist.md index f55598c6c..c71e469de 100644 --- a/content/flux/v0.x/stdlib/dict/fromlist.md +++ b/content/flux/v0.x/stdlib/dict/fromlist.md @@ -58,5 +58,6 @@ import "dict" d = dict.fromList(pairs: [{key: 1, value: "foo"}, {key: 2, value: "bar"}])// Returns [1: "foo", 2: "bar"] + ``` diff --git a/content/flux/v0.x/stdlib/dict/get.md b/content/flux/v0.x/stdlib/dict/get.md index 1b3a7b69e..f1eb3cc3c 100644 --- a/content/flux/v0.x/stdlib/dict/get.md +++ b/content/flux/v0.x/stdlib/dict/get.md @@ -73,5 +73,6 @@ d = [1: "foo", 2: "bar"] dict.get(dict: d, key: 1, default: "")// Returns "foo" + ``` diff --git a/content/flux/v0.x/stdlib/dict/insert.md b/content/flux/v0.x/stdlib/dict/insert.md index 8a93bc914..694bf9cb6 100644 --- a/content/flux/v0.x/stdlib/dict/insert.md +++ b/content/flux/v0.x/stdlib/dict/insert.md @@ -78,6 +78,7 @@ d = [1: "foo", 2: "bar"] dict.insert(dict: d, key: 3, value: "baz")// Returns [1: "foo", 2: "bar", 3: "baz"] + ``` @@ -90,5 +91,6 @@ d = [1: "foo", 2: "bar"] dict.insert(dict: d, key: 2, value: "baz")// Returns [1: "foo", 2: "baz"] + ``` diff --git a/content/flux/v0.x/stdlib/dict/remove.md b/content/flux/v0.x/stdlib/dict/remove.md index a677ced6c..fe0e042d0 100644 --- a/content/flux/v0.x/stdlib/dict/remove.md +++ b/content/flux/v0.x/stdlib/dict/remove.md @@ -67,5 +67,6 @@ d = [1: "foo", 2: "bar"] dict.remove(dict: d, key: 1)// Returns [2: "bar"] + ``` diff --git a/content/flux/v0.x/stdlib/experimental/addduration.md b/content/flux/v0.x/stdlib/experimental/addduration.md index 315f45f03..8724d6902 100644 --- a/content/flux/v0.x/stdlib/experimental/addduration.md +++ b/content/flux/v0.x/stdlib/experimental/addduration.md @@ -22,7 +22,7 @@ documentation is generated. To make updates to this documentation, update the function comments above the function definition in the Flux source code: -https://github.com/influxdata/flux/blob/master/stdlib/experimental/experimental.flux#L74-L74 +https://github.com/influxdata/flux/blob/master/stdlib/experimental/experimental.flux#L75-L75 Contributing to Flux: https://github.com/influxdata/flux#contributing Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md @@ -76,6 +76,7 @@ import "experimental" experimental.addDuration(d: 6h, to: 2019-09-16T12:00:00Z)// Returns 2019-09-16T18:00:00.000000000Z + ``` @@ -92,6 +93,7 @@ option now = () => 2021-12-10T16:27:40Z experimental.addDuration(d: 1mo, to: -1d)// Returns 2022-01-09T16:27:40Z + ``` @@ -104,5 +106,6 @@ option now = () => 2022-01-01T12:00:00Z experimental.addDuration(d: 6h, to: 3h)// Returns 2022-01-01T21:00:00.000000000Z + ``` diff --git a/content/flux/v0.x/stdlib/experimental/aggregate/rate.md b/content/flux/v0.x/stdlib/experimental/aggregate/rate.md index 60d6f3cbc..9fd1b7ac5 100644 --- a/content/flux/v0.x/stdlib/experimental/aggregate/rate.md +++ b/content/flux/v0.x/stdlib/experimental/aggregate/rate.md @@ -82,6 +82,7 @@ data = data |> aggregate.rate(every: 30s, unit: 1s, groupColumns: ["tag"]) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/experimental/aligntime.md b/content/flux/v0.x/stdlib/experimental/aligntime.md index b56aadcef..19d526c48 100644 --- a/content/flux/v0.x/stdlib/experimental/aligntime.md +++ b/content/flux/v0.x/stdlib/experimental/aligntime.md @@ -21,7 +21,7 @@ documentation is generated. To make updates to this documentation, update the function comments above the function definition in the Flux source code: -https://github.com/influxdata/flux/blob/master/stdlib/experimental/experimental.flux#L490-L494 +https://github.com/influxdata/flux/blob/master/stdlib/experimental/experimental.flux#L486-L490 Contributing to Flux: https://github.com/influxdata/flux#contributing Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md @@ -72,6 +72,7 @@ import "experimental" data |> window(every: 1mo) |> experimental.alignTime(alignTo: 2021-01-01T00:00:00Z) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/experimental/array/_index.md b/content/flux/v0.x/stdlib/experimental/array/_index.md index f55177946..a25ab933a 100644 --- a/content/flux/v0.x/stdlib/experimental/array/_index.md +++ b/content/flux/v0.x/stdlib/experimental/array/_index.md @@ -36,7 +36,7 @@ Import the `experimental/array` package: import "experimental/array" ``` - +**Deprecated**: This package is deprecated in favor of [`array`](https://docs.influxdata.com/flux/v0.x/stdlib/array/). ## Functions diff --git a/content/flux/v0.x/stdlib/experimental/array/concat.md b/content/flux/v0.x/stdlib/experimental/array/concat.md index 0ba6d929e..586a8c18c 100644 --- a/content/flux/v0.x/stdlib/experimental/array/concat.md +++ b/content/flux/v0.x/stdlib/experimental/array/concat.md @@ -10,6 +10,7 @@ menu: weight: 201 introduced: 0.155.0 +deprecated: 0.173.0 --- + +`experimental.catch()` calls a function and returns any error as a string value. +If the function does not error the returned value is made into a string and returned. + + + +##### Function type signature + +```js +(fn: () => A) => string +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### fn +({{< req >}}) +Function to call. + + + + +## Examples + +### Catch an explicit error + +```js +import "experimental" + +experimental.catch(fn: () => die(msg: "error message"))// Returns "error message" + + +``` + diff --git a/content/flux/v0.x/stdlib/experimental/chain.md b/content/flux/v0.x/stdlib/experimental/chain.md index aad05599a..c8118a91c 100644 --- a/content/flux/v0.x/stdlib/experimental/chain.md +++ b/content/flux/v0.x/stdlib/experimental/chain.md @@ -22,7 +22,7 @@ documentation is generated. To make updates to this documentation, update the function comments above the function definition in the Flux source code: -https://github.com/influxdata/flux/blob/master/stdlib/experimental/experimental.flux#L445-L445 +https://github.com/influxdata/flux/blob/master/stdlib/experimental/experimental.flux#L441-L441 Contributing to Flux: https://github.com/influxdata/flux#contributing Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md @@ -84,5 +84,6 @@ average_max = |> mean() experimental.chain(first: downsampled_max, second: average_max) + ``` diff --git a/content/flux/v0.x/stdlib/experimental/count.md b/content/flux/v0.x/stdlib/experimental/count.md index 2f74ce285..de58ec191 100644 --- a/content/flux/v0.x/stdlib/experimental/count.md +++ b/content/flux/v0.x/stdlib/experimental/count.md @@ -21,7 +21,7 @@ documentation is generated. To make updates to this documentation, update the function comments above the function definition in the Flux source code: -https://github.com/influxdata/flux/blob/master/stdlib/experimental/experimental.flux#L681-L681 +https://github.com/influxdata/flux/blob/master/stdlib/experimental/experimental.flux#L677-L677 Contributing to Flux: https://github.com/influxdata/flux#contributing Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md @@ -70,6 +70,7 @@ import "sampledata" sampledata.int() |> experimental.count() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/experimental/csv/_index.md b/content/flux/v0.x/stdlib/experimental/csv/_index.md index 88d51b89b..f98c60efc 100644 --- a/content/flux/v0.x/stdlib/experimental/csv/_index.md +++ b/content/flux/v0.x/stdlib/experimental/csv/_index.md @@ -11,6 +11,7 @@ weight: 21 cascade: flux/v0.x/tags: [csv] introduced: 0.64.0 + deprecated: 0.173.0 --- + +The `requests` package provides functions for transferring data using the HTTP protocol. +Import the `http/requests` package: + +```js +import "http/requests" +``` + + + +## Options + +```js +option requests.defaultConfig = { + // Timeout on the request. If the timeout is zero no timeout is applied + timeout: 0s, + // insecureSkipVerify If true, TLS verification will not be performed. This is insecure. + insecureSkipVerify: false, +} +``` + +### defaultConfig + +`defaultConfig` is the global default for all http requests using the requests package. +Changing this config will affect all other packages using the requests package. +To change the config for a single request, pass a new config directly into the corresponding function. + + + + +## Functions + +{{< children type="functions" show="pages" >}} diff --git a/content/flux/v0.x/stdlib/http/requests/do.md b/content/flux/v0.x/stdlib/http/requests/do.md new file mode 100644 index 000000000..0bd540d8d --- /dev/null +++ b/content/flux/v0.x/stdlib/http/requests/do.md @@ -0,0 +1,141 @@ +--- +title: requests.do() function +description: > + `requests.do()` makes an http request. +menu: + flux_0_x_ref: + name: requests.do + parent: http/requests + identifier: http/requests/do +weight: 201 +flux/v0.x/tags: [http, inputs] +--- + + + +`requests.do()` makes an http request. + + + +The returned response contains the following properties: + +- statusCode: HTTP status code returned from the request. +- body: Contents of the request. A maximum size of 100MB will be read from the response body. +- headers: Headers present on the response. +- duration: Duration of request. + +##### Function type signature + +```js +( + method: string, + url: string, + ?body: bytes, + ?config: {A with timeout: duration, insecureSkipVerify: bool}, + ?headers: [string:string], + ?params: [string:[string]], +) => {statusCode: int, headers: [string:string], duration: duration, body: bytes} +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### method +({{< req >}}) +method of the http request. +Supported methods: DELETE, GET, HEAD, PATCH, POST, PUT. + + + +### url +({{< req >}}) +URL to request. This should not include any query parameters. + + + +### params + +Set of key value pairs to add to the URL as query parameters. +Query parameters will be URL encoded. +All values for a key will be appended to the query. + + + +### headers + +Set of key values pairs to include on the request. + + + +### body + +Data to send with the request. + + + +### config + +Set of options to control how the request should be performed. + + + + +## Examples + +- [Make a GET request](#make-a-get-request) +- [Make a GET request that needs authorization](#make-a-get-request-that-needs-authorization) +- [Make a GET request with query parameters](#make-a-get-request-with-query-parameters) + +### Make a GET request + +```js +import "http/requests" + +response = requests.do(url: "http://example.com", method: "GET") + +requests.peek(response: response) + +``` + + +### Make a GET request that needs authorization + +```js +import "http/requests" +import "influxdata/influxdb/secrets" + +token = secrets.get(key: "TOKEN") + +response = requests.do(method: "GET", url: "http://example.com", headers: ["Authorization": "token ${token}"]) + +requests.peek(response: response) + +``` + + +### Make a GET request with query parameters + +```js +import "http/requests" + +response = requests.do(method: "GET", url: "http://example.com", params: ["start": ["100"]]) + +requests.peek(response: response) + +``` + diff --git a/content/flux/v0.x/stdlib/http/requests/get.md b/content/flux/v0.x/stdlib/http/requests/get.md new file mode 100644 index 000000000..0fbd5131b --- /dev/null +++ b/content/flux/v0.x/stdlib/http/requests/get.md @@ -0,0 +1,136 @@ +--- +title: requests.get() function +description: > + `requests.get()` makes a http GET request. This identical to calling `request.do(method: "GET", ...)`. +menu: + flux_0_x_ref: + name: requests.get + parent: http/requests + identifier: http/requests/get +weight: 201 +flux/v0.x/tags: [http, inputs] +--- + + + +`requests.get()` makes a http GET request. This identical to calling `request.do(method: "GET", ...)`. + + + +##### Function type signature + +```js +( + url: string, + ?body: bytes, + ?config: {A with timeout: duration, insecureSkipVerify: bool}, + ?headers: [string:string], + ?params: [string:[string]], +) => {statusCode: int, headers: [string:string], duration: duration, body: bytes} +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### url +({{< req >}}) +URL to request. This should not include any query parameters. + + + +### params + +Set of key value pairs to add to the URL as query parameters. +Query parameters will be URL encoded. +All values for a key will be appended to the query. + + + +### headers + +Set of key values pairs to include on the request. + + + +### body + +Data to send with the request. + + + +### config + +Set of options to control how the request should be performed. + + + + +## Examples + +- [Make a GET request](#make-a-get-request) +- [Make a GET request and decode the JSON response](#make-a-get-request-and-decode-the-json-response) + +### Make a GET request + +```js +import "http/requests" + +response = requests.get(url: "http://example.com") + +requests.peek(response: response) + +``` + + +### Make a GET request and decode the JSON response + +```js +import "http/requests" +import "experimental/json" +import "array" + +response = requests.get(url: "https://api.agify.io", params: ["name": ["nathaniel"]]) + +// api.agify.io returns JSON with the form +// +// { +// name: string, +// age: number, +// count: number, +// } +// +// Define a data variable that parses the JSON response body into a Flux record. +data = json.parse(data: response.body) + +// Use array.from() to construct a table with one row containing our response data. +// We do not care about the count so only include name and age. +array.from(rows: [{name: data.name, age: data.age}]) + +``` + +{{< expand-wrapper >}} +{{% expand "View example output" %}} + +#### Output data + +| name | age | +| --------- | ---- | +| nathaniel | 30 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/http/requests/peek.md b/content/flux/v0.x/stdlib/http/requests/peek.md new file mode 100644 index 000000000..e2c435a35 --- /dev/null +++ b/content/flux/v0.x/stdlib/http/requests/peek.md @@ -0,0 +1,94 @@ +--- +title: requests.peek() function +description: > + `requests.peek()` converts an HTTP response into a table for easy inspection. +menu: + flux_0_x_ref: + name: requests.peek + parent: http/requests + identifier: http/requests/peek +weight: 201 +--- + + + +`requests.peek()` converts an HTTP response into a table for easy inspection. + +The output table includes the following columns: + - **body** with the response body as a string + - **statusCode** with the returned status code as an integer + - **headers** with a string representation of the headers + - **duration** the duration of the request as a number of nanoseconds + +To customize how the response data is structured in a table, use `array.from()` +with a function like `json.parse()`. Parse the response body into a set of values +and then use `array.from()` to construct a table from those values. + +##### Function type signature + +```js +( + response: {A with statusCode: E, headers: D, duration: C, body: B}, +) => stream[{statusCode: E, headers: string, duration: int, body: string}] +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### response +({{< req >}}) +Response data from an HTTP request. + + + + +## Examples + +### Inspect the response of an HTTP request + +```js +import "http/requests" + +requests.peek(response: requests.get(url: "https://api.agify.io", params: ["name": ["natalie"]])) + +``` + +{{< expand-wrapper >}} +{{% expand "View example output" %}} + +#### Output data + +| body | duration | headers | statusCode | +| ----------------------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | +| {"name":"natalie","age":34,"count":20959} | 100000000 | [ + Access-Control-Allow-Headers: Content-Type, X-Genderize-Source, + Access-Control-Allow-Methods: GET, + Access-Control-Allow-Origin: *, + Connection: keep-alive, + Content-Length: 41, + Content-Type: application/json; charset=utf-8, + Date: Tue, 05 Jul 2022 20:54:46 GMT, + Etag: W/"29-klDahUESBLxHyQ7NiaetCn2CvCI", + Server: nginx/1.16.1, + X-Rate-Limit-Limit: 1000, + X-Rate-Limit-Remaining: 996, + X-Rate-Reset: 11113 +] | 200 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/http/requests/post.md b/content/flux/v0.x/stdlib/http/requests/post.md new file mode 100644 index 000000000..fc9cde32d --- /dev/null +++ b/content/flux/v0.x/stdlib/http/requests/post.md @@ -0,0 +1,116 @@ +--- +title: requests.post() function +description: > + `requests.post()` makes a http POST request. This identical to calling `request.do(method: "POST", ...)`. +menu: + flux_0_x_ref: + name: requests.post + parent: http/requests + identifier: http/requests/post +weight: 201 +flux/v0.x/tags: [http, inputs] +--- + + + +`requests.post()` makes a http POST request. This identical to calling `request.do(method: "POST", ...)`. + + + +##### Function type signature + +```js +( + url: string, + ?body: bytes, + ?config: {A with timeout: duration, insecureSkipVerify: bool}, + ?headers: [string:string], + ?params: [string:[string]], +) => {statusCode: int, headers: [string:string], duration: duration, body: bytes} +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### url +({{< req >}}) +URL to request. This should not include any query parameters. + + + +### params + +Set of key value pairs to add to the URL as query parameters. +Query parameters will be URL encoded. +All values for a key will be appended to the query. + + + +### headers + +Set of key values pairs to include on the request. + + + +### body + +Data to send with the request. + + + +### config + +Set of options to control how the request should be performed. + + + + +## Examples + +### Make a POST request with a JSON body and decode JSON response + +```js +import "http/requests" +import ejson "experimental/json" +import "json" +import "array" + +response = + requests.post( + url: "https://goolnk.com/api/v1/shorten", + body: json.encode(v: {url: "http://www.influxdata.com"}), + headers: ["Content-Type": "application/json"], + ) + +data = ejson.parse(data: response.body) + +array.from(rows: [data]) + +``` + +{{< expand-wrapper >}} +{{% expand "View example output" %}} + +#### Output data + +| result_url | +| ------------------------- | +| https://goolnk.com/BnXAE6 | + +{{% /expand %}} +{{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/buckets.md b/content/flux/v0.x/stdlib/influxdata/influxdb/buckets.md index 1f8b8e6c0..85918e94c 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/buckets.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/buckets.md @@ -86,5 +86,6 @@ _`token` is required when `host`, `org, or `orgID` are specified._ ```js buckets(org: "example-org", host: "http://localhost:8086", token: "mYSuP3rSecR37t0k3N") + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/cardinality.md b/content/flux/v0.x/stdlib/influxdata/influxdb/cardinality.md index 8c260c095..ca0921eb0 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/cardinality.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/cardinality.md @@ -125,6 +125,7 @@ Default is `(r) => true`. import "influxdata/influxdb" influxdb.cardinality(bucket: "example-bucket", start: -1y) + ``` @@ -134,6 +135,7 @@ influxdb.cardinality(bucket: "example-bucket", start: -1y) import "influxdata/influxdb" influxdb.cardinality(bucket: "example-bucket", start: -1y, predicate: (r) => r._measurement == "example-measurement") + ``` @@ -143,5 +145,6 @@ influxdb.cardinality(bucket: "example-bucket", start: -1y, predicate: (r) => r._ import "influxdata/influxdb" influxdb.cardinality(bucket: "example-bucket", start: -1y, predicate: (r) => r.exampleTag == "foo") + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/from.md b/content/flux/v0.x/stdlib/influxdata/influxdb/from.md index f68edb733..510589225 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/from.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/from.md @@ -114,6 +114,7 @@ username and password using the `:` syntax. ```js from(bucket: "example-bucket") + ``` @@ -121,6 +122,7 @@ from(bucket: "example-bucket") ```js from(bucketID: "0261d8287f4d6000") + ``` @@ -132,5 +134,6 @@ import "influxdata/influxdb/secrets" token = secrets.get(key: "INFLUXDB_CLOUD_TOKEN") from(bucket: "example-bucket", host: "https://us-west-2-1.aws.cloud2.influxdata.com", org: "example-org", token: token) + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/check.md b/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/check.md index dcd355660..a4b0889df 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/check.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/check.md @@ -163,5 +163,6 @@ from(bucket: "telegraf") tags: {}, }, ) + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/deadman.md b/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/deadman.md index b3df10d8b..69adfcb72 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/deadman.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/deadman.md @@ -82,6 +82,7 @@ data = data |> monitor.deadman(t: 2021-01-01T00:05:00Z) + ``` {{< expand-wrapper >}} @@ -119,5 +120,6 @@ from(bucket: "example-bucket") |> range(start: -10m) |> filter(fn: (r) => r._measurement == "example-measurement") |> monitor.deadman(t: experimental.addDuration(d: -5m, from: now())) + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/from.md b/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/from.md index c6bf5a516..6802679aa 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/from.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/from.md @@ -88,5 +88,6 @@ Records that evaluate to _null_ or `false` are not included in output tables. import "influxdata/influxdb/monitor" monitor.from(start: -1h, fn: (r) => r._level == "crit") + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/logs.md b/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/logs.md index 60d4ff9c6..16729e8ac 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/logs.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/logs.md @@ -89,5 +89,6 @@ Records that evaluate to _null_ or `false` are not included in output tables. import "influxdata/influxdb/monitor" monitor.logs(start: -2h, fn: (r) => true) + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/notify.md b/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/notify.md index 13e91e72c..b75c97248 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/notify.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/notify.md @@ -98,5 +98,6 @@ notification_data = { monitor.from(range: -5m, fn: (r) => r._level == "crit") |> range(start: -5m) |> monitor.notify(endpoint: endpoint, data: notification_data) + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/statechanges.md b/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/statechanges.md index 8e5acd372..163fae812 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/statechanges.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/statechanges.md @@ -83,6 +83,7 @@ data = data |> monitor.stateChanges(toLevel: "crit") + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/statechangesonly.md b/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/statechangesonly.md index fb421e69b..c73814ed9 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/statechangesonly.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/monitor/statechangesonly.md @@ -73,6 +73,7 @@ data = data |> monitor.stateChangesOnly() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/sample/aligntonow.md b/content/flux/v0.x/stdlib/influxdata/influxdb/sample/aligntonow.md index d80cb00fd..774789352 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/sample/aligntonow.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/sample/aligntonow.md @@ -61,5 +61,6 @@ import "influxdata/influxdb/sample" sample.data(set: "birdMigration") |> sample.alignToNow() + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/sample/list.md b/content/flux/v0.x/stdlib/influxdata/influxdb/sample/list.md index a5d554c1d..8c5114886 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/sample/list.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/sample/list.md @@ -55,5 +55,6 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md import "influxdata/influxdb/sample" sample.list() + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/schema/fieldkeys.md b/content/flux/v0.x/stdlib/influxdata/influxdb/schema/fieldkeys.md index 05f30b62c..1df2881fe 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/schema/fieldkeys.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/schema/fieldkeys.md @@ -97,5 +97,6 @@ Absolute start times are defined using time values. import "influxdata/influxdb/schema" schema.fieldKeys(bucket: "example-bucket") + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/schema/fieldsascols.md b/content/flux/v0.x/stdlib/influxdata/influxdb/schema/fieldsascols.md index 6d1f0b00e..d1466c1a8 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/schema/fieldsascols.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/schema/fieldsascols.md @@ -61,6 +61,7 @@ import "influxdata/influxdb/schema" data |> schema.fieldsAsCols() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementfieldkeys.md b/content/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementfieldkeys.md index dcbdb73d4..c6a619671 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementfieldkeys.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementfieldkeys.md @@ -78,5 +78,6 @@ Absolute start times are defined using time values. import "influxdata/influxdb/schema" schema.measurementFieldKeys(bucket: "example-bucket", measurement: "example-measurement") + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/schema/measurements.md b/content/flux/v0.x/stdlib/influxdata/influxdb/schema/measurements.md index 3ac590894..6e8dcc966 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/schema/measurements.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/schema/measurements.md @@ -70,5 +70,6 @@ Default is `now()`. import "influxdata/influxdb/schema" schema.measurements(bucket: "example-bucket") + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagkeys.md b/content/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagkeys.md index c7ebe44b3..5b025cb57 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagkeys.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagkeys.md @@ -76,5 +76,6 @@ Default is `now()`. import "influxdata/influxdb/schema" schema.measurementTagKeys(bucket: "example-bucket", measurement: "example-measurement") + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagvalues.md b/content/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagvalues.md index adee740fa..938b5c70d 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagvalues.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagvalues.md @@ -88,5 +88,6 @@ Default is `now()`. import "influxdata/influxdb/schema" schema.measurementTagValues(bucket: "example-bucket", measurement: "example-measurement", tag: "example-tag") + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/schema/tagkeys.md b/content/flux/v0.x/stdlib/influxdata/influxdb/schema/tagkeys.md index 41d78e61b..d7e69befc 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/schema/tagkeys.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/schema/tagkeys.md @@ -94,5 +94,6 @@ Absolute start times are defined using time values. import "influxdata/influxdb/schema" schema.tagKeys(bucket: "example-bucket") + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/schema/tagvalues.md b/content/flux/v0.x/stdlib/influxdata/influxdb/schema/tagvalues.md index 0137bb822..c6e33a55e 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/schema/tagvalues.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/schema/tagvalues.md @@ -101,5 +101,6 @@ Absolute start times are defined using time values. import "influxdata/influxdb/schema" schema.tagValues(bucket: "example-bucket", tag: "host") + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/secrets/get.md b/content/flux/v0.x/stdlib/influxdata/influxdb/secrets/get.md index 627575441..4dbf72e0c 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/secrets/get.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/secrets/get.md @@ -58,6 +58,7 @@ Secret key to retrieve. import "influxdata/influxdb/secrets" secrets.get(key: "KEY_NAME") + ``` @@ -75,5 +76,6 @@ sql.from( dataSourceName: "postgresql://${username}:${password}@localhost", query: "SELECT * FROM example-table", ) + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/tasks/lastsuccess.md b/content/flux/v0.x/stdlib/influxdata/influxdb/tasks/lastsuccess.md index 4370b4e1e..acb6aacdc 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/tasks/lastsuccess.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/tasks/lastsuccess.md @@ -57,5 +57,6 @@ Defualt time value returned if the task has never successfully run. import "influxdata/influxdb/tasks" tasks.lastSuccess(orTime: 2020-01-01T00:00:00Z) + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/to.md b/content/flux/v0.x/stdlib/influxdata/influxdb/to.md index 8435c6bbf..f53a454dc 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/to.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/to.md @@ -195,6 +195,7 @@ data = data |> to(bucket: "example-bucket", org: "example-org", token: "mYSuP3rSecR37t0k3N", host: "http://localhost:8086") + ``` The example above produces the following line protocol and sends it to the @@ -252,6 +253,7 @@ data tagColumns: ["tag2"], fieldFn: (r) => ({"hum": r.hum, "temp": r.temp}), ) + ``` The example above produces the following line protocol and sends it to the @@ -282,5 +284,6 @@ data |> count() |> map(fn: (r) => ({r with _time: now(), _measurement: "writeStats", _field: "numPointsWritten"})) |> to(bucket: "bucket2") + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/v1/databases.md b/content/flux/v0.x/stdlib/influxdata/influxdb/v1/databases.md index 510c4bfb0..89ef78df9 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/v1/databases.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/v1/databases.md @@ -91,5 +91,6 @@ InfluxDB API token. import "influxdata/influxdb/v1" v1.databases() + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/v1/fieldkeys.md b/content/flux/v0.x/stdlib/influxdata/influxdb/v1/fieldkeys.md index 8e71e513c..b42b75712 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/v1/fieldkeys.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/v1/fieldkeys.md @@ -98,5 +98,6 @@ Absolute start times are defined using time values. import "influxdata/influxdb/schema" schema.fieldKeys(bucket: "example-bucket") + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/v1/fieldsascols.md b/content/flux/v0.x/stdlib/influxdata/influxdb/v1/fieldsascols.md index cd22f6bbc..a3c63790d 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/v1/fieldsascols.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/v1/fieldsascols.md @@ -62,6 +62,7 @@ import "influxdata/influxdb/v1" data |> v1.fieldsAsCols() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/v1/json.md b/content/flux/v0.x/stdlib/influxdata/influxdb/v1/json.md index 7893e699b..34db54d68 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/v1/json.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/v1/json.md @@ -101,6 +101,7 @@ jsonData = }" v1.json(json: jsonData) + ``` {{< expand-wrapper >}} @@ -123,5 +124,6 @@ v1.json(json: jsonData) import "influxdata/influxdb/v1" v1.json(file: "/path/to/results.json") + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/v1/measurementfieldkeys.md b/content/flux/v0.x/stdlib/influxdata/influxdb/v1/measurementfieldkeys.md index 00571fd4d..3f33a60d1 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/v1/measurementfieldkeys.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/v1/measurementfieldkeys.md @@ -79,5 +79,6 @@ Absolute start times are defined using time values. import "influxdata/influxdb/schema" schema.measurementFieldKeys(bucket: "example-bucket", measurement: "example-measurement") + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/v1/measurements.md b/content/flux/v0.x/stdlib/influxdata/influxdb/v1/measurements.md index 87c3afb1a..cb288ce76 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/v1/measurements.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/v1/measurements.md @@ -71,5 +71,6 @@ Default is `now()`. import "influxdata/influxdb/schema" schema.measurements(bucket: "example-bucket") + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/v1/measurementtagkeys.md b/content/flux/v0.x/stdlib/influxdata/influxdb/v1/measurementtagkeys.md index f66e6d200..bf560a971 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/v1/measurementtagkeys.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/v1/measurementtagkeys.md @@ -77,5 +77,6 @@ Default is `now()`. import "influxdata/influxdb/schema" schema.measurementTagKeys(bucket: "example-bucket", measurement: "example-measurement") + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/v1/measurementtagvalues.md b/content/flux/v0.x/stdlib/influxdata/influxdb/v1/measurementtagvalues.md index 962f3d761..5c208bbbc 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/v1/measurementtagvalues.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/v1/measurementtagvalues.md @@ -89,5 +89,6 @@ Default is `now()`. import "influxdata/influxdb/schema" schema.measurementTagValues(bucket: "example-bucket", measurement: "example-measurement", tag: "example-tag") + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/v1/tagkeys.md b/content/flux/v0.x/stdlib/influxdata/influxdb/v1/tagkeys.md index 03d9fd35a..e83329786 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/v1/tagkeys.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/v1/tagkeys.md @@ -95,5 +95,6 @@ Absolute start times are defined using time values. import "influxdata/influxdb/v1" v1.tagKeys(bucket: "example-bucket") + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/v1/tagvalues.md b/content/flux/v0.x/stdlib/influxdata/influxdb/v1/tagvalues.md index 9b092e079..3ca0f0611 100644 --- a/content/flux/v0.x/stdlib/influxdata/influxdb/v1/tagvalues.md +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/v1/tagvalues.md @@ -102,5 +102,6 @@ Absolute start times are defined using time values. import "influxdata/influxdb/v1" v1.tagValues(bucket: "example-bucket", tag: "host") + ``` diff --git a/content/flux/v0.x/stdlib/influxdata/influxdb/wideto.md b/content/flux/v0.x/stdlib/influxdata/influxdb/wideto.md new file mode 100644 index 000000000..bd0fdc2d4 --- /dev/null +++ b/content/flux/v0.x/stdlib/influxdata/influxdb/wideto.md @@ -0,0 +1,131 @@ +--- +title: influxdb.wideTo() function +description: > + `influxdb.wideTo()` writes wide data to an InfluxDB 2.x or InfluxDB Cloud bucket. + Wide data is _pivoted_ in that its fields are represented as columns making the table wider. +menu: + flux_0_x_ref: + name: influxdb.wideTo + parent: influxdata/influxdb + identifier: influxdata/influxdb/wideTo +weight: 201 +flux/v0.x/tags: [outputs] +introduced: 0.174.0 +--- + + + +`influxdb.wideTo()` writes wide data to an InfluxDB 2.x or InfluxDB Cloud bucket. +Wide data is _pivoted_ in that its fields are represented as columns making the table wider. + +#### Requirements and behavior +- Requires both a `_time` and a `_measurement` column. +- All columns in the group key (other than `_measurement`) are written as tags + with the column name as the tag key and the column value as the tag value. +- All columns **not** in the group key (other than `_time`) are written as + fields with the column name as the field key and the column value as the field value. + +If using the `from()` to query data from InfluxDB, use pivot() to transform +data into the structure `experimental.to()` expects. + +##### Function type signature + +```js +( + <-tables: stream[A], + ?bucket: string, + ?bucketID: string, + ?host: string, + ?org: string, + ?orgID: string, + ?token: string, +) => stream[A] where A: Record +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### bucket + +Name of the bucket to write to. +_`bucket` and `bucketID` are mutually exclusive_. + + + +### bucketID + +String-encoded bucket ID to to write to. +_`bucket` and `bucketID` are mutually exclusive_. + + + +### host + +URL of the InfluxDB instance to write to. + +See [InfluxDB Cloud regions](https://docs.influxdata.com/influxdb/cloud/reference/regions/) +or [InfluxDB OSS URLs](https://docs.influxdata.com/influxdb/latest/reference/urls/). +`host` is required when writing to a remote InfluxDB instance. +If specified, `token` is also required. + +### org + +Organization name. +_`org` and `orgID` are mutually exclusive_. + + + +### orgID + +String-encoded organization ID to query. +_`org` and `orgID` are mutually exclusive_. + + + +### token + +InfluxDB API token. + +**InfluxDB 1.x or Enterprise**: If authentication is disabled, provide an +empty string (`""`). If authentication is enabled, provide your InfluxDB +username and password using the `:` syntax. +`token` is required when writing to another organization or when `host` +is specified. + +### tables + +Input data. Default is piped-forward data (`<-`). + + + + +## Examples + +### Pivot and write data to InfluxDB + +```js +import "influxdata/influxdb" +import "influxdata/influxdb/schema" + +from(bucket: "example-bucket") + |> range(start: -1h) + |> schema.fieldsAsCols() + |> wideTo(bucket: "example-target-bucket") + +``` + diff --git a/content/flux/v0.x/stdlib/interpolate/linear.md b/content/flux/v0.x/stdlib/interpolate/linear.md index c50ca7458..276c909e8 100644 --- a/content/flux/v0.x/stdlib/interpolate/linear.md +++ b/content/flux/v0.x/stdlib/interpolate/linear.md @@ -67,6 +67,7 @@ import "interpolate" data |> interpolate.linear(every: 1d) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/join/full.md b/content/flux/v0.x/stdlib/join/full.md index 9ac6f391d..fd786eea7 100644 --- a/content/flux/v0.x/stdlib/join/full.md +++ b/content/flux/v0.x/stdlib/join/full.md @@ -121,6 +121,7 @@ join.full( return {_time: time, label: label, v_left: l._value, v_right: r._value} }, ) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/join/inner.md b/content/flux/v0.x/stdlib/join/inner.md index 3c4b7fe09..373ecae05 100644 --- a/content/flux/v0.x/stdlib/join/inner.md +++ b/content/flux/v0.x/stdlib/join/inner.md @@ -82,6 +82,7 @@ ints = sampledata.int() strings = sampledata.string() join.inner(left: ints, right: strings, on: (l, r) => l._time == r._time, as: (l, r) => ({l with label: r._value})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/join/left.md b/content/flux/v0.x/stdlib/join/left.md index 626220048..6e8dc8597 100644 --- a/content/flux/v0.x/stdlib/join/left.md +++ b/content/flux/v0.x/stdlib/join/left.md @@ -109,6 +109,7 @@ join.left( on: (l, r) => l.label == r.id and l._time == r._time, as: (l, r) => ({_time: l._time, label: l.label, v_left: l._value, v_right: r._value}), ) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/join/right.md b/content/flux/v0.x/stdlib/join/right.md index 0eb495e3d..8ffce66fb 100644 --- a/content/flux/v0.x/stdlib/join/right.md +++ b/content/flux/v0.x/stdlib/join/right.md @@ -109,6 +109,7 @@ join.right( on: (l, r) => l.label == r.id and l._time == r._time, as: (l, r) => ({_time: r._time, label: r.id, v_left: l._value, v_right: r._value}), ) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/join/tables.md b/content/flux/v0.x/stdlib/join/tables.md index a1a926606..1ea43d34d 100644 --- a/content/flux/v0.x/stdlib/join/tables.md +++ b/content/flux/v0.x/stdlib/join/tables.md @@ -109,6 +109,7 @@ join.tables( on: (l, r) => l._time == r._time, as: (l, r) => ({l with label: r._value}), ) + ``` {{< expand-wrapper >}} @@ -185,6 +186,7 @@ join.tables( on: (l, r) => l.label == r.id and l._time == r._time, as: (l, r) => ({_time: l._time, label: l.label, v_left: l._value, v_right: r._value}), ) + ``` {{< expand-wrapper >}} @@ -237,6 +239,7 @@ join.tables( on: (l, r) => l.label == r.id and l._time == r._time, as: (l, r) => ({_time: r._time, label: r.id, v_left: l._value, v_right: r._value}), ) + ``` {{< expand-wrapper >}} @@ -300,6 +303,7 @@ join.tables( return {_time: time, label: label, v_left: l._value, v_right: r._value} }, ) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/join/time.md b/content/flux/v0.x/stdlib/join/time.md index cedc826b2..97616a53a 100644 --- a/content/flux/v0.x/stdlib/join/time.md +++ b/content/flux/v0.x/stdlib/join/time.md @@ -89,6 +89,7 @@ ints = sampledata.int() strings = sampledata.string() join.time(left: ints, right: strings, as: (l, r) => ({l with label: r._value})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/json/encode.md b/content/flux/v0.x/stdlib/json/encode.md index 0c2d10de9..d517e2cf3 100644 --- a/content/flux/v0.x/stdlib/json/encode.md +++ b/content/flux/v0.x/stdlib/json/encode.md @@ -67,5 +67,6 @@ json.encode( v: jsonData, )// Returns [123 34 98 97 122 34 58 49 50 51 44 34 102 111 111 34 58 34 98 97 114 34 44 34 113 117 122 34 58 91 52 44 53 44 54 93 125] + ``` diff --git a/content/flux/v0.x/stdlib/kafka/to.md b/content/flux/v0.x/stdlib/kafka/to.md index f761aee58..674bb0837 100644 --- a/content/flux/v0.x/stdlib/kafka/to.md +++ b/content/flux/v0.x/stdlib/kafka/to.md @@ -129,5 +129,6 @@ sampledata.int() name: "example-metric-name", tagColumns: ["tag"], ) + ``` diff --git a/content/flux/v0.x/stdlib/math/abs.md b/content/flux/v0.x/stdlib/math/abs.md index 5e5a0c720..95a13e206 100644 --- a/content/flux/v0.x/stdlib/math/abs.md +++ b/content/flux/v0.x/stdlib/math/abs.md @@ -57,6 +57,7 @@ Value to operate on. ```js math.abs(x: -1.22)// 1.22 + ``` @@ -65,6 +66,7 @@ math.abs(x: -1.22)// 1.22 ```js sampledata.float() |> map(fn: (r) => ({r with _value: math.abs(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/acos.md b/content/flux/v0.x/stdlib/math/acos.md index 957dd63c1..5ed26dfd8 100644 --- a/content/flux/v0.x/stdlib/math/acos.md +++ b/content/flux/v0.x/stdlib/math/acos.md @@ -60,6 +60,7 @@ import "math" math.acos(x: 0.22)// 1.3489818562981022 + ``` @@ -70,6 +71,7 @@ import "math" data |> map(fn: (r) => ({r with _value: math.acos(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/acosh.md b/content/flux/v0.x/stdlib/math/acosh.md index 421f91d40..fca943d4f 100644 --- a/content/flux/v0.x/stdlib/math/acosh.md +++ b/content/flux/v0.x/stdlib/math/acosh.md @@ -58,6 +58,7 @@ Value to operate on. import "math" math.acosh(x: 1.22) + ``` @@ -68,6 +69,7 @@ import "math" data |> map(fn: (r) => ({r with _value: math.acosh(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/asin.md b/content/flux/v0.x/stdlib/math/asin.md index f84159131..91b59cc8f 100644 --- a/content/flux/v0.x/stdlib/math/asin.md +++ b/content/flux/v0.x/stdlib/math/asin.md @@ -59,6 +59,7 @@ return `NaN`. import "math" math.asin(x: 0.22) + ``` @@ -69,6 +70,7 @@ import "math" data |> map(fn: (r) => ({r with _value: math.asin(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/asinh.md b/content/flux/v0.x/stdlib/math/asinh.md index 259370cf0..77af845bf 100644 --- a/content/flux/v0.x/stdlib/math/asinh.md +++ b/content/flux/v0.x/stdlib/math/asinh.md @@ -59,6 +59,7 @@ import "math" math.asinh(x: 3.14)// 1.8618125572133835 + ``` @@ -70,6 +71,7 @@ import "sampledata" sampledata.float() |> map(fn: (r) => ({r with _value: math.asinh(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/atan.md b/content/flux/v0.x/stdlib/math/atan.md index bb56cb1b0..c1540f11f 100644 --- a/content/flux/v0.x/stdlib/math/atan.md +++ b/content/flux/v0.x/stdlib/math/atan.md @@ -59,6 +59,7 @@ import "math" math.atan(x: 3.14)// 1.262480664599468 + ``` @@ -70,6 +71,7 @@ import "sampledata" sampledata.float() |> map(fn: (r) => ({r with _value: math.atan(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/atanh.md b/content/flux/v0.x/stdlib/math/atanh.md index 2d1137017..009442489 100644 --- a/content/flux/v0.x/stdlib/math/atanh.md +++ b/content/flux/v0.x/stdlib/math/atanh.md @@ -60,6 +60,7 @@ import "math" math.atanh(x: 0.22)// 0.22365610902183242 + ``` @@ -70,6 +71,7 @@ import "math" data |> map(fn: (r) => ({r with _value: math.atanh(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/cbrt.md b/content/flux/v0.x/stdlib/math/cbrt.md index c5f8a7962..eb9f861a3 100644 --- a/content/flux/v0.x/stdlib/math/cbrt.md +++ b/content/flux/v0.x/stdlib/math/cbrt.md @@ -59,6 +59,7 @@ import "math" math.cbrt(x: 1728.0)// 12.0 + ``` @@ -70,6 +71,7 @@ import "sampledata" sampledata.float() |> map(fn: (r) => ({r with _value: math.cbrt(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/ceil.md b/content/flux/v0.x/stdlib/math/ceil.md index 708b4e708..600b44ba9 100644 --- a/content/flux/v0.x/stdlib/math/ceil.md +++ b/content/flux/v0.x/stdlib/math/ceil.md @@ -59,6 +59,7 @@ import "math" math.ceil(x: 3.14)// 4.0 + ``` @@ -70,6 +71,7 @@ import "sampledata" sampledata.float() |> map(fn: (r) => ({r with _value: math.ceil(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/copysign.md b/content/flux/v0.x/stdlib/math/copysign.md index 5f9134bbe..4f6438f51 100644 --- a/content/flux/v0.x/stdlib/math/copysign.md +++ b/content/flux/v0.x/stdlib/math/copysign.md @@ -64,6 +64,7 @@ Sign to use in the operation. import "math" math.copysign(x: 1.0, y: 2.0) + ``` @@ -74,6 +75,7 @@ import "math" data |> map(fn: (r) => ({_time: r._time, _value: math.copysign(x: r.x, y: r.y)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/cos.md b/content/flux/v0.x/stdlib/math/cos.md index 4b3dd4ef2..1cb9f49ed 100644 --- a/content/flux/v0.x/stdlib/math/cos.md +++ b/content/flux/v0.x/stdlib/math/cos.md @@ -57,5 +57,6 @@ import "sampledata" sampledata.float() |> map(fn: (r) => ({_time: r._time, _value: math.cos(x: r._value)})) + ``` diff --git a/content/flux/v0.x/stdlib/math/cosh.md b/content/flux/v0.x/stdlib/math/cosh.md index 1a7ffa178..75f646de5 100644 --- a/content/flux/v0.x/stdlib/math/cosh.md +++ b/content/flux/v0.x/stdlib/math/cosh.md @@ -57,5 +57,6 @@ import "sampledata" sampledata.float() |> map(fn: (r) => ({_time: r._time, _value: math.cosh(x: r._value)})) + ``` diff --git a/content/flux/v0.x/stdlib/math/dim.md b/content/flux/v0.x/stdlib/math/dim.md index c7f1bd10c..d46360a9e 100644 --- a/content/flux/v0.x/stdlib/math/dim.md +++ b/content/flux/v0.x/stdlib/math/dim.md @@ -65,6 +65,7 @@ import "math" math.dim(x: 12.2, y: 8.1)// 4.1 + ``` @@ -75,6 +76,7 @@ import "math" data |> map(fn: (r) => ({_time: r._time, _value: math.dim(x: r.x, y: r.y)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/erf.md b/content/flux/v0.x/stdlib/math/erf.md index 0e10c8fe2..1d2147313 100644 --- a/content/flux/v0.x/stdlib/math/erf.md +++ b/content/flux/v0.x/stdlib/math/erf.md @@ -59,6 +59,7 @@ import "math" math.erf(x: 22.6)// 1.0 + ``` @@ -70,6 +71,7 @@ import "sampledata" sampledata.float() |> map(fn: (r) => ({r with _value: math.erf(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/erfc.md b/content/flux/v0.x/stdlib/math/erfc.md index 2c74baab6..ad472eded 100644 --- a/content/flux/v0.x/stdlib/math/erfc.md +++ b/content/flux/v0.x/stdlib/math/erfc.md @@ -59,6 +59,7 @@ import "math" math.erfc(x: 22.6)// 3.772618913849058e-224 + ``` @@ -70,6 +71,7 @@ import "sampledata" sampledata.float() |> map(fn: (r) => ({r with _value: math.erfc(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/erfcinv.md b/content/flux/v0.x/stdlib/math/erfcinv.md index ed997f76f..dfc0080b9 100644 --- a/content/flux/v0.x/stdlib/math/erfcinv.md +++ b/content/flux/v0.x/stdlib/math/erfcinv.md @@ -60,6 +60,7 @@ import "math" math.erfcinv(x: 0.42345)// 0.5660037715858239 + ``` @@ -70,6 +71,7 @@ import "math" data |> map(fn: (r) => ({r with _value: math.erfcinv(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/erfinv.md b/content/flux/v0.x/stdlib/math/erfinv.md index 56569ddd4..304c75f02 100644 --- a/content/flux/v0.x/stdlib/math/erfinv.md +++ b/content/flux/v0.x/stdlib/math/erfinv.md @@ -60,6 +60,7 @@ import "math" math.erfinv(x: 0.22)// 0.19750838337227364 + ``` @@ -70,6 +71,7 @@ import "math" data |> map(fn: (r) => ({r with _value: math.erfinv(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/exp.md b/content/flux/v0.x/stdlib/math/exp.md index 0719e0964..ef2146986 100644 --- a/content/flux/v0.x/stdlib/math/exp.md +++ b/content/flux/v0.x/stdlib/math/exp.md @@ -59,6 +59,7 @@ import "math" math.exp(x: 21.0)// 1.3188157344832146e+09 + ``` @@ -70,6 +71,7 @@ import "math" sampledata.float() |> map(fn: (r) => ({r with _value: math.exp(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/exp2.md b/content/flux/v0.x/stdlib/math/exp2.md index b33e3b410..19cbcc22a 100644 --- a/content/flux/v0.x/stdlib/math/exp2.md +++ b/content/flux/v0.x/stdlib/math/exp2.md @@ -59,6 +59,7 @@ import "math" math.exp2(x: 21.0)// 2.097152e+06 + ``` @@ -70,6 +71,7 @@ import "math" sampledata.float() |> map(fn: (r) => ({r with _value: math.exp2(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/expm1.md b/content/flux/v0.x/stdlib/math/expm1.md index 5381b7706..aff9c9401 100644 --- a/content/flux/v0.x/stdlib/math/expm1.md +++ b/content/flux/v0.x/stdlib/math/expm1.md @@ -61,6 +61,7 @@ import "math" math.expm1(x: 0.022)// 0.022243784470438233 + ``` @@ -71,6 +72,7 @@ import "math" data |> map(fn: (r) => ({r with _value: math.expm1(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/float64bits.md b/content/flux/v0.x/stdlib/math/float64bits.md index f93c1694c..69a44e097 100644 --- a/content/flux/v0.x/stdlib/math/float64bits.md +++ b/content/flux/v0.x/stdlib/math/float64bits.md @@ -61,6 +61,7 @@ import "math" math.float64bits(f: 1234.56)// 4653144467747100426 + ``` @@ -72,6 +73,7 @@ import "math" sampledata.float() |> map(fn: (r) => ({r with _value: math.float64bits(f: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/float64frombits.md b/content/flux/v0.x/stdlib/math/float64frombits.md index 8fd381a60..7449329e3 100644 --- a/content/flux/v0.x/stdlib/math/float64frombits.md +++ b/content/flux/v0.x/stdlib/math/float64frombits.md @@ -63,6 +63,7 @@ import "math" math.float64frombits(b: uint(v: 4))// 2e-323 + ``` @@ -73,6 +74,7 @@ import "math" data |> map(fn: (r) => ({r with _value: math.float64frombits(b: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/floor.md b/content/flux/v0.x/stdlib/math/floor.md index 7607b0cf7..f2943dd97 100644 --- a/content/flux/v0.x/stdlib/math/floor.md +++ b/content/flux/v0.x/stdlib/math/floor.md @@ -59,6 +59,7 @@ import "math" math.floor(x: 1.22)// 1.0 + ``` @@ -70,6 +71,7 @@ import "math" sampledata.float() |> map(fn: (r) => ({r with _value: math.floor(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/frexp.md b/content/flux/v0.x/stdlib/math/frexp.md index 08d44651e..4ba4353bf 100644 --- a/content/flux/v0.x/stdlib/math/frexp.md +++ b/content/flux/v0.x/stdlib/math/frexp.md @@ -60,6 +60,7 @@ import "math" math.frexp(f: 22.0)// {exp: 5, frac: 0.6875} + ``` @@ -77,6 +78,7 @@ sampledata.float() return {r with exp: result.exp, frac: result.frac} }, ) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/gamma.md b/content/flux/v0.x/stdlib/math/gamma.md index 480e17562..71d09caff 100644 --- a/content/flux/v0.x/stdlib/math/gamma.md +++ b/content/flux/v0.x/stdlib/math/gamma.md @@ -59,6 +59,7 @@ import "math" math.gamma(x: 2.12)// 1.056821007887572 + ``` @@ -70,6 +71,7 @@ import "math" sampledata.float() |> map(fn: (r) => ({r with _value: math.gamma(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/hypot.md b/content/flux/v0.x/stdlib/math/hypot.md index aa13b1c1e..453700b9e 100644 --- a/content/flux/v0.x/stdlib/math/hypot.md +++ b/content/flux/v0.x/stdlib/math/hypot.md @@ -67,6 +67,7 @@ import "math" math.hypot(p: 2.0, q: 5.0)// 5.385164807134505 + ``` @@ -77,6 +78,7 @@ import "math" data |> map(fn: (r) => ({r with _value: math.hypot(p: r.a, q: r.b)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/ilogb.md b/content/flux/v0.x/stdlib/math/ilogb.md index f34825810..d39c3d614 100644 --- a/content/flux/v0.x/stdlib/math/ilogb.md +++ b/content/flux/v0.x/stdlib/math/ilogb.md @@ -59,6 +59,7 @@ import "math" math.ilogb(x: 123.45)// 6 + ``` @@ -70,6 +71,7 @@ import "math" sampledata.float() |> map(fn: (r) => ({r with _value: math.ilogb(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/isinf.md b/content/flux/v0.x/stdlib/math/isinf.md index 12ba9dcee..100ee601e 100644 --- a/content/flux/v0.x/stdlib/math/isinf.md +++ b/content/flux/v0.x/stdlib/math/isinf.md @@ -67,6 +67,7 @@ import "math" math.isInf(f: 2.12, sign: 3)// false + ``` @@ -77,6 +78,7 @@ import "math" data |> map(fn: (r) => ({r with _value: math.isInf(f: r._value, sign: 1)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/isnan.md b/content/flux/v0.x/stdlib/math/isnan.md index ec6a5a048..2a649e8d7 100644 --- a/content/flux/v0.x/stdlib/math/isnan.md +++ b/content/flux/v0.x/stdlib/math/isnan.md @@ -59,6 +59,7 @@ import "math" math.isNaN(f: 12.345)// false + ``` @@ -69,6 +70,7 @@ import "math" data |> map(fn: (r) => ({r with _value: math.isNaN(f: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/j0.md b/content/flux/v0.x/stdlib/math/j0.md index 7d71c13c3..223ddcb06 100644 --- a/content/flux/v0.x/stdlib/math/j0.md +++ b/content/flux/v0.x/stdlib/math/j0.md @@ -59,6 +59,7 @@ import "math" math.j0(x: 1.23)// 0.656070571706025 + ``` @@ -70,6 +71,7 @@ import "math" sampledata.float() |> map(fn: (r) => ({r with _value: math.j0(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/j1.md b/content/flux/v0.x/stdlib/math/j1.md index dfb4de258..3e2f3fa48 100644 --- a/content/flux/v0.x/stdlib/math/j1.md +++ b/content/flux/v0.x/stdlib/math/j1.md @@ -59,6 +59,7 @@ import "math" math.j1(x: 1.23)// 0.5058005726280961 + ``` @@ -70,6 +71,7 @@ import "math" sampledata.float() |> map(fn: (r) => ({r with _value: math.j1(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/jn.md b/content/flux/v0.x/stdlib/math/jn.md index a8739fe7d..06eb037fe 100644 --- a/content/flux/v0.x/stdlib/math/jn.md +++ b/content/flux/v0.x/stdlib/math/jn.md @@ -65,6 +65,7 @@ import "math" math.jn(n: 2, x: 1.23)// 0.16636938378681407 + ``` @@ -76,6 +77,7 @@ import "math" sampledata.float() |> map(fn: (r) => ({r with _value: math.jn(n: 4, x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/ldexp.md b/content/flux/v0.x/stdlib/math/ldexp.md index 0979e77a6..6d1570d0b 100644 --- a/content/flux/v0.x/stdlib/math/ldexp.md +++ b/content/flux/v0.x/stdlib/math/ldexp.md @@ -65,6 +65,7 @@ import "math" math.ldexp(frac: 0.5, exp: 6)// 32.0 + ``` @@ -75,6 +76,7 @@ import "math" data |> map(fn: (r) => ({_time: r._time, tag: r.tag, _value: math.ldexp(frac: r.frac, exp: r.exp)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/lgamma.md b/content/flux/v0.x/stdlib/math/lgamma.md index 17dab773d..096df9c47 100644 --- a/content/flux/v0.x/stdlib/math/lgamma.md +++ b/content/flux/v0.x/stdlib/math/lgamma.md @@ -59,6 +59,7 @@ import "math" math.lgamma(x: 3.14)// {lgamma: 0.8261387047770286, sign: 1} + ``` @@ -76,6 +77,7 @@ sampledata.float() return {r with lgamma: result.lgamma, sign: result.sign} }, ) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/log.md b/content/flux/v0.x/stdlib/math/log.md index dd48abc42..9a5bca876 100644 --- a/content/flux/v0.x/stdlib/math/log.md +++ b/content/flux/v0.x/stdlib/math/log.md @@ -59,6 +59,7 @@ import "math" math.log(x: 3.14)// 1.144222799920162 + ``` @@ -70,5 +71,6 @@ import "math" sampledata.float() |> map(fn: (r) => ({r with _value: math.log(x: r._value)})) + ``` diff --git a/content/flux/v0.x/stdlib/math/log10.md b/content/flux/v0.x/stdlib/math/log10.md index e2610b618..548905f8a 100644 --- a/content/flux/v0.x/stdlib/math/log10.md +++ b/content/flux/v0.x/stdlib/math/log10.md @@ -59,6 +59,7 @@ import "math" math.log10(x: 3.14)// 0.4969296480732149 + ``` @@ -70,5 +71,6 @@ import "math" sampledata.float() |> map(fn: (r) => ({r with _value: math.log10(x: r._value)})) + ``` diff --git a/content/flux/v0.x/stdlib/math/log1p.md b/content/flux/v0.x/stdlib/math/log1p.md index 0968d2aac..a944e7730 100644 --- a/content/flux/v0.x/stdlib/math/log1p.md +++ b/content/flux/v0.x/stdlib/math/log1p.md @@ -63,6 +63,7 @@ import "math" math.log1p(x: 0.56)// 0.44468582126144574 + ``` @@ -73,6 +74,7 @@ import "math" data |> map(fn: (r) => ({r with _value: math.log1p(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/log2.md b/content/flux/v0.x/stdlib/math/log2.md index b0f1cc455..05f0341f8 100644 --- a/content/flux/v0.x/stdlib/math/log2.md +++ b/content/flux/v0.x/stdlib/math/log2.md @@ -59,6 +59,7 @@ import "math" math.log2(x: 3.14)// 1.6507645591169022 + ``` @@ -70,6 +71,7 @@ import "math" sampledata.float() |> map(fn: (r) => ({r with _value: math.log2(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/logb.md b/content/flux/v0.x/stdlib/math/logb.md index 6b90030f9..745a361c2 100644 --- a/content/flux/v0.x/stdlib/math/logb.md +++ b/content/flux/v0.x/stdlib/math/logb.md @@ -59,6 +59,7 @@ import "math" math.logb(x: 3.14)// 1 + ``` @@ -70,6 +71,7 @@ import "math" sampledata.float() |> map(fn: (r) => ({r with _value: math.logb(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/minf.md b/content/flux/v0.x/stdlib/math/minf.md index c3385714a..fbf7d7a38 100644 --- a/content/flux/v0.x/stdlib/math/minf.md +++ b/content/flux/v0.x/stdlib/math/minf.md @@ -61,6 +61,7 @@ import "math" math.mInf(sign: 1)// +Inf + ``` @@ -72,6 +73,7 @@ import "math" sampledata.int() |> map(fn: (r) => ({r with _value: math.mInf(sign: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/mmax.md b/content/flux/v0.x/stdlib/math/mmax.md index 8fc0ec254..211a3c4d1 100644 --- a/content/flux/v0.x/stdlib/math/mmax.md +++ b/content/flux/v0.x/stdlib/math/mmax.md @@ -65,6 +65,7 @@ import "math" math.mMax(x: 1.23, y: 4.56)// 4.56 + ``` @@ -75,6 +76,7 @@ import "math" data |> map(fn: (r) => ({_time: r._time, _value: math.mMax(x: r.t1, y: r.t2)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/mmin.md b/content/flux/v0.x/stdlib/math/mmin.md index 3df51eddd..85b55bb0b 100644 --- a/content/flux/v0.x/stdlib/math/mmin.md +++ b/content/flux/v0.x/stdlib/math/mmin.md @@ -65,6 +65,7 @@ import "math" math.mMin(x: 1.23, y: 4.56)// 1.23 + ``` @@ -75,6 +76,7 @@ import "math" data |> map(fn: (r) => ({_time: r._time, _value: math.mMin(x: r.t1, y: r.t2)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/mod.md b/content/flux/v0.x/stdlib/math/mod.md index 24bdd0a39..8be3d7e71 100644 --- a/content/flux/v0.x/stdlib/math/mod.md +++ b/content/flux/v0.x/stdlib/math/mod.md @@ -69,6 +69,7 @@ import "math" math.mod(x: 4.56, y: 1.23)// 0.8699999999999997 + ``` @@ -79,6 +80,7 @@ import "math" data |> map(fn: (r) => ({_time: r._time, _value: math.mod(x: r.t1, y: r.t2)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/modf.md b/content/flux/v0.x/stdlib/math/modf.md index c03375b08..65c354dae 100644 --- a/content/flux/v0.x/stdlib/math/modf.md +++ b/content/flux/v0.x/stdlib/math/modf.md @@ -59,6 +59,7 @@ import "math" math.modf(f: 3.14)// {frac: 0.14000000000000012, int: 3} + ``` @@ -76,6 +77,7 @@ sampledata.float() return {_time: r._time, int: result.int, frac: result.frac} }, ) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/nan.md b/content/flux/v0.x/stdlib/math/nan.md index 8df5704db..fd62cb10a 100644 --- a/content/flux/v0.x/stdlib/math/nan.md +++ b/content/flux/v0.x/stdlib/math/nan.md @@ -47,5 +47,6 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md import "math" math.NaN() + ``` diff --git a/content/flux/v0.x/stdlib/math/nextafter.md b/content/flux/v0.x/stdlib/math/nextafter.md index 8a8591aef..bbc18ad7e 100644 --- a/content/flux/v0.x/stdlib/math/nextafter.md +++ b/content/flux/v0.x/stdlib/math/nextafter.md @@ -65,6 +65,7 @@ import "math" math.nextafter(x: 1.23, y: 4.56)// 1.2300000000000002 + ``` @@ -75,6 +76,7 @@ import "math" data |> map(fn: (r) => ({_time: r._time, _value: math.nextafter(x: r.t1, y: r.t2)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/pow.md b/content/flux/v0.x/stdlib/math/pow.md index de1aca9e4..1c2054208 100644 --- a/content/flux/v0.x/stdlib/math/pow.md +++ b/content/flux/v0.x/stdlib/math/pow.md @@ -65,6 +65,7 @@ import "math" math.pow(x: 2.0, y: 3.0)// 8.0 + ``` @@ -75,6 +76,7 @@ import "math" data |> map(fn: (r) => ({_time: r._time, _value: math.pow(x: r.t1, y: r.t2)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/pow10.md b/content/flux/v0.x/stdlib/math/pow10.md index 66cd11525..0793757fc 100644 --- a/content/flux/v0.x/stdlib/math/pow10.md +++ b/content/flux/v0.x/stdlib/math/pow10.md @@ -59,6 +59,7 @@ import "math" math.pow10(n: 3)// 1000.0 + ``` @@ -70,6 +71,7 @@ import "sampledata" sampledata.int() |> map(fn: (r) => ({r with _value: math.pow10(n: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/remainder.md b/content/flux/v0.x/stdlib/math/remainder.md index 1344cff10..9c5e4326c 100644 --- a/content/flux/v0.x/stdlib/math/remainder.md +++ b/content/flux/v0.x/stdlib/math/remainder.md @@ -65,6 +65,7 @@ import "math" math.remainder(x: 21.0, y: 4.0)// 1.0 + ``` @@ -75,6 +76,7 @@ import "math" data |> map(fn: (r) => ({_time: r._time, _value: math.remainder(x: r.t1, y: r.t2)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/round.md b/content/flux/v0.x/stdlib/math/round.md index 037fe77ce..66af27332 100644 --- a/content/flux/v0.x/stdlib/math/round.md +++ b/content/flux/v0.x/stdlib/math/round.md @@ -59,6 +59,7 @@ import "math" math.round(x: 2.12)// 2.0 + ``` @@ -70,6 +71,7 @@ import "sampledata" sampledata.float() |> map(fn: (r) => ({r with _value: math.round(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/roundtoeven.md b/content/flux/v0.x/stdlib/math/roundtoeven.md index 0b1b208b7..cb0e03b61 100644 --- a/content/flux/v0.x/stdlib/math/roundtoeven.md +++ b/content/flux/v0.x/stdlib/math/roundtoeven.md @@ -62,6 +62,7 @@ math.roundtoeven(x: 3.14) // 3.0 math.roundtoeven(x: 3.5)// 4.0 + ``` @@ -73,6 +74,7 @@ import "sampledata" sampledata.float() |> map(fn: (r) => ({r with _value: math.roundtoeven(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/signbit.md b/content/flux/v0.x/stdlib/math/signbit.md index c0ad76a9b..3160f3794 100644 --- a/content/flux/v0.x/stdlib/math/signbit.md +++ b/content/flux/v0.x/stdlib/math/signbit.md @@ -59,6 +59,7 @@ import "math" math.signbit(x: -1.2)// true + ``` @@ -69,6 +70,7 @@ import "math" data |> map(fn: (r) => ({r with _value: math.signbit(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/sin.md b/content/flux/v0.x/stdlib/math/sin.md index 001faf7f8..1dffd7f19 100644 --- a/content/flux/v0.x/stdlib/math/sin.md +++ b/content/flux/v0.x/stdlib/math/sin.md @@ -59,6 +59,7 @@ import "math" math.sin(x: 3.14)// 0.0015926529164868282 + ``` @@ -70,6 +71,7 @@ import "sampledata" sampledata.float() |> map(fn: (r) => ({r with _value: math.sin(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/sincos.md b/content/flux/v0.x/stdlib/math/sincos.md index a86e2e656..585a0885f 100644 --- a/content/flux/v0.x/stdlib/math/sincos.md +++ b/content/flux/v0.x/stdlib/math/sincos.md @@ -59,6 +59,7 @@ import "math" math.sincos(x: 1.23)// {cos: 0.3342377271245026, sin: 0.9424888019316975} + ``` @@ -76,6 +77,7 @@ sampledata.float() return {_time: r._time, tag: r._tag, sin: result.sin, cos: result.cos} }, ) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/sinh.md b/content/flux/v0.x/stdlib/math/sinh.md index ebb54b38d..619a855e0 100644 --- a/content/flux/v0.x/stdlib/math/sinh.md +++ b/content/flux/v0.x/stdlib/math/sinh.md @@ -59,6 +59,7 @@ import "math" math.sinh(x: 1.23)// 1.564468479304407 + ``` @@ -70,6 +71,7 @@ import "sampledata" sampledata.float() |> map(fn: (r) => ({r with _value: math.sinh(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/sqrt.md b/content/flux/v0.x/stdlib/math/sqrt.md index 585a61462..1c3661f8a 100644 --- a/content/flux/v0.x/stdlib/math/sqrt.md +++ b/content/flux/v0.x/stdlib/math/sqrt.md @@ -59,6 +59,7 @@ import "math" math.sqrt(x: 4.0)// 2.0 + ``` @@ -70,6 +71,7 @@ import "sampledata" sampledata.float() |> map(fn: (r) => ({r with _value: math.sqrt(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/tan.md b/content/flux/v0.x/stdlib/math/tan.md index 7de6b72b0..27eb30234 100644 --- a/content/flux/v0.x/stdlib/math/tan.md +++ b/content/flux/v0.x/stdlib/math/tan.md @@ -59,6 +59,7 @@ import "math" math.tan(x: 3.14)// -0.001592654936407223 + ``` @@ -70,6 +71,7 @@ import "sampledata" sampledata.float() |> map(fn: (r) => ({r with _value: math.tan(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/tanh.md b/content/flux/v0.x/stdlib/math/tanh.md index 9744003bd..902b18e34 100644 --- a/content/flux/v0.x/stdlib/math/tanh.md +++ b/content/flux/v0.x/stdlib/math/tanh.md @@ -59,6 +59,7 @@ import "math" math.tanh(x: 1.23)// 0.8425793256589296 + ``` @@ -70,6 +71,7 @@ import "sampledata" sampledata.float() |> map(fn: (r) => ({r with _value: math.tanh(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/trunc.md b/content/flux/v0.x/stdlib/math/trunc.md index d18c5efb7..3ecd8fb52 100644 --- a/content/flux/v0.x/stdlib/math/trunc.md +++ b/content/flux/v0.x/stdlib/math/trunc.md @@ -59,6 +59,7 @@ import "math" math.trunc(x: 3.14)// 3.0 + ``` @@ -70,6 +71,7 @@ import "sampledata" sampledata.float() |> map(fn: (r) => ({r with _value: math.trunc(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/y0.md b/content/flux/v0.x/stdlib/math/y0.md index ee21b78d5..90462a1b3 100644 --- a/content/flux/v0.x/stdlib/math/y0.md +++ b/content/flux/v0.x/stdlib/math/y0.md @@ -59,6 +59,7 @@ import "math" math.y0(x: 3.14)// 0.3289375969127807 + ``` @@ -70,6 +71,7 @@ import "sampledata" sampledata.float() |> map(fn: (r) => ({r with _value: math.y0(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/y1.md b/content/flux/v0.x/stdlib/math/y1.md index 6e5431fc6..b9bdc85cb 100644 --- a/content/flux/v0.x/stdlib/math/y1.md +++ b/content/flux/v0.x/stdlib/math/y1.md @@ -59,6 +59,7 @@ import "math" math.y1(x: 3.14)// 0.35853138083924085 + ``` @@ -70,6 +71,7 @@ import "sampledata" sampledata.float() |> map(fn: (r) => ({r with _value: math.y1(x: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/math/yn.md b/content/flux/v0.x/stdlib/math/yn.md index 13b7e7e5f..46da84812 100644 --- a/content/flux/v0.x/stdlib/math/yn.md +++ b/content/flux/v0.x/stdlib/math/yn.md @@ -65,6 +65,7 @@ import "math" math.yn(n: 3, x: 3.14)// -0.4866506930335083 + ``` @@ -75,6 +76,7 @@ import "math" data |> map(fn: (r) => ({_time: r._time, _value: math.yn(n: r.n, x: r.x)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/pagerduty/actionfromlevel.md b/content/flux/v0.x/stdlib/pagerduty/actionfromlevel.md index ff4d1ecff..f6cf456a4 100644 --- a/content/flux/v0.x/stdlib/pagerduty/actionfromlevel.md +++ b/content/flux/v0.x/stdlib/pagerduty/actionfromlevel.md @@ -57,5 +57,6 @@ import "pagerduty" pagerduty.actionFromLevel(level: "crit")// Returns trigger + ``` diff --git a/content/flux/v0.x/stdlib/pagerduty/actionfromseverity.md b/content/flux/v0.x/stdlib/pagerduty/actionfromseverity.md index 79f4de279..23b507f04 100644 --- a/content/flux/v0.x/stdlib/pagerduty/actionfromseverity.md +++ b/content/flux/v0.x/stdlib/pagerduty/actionfromseverity.md @@ -57,5 +57,6 @@ import "pagerduty" pagerduty.actionFromSeverity(severity: "crit")// Returns trigger + ``` diff --git a/content/flux/v0.x/stdlib/pagerduty/dedupkey.md b/content/flux/v0.x/stdlib/pagerduty/dedupkey.md index d2903fa9a..41f5927a6 100644 --- a/content/flux/v0.x/stdlib/pagerduty/dedupkey.md +++ b/content/flux/v0.x/stdlib/pagerduty/dedupkey.md @@ -70,6 +70,7 @@ import "sampledata" sampledata.int() |> pagerduty.dedupKey() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/pagerduty/sendevent.md b/content/flux/v0.x/stdlib/pagerduty/sendevent.md index d57e445e6..edc53a671 100644 --- a/content/flux/v0.x/stdlib/pagerduty/sendevent.md +++ b/content/flux/v0.x/stdlib/pagerduty/sendevent.md @@ -177,5 +177,6 @@ pagerduty.sendEvent( timestamp: now(), customDetails: {"example-key": "example value"}, ) + ``` diff --git a/content/flux/v0.x/stdlib/pagerduty/severityfromlevel.md b/content/flux/v0.x/stdlib/pagerduty/severityfromlevel.md index 471214df0..0a7a5dc05 100644 --- a/content/flux/v0.x/stdlib/pagerduty/severityfromlevel.md +++ b/content/flux/v0.x/stdlib/pagerduty/severityfromlevel.md @@ -61,5 +61,6 @@ import "pagerduty" pagerduty.severityFromLevel(level: "crit")// Returns critical + ``` diff --git a/content/flux/v0.x/stdlib/pushbullet/pushdata.md b/content/flux/v0.x/stdlib/pushbullet/pushdata.md index 1bba3da65..50dbc4176 100644 --- a/content/flux/v0.x/stdlib/pushbullet/pushdata.md +++ b/content/flux/v0.x/stdlib/pushbullet/pushdata.md @@ -76,5 +76,6 @@ pushbullet.pushData( "url": "http://example-url.com", }, ) + ``` diff --git a/content/flux/v0.x/stdlib/pushbullet/pushnote.md b/content/flux/v0.x/stdlib/pushbullet/pushnote.md index 443a8f219..d3f7f3816 100644 --- a/content/flux/v0.x/stdlib/pushbullet/pushnote.md +++ b/content/flux/v0.x/stdlib/pushbullet/pushnote.md @@ -77,5 +77,6 @@ pushbullet.pushNote( token: "mY5up3Rs3Cre7T0k3n", data: {"type": "link", "title": "Example title", "text": "Example note text"}, ) + ``` diff --git a/content/flux/v0.x/stdlib/regexp/compile.md b/content/flux/v0.x/stdlib/regexp/compile.md index e4d92f4d5..acaf9be19 100644 --- a/content/flux/v0.x/stdlib/regexp/compile.md +++ b/content/flux/v0.x/stdlib/regexp/compile.md @@ -59,5 +59,6 @@ import "regexp" regexp.compile(v: "abcd")// Returns the regexp object /abcd/ + ``` diff --git a/content/flux/v0.x/stdlib/regexp/findstring.md b/content/flux/v0.x/stdlib/regexp/findstring.md index 62414413f..af5a9ff3e 100644 --- a/content/flux/v0.x/stdlib/regexp/findstring.md +++ b/content/flux/v0.x/stdlib/regexp/findstring.md @@ -65,6 +65,7 @@ import "regexp" regexp.findString(r: /foo.?/, v: "seafood fool")// Returns "food" + ``` @@ -78,6 +79,7 @@ regex = /.{6}$/ sampledata.string() |> map(fn: (r) => ({r with _value: regexp.findString(v: r._value, r: regex)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/regexp/findstringindex.md b/content/flux/v0.x/stdlib/regexp/findstringindex.md index ae4546f58..d2bc2de72 100644 --- a/content/flux/v0.x/stdlib/regexp/findstringindex.md +++ b/content/flux/v0.x/stdlib/regexp/findstringindex.md @@ -64,5 +64,6 @@ import "regexp" regexp.findStringIndex(r: /ab?/, v: "tablet")// Returns [1, 3] + ``` diff --git a/content/flux/v0.x/stdlib/regexp/matchregexpstring.md b/content/flux/v0.x/stdlib/regexp/matchregexpstring.md index 7e0715889..61ac18f06 100644 --- a/content/flux/v0.x/stdlib/regexp/matchregexpstring.md +++ b/content/flux/v0.x/stdlib/regexp/matchregexpstring.md @@ -65,6 +65,7 @@ import "regexp" regexp.matchRegexpString(r: /(gopher){2}/, v: "gophergophergopher")// Returns true + ``` @@ -76,5 +77,6 @@ import "sampledata" sampledata.string() |> filter(fn: (r) => regexp.matchRegexpString(r: /_\d/, v: r._value)) + ``` diff --git a/content/flux/v0.x/stdlib/regexp/quotemeta.md b/content/flux/v0.x/stdlib/regexp/quotemeta.md index 02b8b5951..dc93f955e 100644 --- a/content/flux/v0.x/stdlib/regexp/quotemeta.md +++ b/content/flux/v0.x/stdlib/regexp/quotemeta.md @@ -56,5 +56,6 @@ import "regexp" regexp.quoteMeta(v: ".+*?()|[]{}^$")// Returns "\.\+\*\?\(\)\|\[\]\{\}\^\$" + ``` diff --git a/content/flux/v0.x/stdlib/regexp/replaceallstring.md b/content/flux/v0.x/stdlib/regexp/replaceallstring.md index e93f2adad..e22f8795c 100644 --- a/content/flux/v0.x/stdlib/regexp/replaceallstring.md +++ b/content/flux/v0.x/stdlib/regexp/replaceallstring.md @@ -73,6 +73,7 @@ import "regexp" regexp.replaceAllString(r: /a(x*)b/, v: "-ab-axxb-", t: "T")// Returns "-T-T-" + ``` @@ -84,6 +85,7 @@ import "sampledata" sampledata.string() |> map(fn: (r) => ({r with _value: regexp.replaceAllString(r: /smpl_/, v: r._value, t: "")})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/regexp/splitregexp.md b/content/flux/v0.x/stdlib/regexp/splitregexp.md index 9917ec282..fcefc79a5 100644 --- a/content/flux/v0.x/stdlib/regexp/splitregexp.md +++ b/content/flux/v0.x/stdlib/regexp/splitregexp.md @@ -70,5 +70,6 @@ import "regexp" regexp.splitRegexp(r: /a*/, v: "abaabaccadaaae", i: -1)// Returns ["", "b", "b", "c", "c", "d", "e"] + ``` diff --git a/content/flux/v0.x/stdlib/runtime/version.md b/content/flux/v0.x/stdlib/runtime/version.md index bb8021c9a..d3d78bac0 100644 --- a/content/flux/v0.x/stdlib/runtime/version.md +++ b/content/flux/v0.x/stdlib/runtime/version.md @@ -48,6 +48,7 @@ import "array" import "runtime" array.from(rows: [{version: runtime.version()}]) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/sampledata/bool.md b/content/flux/v0.x/stdlib/sampledata/bool.md index c352c456c..9a3557a93 100644 --- a/content/flux/v0.x/stdlib/sampledata/bool.md +++ b/content/flux/v0.x/stdlib/sampledata/bool.md @@ -56,6 +56,7 @@ Default is `false`. import "sampledata" sampledata.bool() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/sampledata/float.md b/content/flux/v0.x/stdlib/sampledata/float.md index 709de97e4..a8e2b3f1d 100644 --- a/content/flux/v0.x/stdlib/sampledata/float.md +++ b/content/flux/v0.x/stdlib/sampledata/float.md @@ -56,6 +56,7 @@ Default is `false`. import "sampledata" sampledata.float() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/sampledata/int.md b/content/flux/v0.x/stdlib/sampledata/int.md index f41e85592..1bce8736f 100644 --- a/content/flux/v0.x/stdlib/sampledata/int.md +++ b/content/flux/v0.x/stdlib/sampledata/int.md @@ -56,6 +56,7 @@ Default is `false`. import "sampledata" sampledata.int() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/sampledata/numericbool.md b/content/flux/v0.x/stdlib/sampledata/numericbool.md index fac0241a0..1baa106bf 100644 --- a/content/flux/v0.x/stdlib/sampledata/numericbool.md +++ b/content/flux/v0.x/stdlib/sampledata/numericbool.md @@ -56,6 +56,7 @@ Default is `false`. import "sampledata" sampledata.numericBool() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/sampledata/string.md b/content/flux/v0.x/stdlib/sampledata/string.md index 656a8e1b1..a4f19d69d 100644 --- a/content/flux/v0.x/stdlib/sampledata/string.md +++ b/content/flux/v0.x/stdlib/sampledata/string.md @@ -56,6 +56,7 @@ Default is `false`. import "sampledata" sampledata.string() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/sampledata/uint.md b/content/flux/v0.x/stdlib/sampledata/uint.md index 6d067c7a4..6e33afeaf 100644 --- a/content/flux/v0.x/stdlib/sampledata/uint.md +++ b/content/flux/v0.x/stdlib/sampledata/uint.md @@ -56,6 +56,7 @@ Default is `false`. import "sampledata" sampledata.uint() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/slack/message.md b/content/flux/v0.x/stdlib/slack/message.md index 14dd51828..9bc558353 100644 --- a/content/flux/v0.x/stdlib/slack/message.md +++ b/content/flux/v0.x/stdlib/slack/message.md @@ -101,6 +101,7 @@ slack.message( text: "Example slack message", color: "warning", ) + ``` @@ -116,5 +117,6 @@ slack.message( text: "Example slack message", color: "warning", ) + ``` diff --git a/content/flux/v0.x/stdlib/slack/validatecolorstring.md b/content/flux/v0.x/stdlib/slack/validatecolorstring.md index 845e65817..648e0099b 100644 --- a/content/flux/v0.x/stdlib/slack/validatecolorstring.md +++ b/content/flux/v0.x/stdlib/slack/validatecolorstring.md @@ -55,5 +55,6 @@ Hex color code. import "slack" slack.validateColorString(color: "#fff") + ``` diff --git a/content/flux/v0.x/stdlib/socket/from.md b/content/flux/v0.x/stdlib/socket/from.md index 83e4f2dfb..f9fdfd9d8 100644 --- a/content/flux/v0.x/stdlib/socket/from.md +++ b/content/flux/v0.x/stdlib/socket/from.md @@ -72,6 +72,7 @@ Decoder to use to parse returned data into a stream of tables. import "socket" socket.from(url: "tcp://127.0.0.1:1234", decoder: "csv") + ``` @@ -81,5 +82,6 @@ socket.from(url: "tcp://127.0.0.1:1234", decoder: "csv") import "socket" socket.from(url: "tcp://127.0.0.1:1234", decoder: "line") + ``` diff --git a/content/flux/v0.x/stdlib/strings/compare.md b/content/flux/v0.x/stdlib/strings/compare.md index eea9f5da7..271cc9332 100644 --- a/content/flux/v0.x/stdlib/strings/compare.md +++ b/content/flux/v0.x/stdlib/strings/compare.md @@ -67,6 +67,7 @@ import "strings" data |> map(fn: (r) => ({r with same: strings.compare(v: r.string1, t: r.string2)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/containsany.md b/content/flux/v0.x/stdlib/strings/containsany.md index a149a574e..4d66fc18f 100644 --- a/content/flux/v0.x/stdlib/strings/containsany.md +++ b/content/flux/v0.x/stdlib/strings/containsany.md @@ -63,6 +63,7 @@ import "strings" sampledata.string() |> filter(fn: (r) => strings.containsAny(v: r._value, chars: "a79")) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/containsstr.md b/content/flux/v0.x/stdlib/strings/containsstr.md index d96fd3d0e..7c18d04e3 100644 --- a/content/flux/v0.x/stdlib/strings/containsstr.md +++ b/content/flux/v0.x/stdlib/strings/containsstr.md @@ -63,6 +63,7 @@ import "strings" sampledata.string() |> filter(fn: (r) => strings.containsStr(v: r._value, substr: "5")) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/countstr.md b/content/flux/v0.x/stdlib/strings/countstr.md index d0d3df88b..eee6fe152 100644 --- a/content/flux/v0.x/stdlib/strings/countstr.md +++ b/content/flux/v0.x/stdlib/strings/countstr.md @@ -63,6 +63,7 @@ import "strings" sampledata.string() |> map(fn: (r) => ({r with _value: strings.countStr(v: r._value, substr: "p")})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/equalfold.md b/content/flux/v0.x/stdlib/strings/equalfold.md index 0cdecb95e..1f035f968 100644 --- a/content/flux/v0.x/stdlib/strings/equalfold.md +++ b/content/flux/v0.x/stdlib/strings/equalfold.md @@ -62,6 +62,7 @@ import "strings" data |> map(fn: (r) => ({r with same: strings.equalFold(v: r.string1, t: r.string2)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/hasprefix.md b/content/flux/v0.x/stdlib/strings/hasprefix.md index 833eb7da6..9d1ffbd71 100644 --- a/content/flux/v0.x/stdlib/strings/hasprefix.md +++ b/content/flux/v0.x/stdlib/strings/hasprefix.md @@ -63,6 +63,7 @@ import "strings" sampledata.string() |> filter(fn: (r) => strings.hasPrefix(v: r._value, prefix: "smpl_5")) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/hassuffix.md b/content/flux/v0.x/stdlib/strings/hassuffix.md index 4f378f7d6..530f95da3 100644 --- a/content/flux/v0.x/stdlib/strings/hassuffix.md +++ b/content/flux/v0.x/stdlib/strings/hassuffix.md @@ -63,6 +63,7 @@ import "strings" sampledata.string() |> filter(fn: (r) => strings.hasSuffix(v: r._value, suffix: "4")) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/index-fn.md b/content/flux/v0.x/stdlib/strings/index-fn.md index 54145e692..c16229ec2 100644 --- a/content/flux/v0.x/stdlib/strings/index-fn.md +++ b/content/flux/v0.x/stdlib/strings/index-fn.md @@ -65,6 +65,7 @@ import "strings" sampledata.string() |> map(fn: (r) => ({r with _value: strings.index(v: r._value, substr: "g")})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/indexany.md b/content/flux/v0.x/stdlib/strings/indexany.md index 2550424fc..00a89ca74 100644 --- a/content/flux/v0.x/stdlib/strings/indexany.md +++ b/content/flux/v0.x/stdlib/strings/indexany.md @@ -65,6 +65,7 @@ import "strings" sampledata.string() |> map(fn: (r) => ({r with _value: strings.indexAny(v: r._value, chars: "g7t")})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/isdigit.md b/content/flux/v0.x/stdlib/strings/isdigit.md index 97202ff74..893f3a08d 100644 --- a/content/flux/v0.x/stdlib/strings/isdigit.md +++ b/content/flux/v0.x/stdlib/strings/isdigit.md @@ -56,6 +56,7 @@ import "strings" data |> filter(fn: (r) => strings.isDigit(v: r._value)) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/isletter.md b/content/flux/v0.x/stdlib/strings/isletter.md index e49a4e695..5de4ee4bc 100644 --- a/content/flux/v0.x/stdlib/strings/isletter.md +++ b/content/flux/v0.x/stdlib/strings/isletter.md @@ -56,6 +56,7 @@ import "strings" data |> filter(fn: (r) => strings.isLetter(v: r._value)) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/islower.md b/content/flux/v0.x/stdlib/strings/islower.md index bb72a4fcf..b137726f3 100644 --- a/content/flux/v0.x/stdlib/strings/islower.md +++ b/content/flux/v0.x/stdlib/strings/islower.md @@ -56,6 +56,7 @@ import "strings" data |> filter(fn: (r) => strings.isLower(v: r._value)) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/isupper.md b/content/flux/v0.x/stdlib/strings/isupper.md index 3f7e9c4c9..ca0e2ae33 100644 --- a/content/flux/v0.x/stdlib/strings/isupper.md +++ b/content/flux/v0.x/stdlib/strings/isupper.md @@ -56,6 +56,7 @@ import "strings" data |> filter(fn: (r) => strings.isUpper(v: r._value)) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/joinstr.md b/content/flux/v0.x/stdlib/strings/joinstr.md index 7803978cf..3dfd46ccc 100644 --- a/content/flux/v0.x/stdlib/strings/joinstr.md +++ b/content/flux/v0.x/stdlib/strings/joinstr.md @@ -62,5 +62,6 @@ import "strings" strings.joinStr(arr: ["foo", "bar", "baz", "quz"], v: ", ")// Returns "foo, bar, baz, quz" + ``` diff --git a/content/flux/v0.x/stdlib/strings/lastindex.md b/content/flux/v0.x/stdlib/strings/lastindex.md index af17007c3..7b38947a8 100644 --- a/content/flux/v0.x/stdlib/strings/lastindex.md +++ b/content/flux/v0.x/stdlib/strings/lastindex.md @@ -65,6 +65,7 @@ import "strings" sampledata.string() |> map(fn: (r) => ({r with _value: strings.lastIndex(v: r._value, substr: "g")})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/lastindexany.md b/content/flux/v0.x/stdlib/strings/lastindexany.md index c78ad51c4..f6667b055 100644 --- a/content/flux/v0.x/stdlib/strings/lastindexany.md +++ b/content/flux/v0.x/stdlib/strings/lastindexany.md @@ -67,6 +67,7 @@ import "strings" sampledata.string() |> map(fn: (r) => ({r with _value: strings.lastIndexAny(v: r._value, chars: "g7t")})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/repeat.md b/content/flux/v0.x/stdlib/strings/repeat.md index 607e24584..ba6ed70b3 100644 --- a/content/flux/v0.x/stdlib/strings/repeat.md +++ b/content/flux/v0.x/stdlib/strings/repeat.md @@ -62,6 +62,7 @@ import "strings" data |> map(fn: (r) => ({r with _value: strings.repeat(v: "ha", i: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/replace.md b/content/flux/v0.x/stdlib/strings/replace.md index de92e1ded..2816eee51 100644 --- a/content/flux/v0.x/stdlib/strings/replace.md +++ b/content/flux/v0.x/stdlib/strings/replace.md @@ -77,6 +77,7 @@ import "strings" sampledata.string() |> map(fn: (r) => ({r with _value: strings.replace(v: r._value, t: "p", u: "XX", i: 2)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/replaceall.md b/content/flux/v0.x/stdlib/strings/replaceall.md index f62c71334..a9a4d280e 100644 --- a/content/flux/v0.x/stdlib/strings/replaceall.md +++ b/content/flux/v0.x/stdlib/strings/replaceall.md @@ -69,6 +69,7 @@ import "strings" sampledata.string() |> map(fn: (r) => ({r with _value: strings.replaceAll(v: r._value, t: "p", u: "XX")})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/split.md b/content/flux/v0.x/stdlib/strings/split.md index 47a1693fb..385ef5676 100644 --- a/content/flux/v0.x/stdlib/strings/split.md +++ b/content/flux/v0.x/stdlib/strings/split.md @@ -62,5 +62,6 @@ import "strings" strings.split(v: "foo, bar, baz, quz", t: ", ")// Returns ["foo", "bar", "baz", "quz"] + ``` diff --git a/content/flux/v0.x/stdlib/strings/splitafter.md b/content/flux/v0.x/stdlib/strings/splitafter.md index 76e92c207..789069083 100644 --- a/content/flux/v0.x/stdlib/strings/splitafter.md +++ b/content/flux/v0.x/stdlib/strings/splitafter.md @@ -64,5 +64,6 @@ import "strings" strings.splitAfter(v: "foo, bar, baz, quz", t: ", ")// Returns ["foo, ", "bar, ", "baz, ", "quz"] + ``` diff --git a/content/flux/v0.x/stdlib/strings/splitaftern.md b/content/flux/v0.x/stdlib/strings/splitaftern.md index a8087511a..da53a52de 100644 --- a/content/flux/v0.x/stdlib/strings/splitaftern.md +++ b/content/flux/v0.x/stdlib/strings/splitaftern.md @@ -71,5 +71,6 @@ import "strings" strings.splitAfterN(v: "foo, bar, baz, quz", t: ", ", i: 3)// Returns ["foo, ", "bar, ", "baz, quz"] + ``` diff --git a/content/flux/v0.x/stdlib/strings/splitn.md b/content/flux/v0.x/stdlib/strings/splitn.md index 921d0e56e..654e4f236 100644 --- a/content/flux/v0.x/stdlib/strings/splitn.md +++ b/content/flux/v0.x/stdlib/strings/splitn.md @@ -69,5 +69,6 @@ import "strings" strings.splitN(v: "foo, bar, baz, quz", t: ", ", i: 3)// Returns ["foo", "bar", "baz, quz"] + ``` diff --git a/content/flux/v0.x/stdlib/strings/strlen.md b/content/flux/v0.x/stdlib/strings/strlen.md index 341f142e7..ae42b1985 100644 --- a/content/flux/v0.x/stdlib/strings/strlen.md +++ b/content/flux/v0.x/stdlib/strings/strlen.md @@ -59,6 +59,7 @@ import "strings" data |> filter(fn: (r) => strings.strlen(v: r._value) <= 6) + ``` {{< expand-wrapper >}} @@ -108,6 +109,7 @@ import "strings" data |> map(fn: (r) => ({r with length: strings.strlen(v: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/substring.md b/content/flux/v0.x/stdlib/strings/substring.md index e5f389921..1d833886c 100644 --- a/content/flux/v0.x/stdlib/strings/substring.md +++ b/content/flux/v0.x/stdlib/strings/substring.md @@ -72,6 +72,7 @@ import "strings" sampledata.string() |> map(fn: (r) => ({r with _value: strings.substring(v: r._value, start: 5, end: 9)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/title.md b/content/flux/v0.x/stdlib/strings/title.md index a979a1d84..ebb422b7b 100644 --- a/content/flux/v0.x/stdlib/strings/title.md +++ b/content/flux/v0.x/stdlib/strings/title.md @@ -57,6 +57,7 @@ import "strings" sampledata.string() |> map(fn: (r) => ({r with _value: strings.title(v: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/tolower.md b/content/flux/v0.x/stdlib/strings/tolower.md index d3c124af4..92dcdceb6 100644 --- a/content/flux/v0.x/stdlib/strings/tolower.md +++ b/content/flux/v0.x/stdlib/strings/tolower.md @@ -57,6 +57,7 @@ import "strings" sampledata.string() |> map(fn: (r) => ({r with _value: strings.toLower(v: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/totitle.md b/content/flux/v0.x/stdlib/strings/totitle.md index 59ba67f4e..6aebe67c8 100644 --- a/content/flux/v0.x/stdlib/strings/totitle.md +++ b/content/flux/v0.x/stdlib/strings/totitle.md @@ -66,5 +66,6 @@ import "strings" sampledata.string() |> map(fn: (r) => ({r with _value: strings.toTitle(v: r._value)})) + ``` diff --git a/content/flux/v0.x/stdlib/strings/toupper.md b/content/flux/v0.x/stdlib/strings/toupper.md index 420cf7247..3163586c4 100644 --- a/content/flux/v0.x/stdlib/strings/toupper.md +++ b/content/flux/v0.x/stdlib/strings/toupper.md @@ -66,6 +66,7 @@ import "strings" sampledata.string() |> map(fn: (r) => ({r with _value: strings.toUpper(v: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/trim.md b/content/flux/v0.x/stdlib/strings/trim.md index 9d92614c9..d3ea1be10 100644 --- a/content/flux/v0.x/stdlib/strings/trim.md +++ b/content/flux/v0.x/stdlib/strings/trim.md @@ -62,6 +62,7 @@ import "strings" data |> map(fn: (r) => ({r with _value: strings.trim(v: r._value, cutset: "smpl_")})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/trimleft.md b/content/flux/v0.x/stdlib/strings/trimleft.md index 7cdcfb871..d83c6b1bf 100644 --- a/content/flux/v0.x/stdlib/strings/trimleft.md +++ b/content/flux/v0.x/stdlib/strings/trimleft.md @@ -62,6 +62,7 @@ import "strings" data |> map(fn: (r) => ({r with _value: strings.trimLeft(v: r._value, cutset: ".")})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/trimprefix.md b/content/flux/v0.x/stdlib/strings/trimprefix.md index 29e691eaa..565713752 100644 --- a/content/flux/v0.x/stdlib/strings/trimprefix.md +++ b/content/flux/v0.x/stdlib/strings/trimprefix.md @@ -63,6 +63,7 @@ import "strings" sampledata.string() |> map(fn: (r) => ({r with _value: strings.trimPrefix(v: r._value, prefix: "smpl_")})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/trimright.md b/content/flux/v0.x/stdlib/strings/trimright.md index 85e42a578..09ed7efca 100644 --- a/content/flux/v0.x/stdlib/strings/trimright.md +++ b/content/flux/v0.x/stdlib/strings/trimright.md @@ -62,6 +62,7 @@ import "strings" data |> map(fn: (r) => ({r with _value: strings.trimRight(v: r._value, cutset: ".")})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/trimspace.md b/content/flux/v0.x/stdlib/strings/trimspace.md index 2583cacdf..c484fc5d0 100644 --- a/content/flux/v0.x/stdlib/strings/trimspace.md +++ b/content/flux/v0.x/stdlib/strings/trimspace.md @@ -56,6 +56,7 @@ import "strings" data |> map(fn: (r) => ({r with _value: strings.trimSpace(v: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/strings/trimsuffix.md b/content/flux/v0.x/stdlib/strings/trimsuffix.md index 32c96b35f..efa9b7b95 100644 --- a/content/flux/v0.x/stdlib/strings/trimsuffix.md +++ b/content/flux/v0.x/stdlib/strings/trimsuffix.md @@ -62,6 +62,7 @@ import "strings" data |> map(fn: (r) => ({r with _value: strings.trimSuffix(v: r._value, suffix: "_ex1")})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/system/time.md b/content/flux/v0.x/stdlib/system/time.md index 2c25986e5..b6ec38bdd 100644 --- a/content/flux/v0.x/stdlib/system/time.md +++ b/content/flux/v0.x/stdlib/system/time.md @@ -49,5 +49,6 @@ import "array" import "system" array.from(rows: [{time: system.time()}]) + ``` diff --git a/content/flux/v0.x/stdlib/testing/_index.md b/content/flux/v0.x/stdlib/testing/_index.md index 06238f158..c73c8ae3a 100644 --- a/content/flux/v0.x/stdlib/testing/_index.md +++ b/content/flux/v0.x/stdlib/testing/_index.md @@ -42,12 +42,23 @@ import "testing" ```js option testing.load = (tables=<-) => tables + +option testing.tags = [] ``` ### load `load` loads test data from a stream of tables. +### tags + +`tags` is a list of tags that will be applied to a test case. + +The test harness allows filtering based on included tags. + + Tags are expected to be overridden per test file and test case + using normal option semantics. + ## Functions diff --git a/content/flux/v0.x/stdlib/testing/assertempty.md b/content/flux/v0.x/stdlib/testing/assertempty.md index 8261193d1..0e0a46d09 100644 --- a/content/flux/v0.x/stdlib/testing/assertempty.md +++ b/content/flux/v0.x/stdlib/testing/assertempty.md @@ -21,7 +21,7 @@ documentation is generated. To make updates to this documentation, update the function comments above the function definition in the Flux source code: -https://github.com/influxdata/flux/blob/master/stdlib/testing/testing.flux#L83-L83 +https://github.com/influxdata/flux/blob/master/stdlib/testing/testing.flux#L92-L92 Contributing to Flux: https://github.com/influxdata/flux#contributing Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md @@ -66,5 +66,6 @@ got = sampledata.float() |> toInt() got |> testing.diff(want: want) |> testing.assertEmpty() + ``` diff --git a/content/flux/v0.x/stdlib/testing/assertequals.md b/content/flux/v0.x/stdlib/testing/assertequals.md index b6ba7d22e..839f98fc3 100644 --- a/content/flux/v0.x/stdlib/testing/assertequals.md +++ b/content/flux/v0.x/stdlib/testing/assertequals.md @@ -20,7 +20,7 @@ documentation is generated. To make updates to this documentation, update the function comments above the function definition in the Flux source code: -https://github.com/influxdata/flux/blob/master/stdlib/testing/testing.flux#L52-L52 +https://github.com/influxdata/flux/blob/master/stdlib/testing/testing.flux#L61-L61 Contributing to Flux: https://github.com/influxdata/flux#contributing Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md @@ -78,6 +78,7 @@ want = sampledata.int() got = sampledata.float() |> toInt() testing.assertEquals(name: "test_equality", got: got, want: want) + ``` @@ -93,5 +94,6 @@ want = from(bucket: "example-bucket") |> range(start: -5m) |> testing.assertEquals(want: want) + ``` diff --git a/content/flux/v0.x/stdlib/testing/assertequalvalues.md b/content/flux/v0.x/stdlib/testing/assertequalvalues.md index a496a597b..17964bb95 100644 --- a/content/flux/v0.x/stdlib/testing/assertequalvalues.md +++ b/content/flux/v0.x/stdlib/testing/assertequalvalues.md @@ -21,7 +21,7 @@ documentation is generated. To make updates to this documentation, update the function comments above the function definition in the Flux source code: -https://github.com/influxdata/flux/blob/master/stdlib/testing/testing.flux#L397-L399 +https://github.com/influxdata/flux/blob/master/stdlib/testing/testing.flux#L232-L234 Contributing to Flux: https://github.com/influxdata/flux#contributing Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md @@ -63,6 +63,7 @@ Expected value to test against. import "testing" testing.assertEqualValues(got: 5, want: 12) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/testing/diff.md b/content/flux/v0.x/stdlib/testing/diff.md index 351c869f1..61e0655df 100644 --- a/content/flux/v0.x/stdlib/testing/diff.md +++ b/content/flux/v0.x/stdlib/testing/diff.md @@ -21,7 +21,7 @@ documentation is generated. To make updates to this documentation, update the function comments above the function definition in the Flux source code: -https://github.com/influxdata/flux/blob/master/stdlib/testing/testing.flux#L143-L160 +https://github.com/influxdata/flux/blob/master/stdlib/testing/testing.flux#L152-L169 Contributing to Flux: https://github.com/influxdata/flux#contributing Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md @@ -106,6 +106,7 @@ got = |> map(fn: (r) => ({r with _value: if r._value > 15 then r._value + 1 else r._value})) testing.diff(got: got, want: want) + ``` {{< expand-wrapper >}} @@ -138,5 +139,6 @@ want = from(bucket: "backup-example-bucket") |> range(start: -5m) from(bucket: "example-bucket") |> range(start: -5m) |> testing.diff(want: want) + ``` diff --git a/content/flux/v0.x/stdlib/testing/load.md b/content/flux/v0.x/stdlib/testing/load.md index 4d4c3becf..ccc1f5d65 100644 --- a/content/flux/v0.x/stdlib/testing/load.md +++ b/content/flux/v0.x/stdlib/testing/load.md @@ -21,7 +21,7 @@ documentation is generated. To make updates to this documentation, update the function comments above the function definition in the Flux source code: -https://github.com/influxdata/flux/blob/master/stdlib/testing/testing.flux#L202-L202 +https://github.com/influxdata/flux/blob/master/stdlib/testing/testing.flux#L211-L211 Contributing to Flux: https://github.com/influxdata/flux#contributing Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md @@ -80,5 +80,6 @@ want = testing.load(tables: got) |> testing.diff(want: want) + ``` diff --git a/content/flux/v0.x/stdlib/testing/shoulderror.md b/content/flux/v0.x/stdlib/testing/shoulderror.md new file mode 100644 index 000000000..7ddb18f80 --- /dev/null +++ b/content/flux/v0.x/stdlib/testing/shoulderror.md @@ -0,0 +1,68 @@ +--- +title: testing.shouldError() function +description: > + `testing.shouldError()` calls a function catches any error and checks that the error matches the expected value. +menu: + flux_0_x_ref: + name: testing.shouldError + parent: testing + identifier: testing/shouldError +weight: 101 +flux/v0.x/tags: [tests] +introduced: 0.174.0 +--- + + + +`testing.shouldError()` calls a function catches any error and checks that the error matches the expected value. + + + +##### Function type signature + +```js +(fn: () => A, want: string) => stream[{v: string, _diff: string}] +``` + +{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} + +## Parameters + +### fn +({{< req >}}) +Function to call. + + + +### want +({{< req >}}) +Expected error string. + + + + +## Examples + +### Test die function errors + +```js +import "testing" + +testing.shouldError(fn: () => die(msg: "error message"), want: "error message") + +``` + diff --git a/content/flux/v0.x/stdlib/timezone/fixed.md b/content/flux/v0.x/stdlib/timezone/fixed.md index fce38f56e..7df2fab0c 100644 --- a/content/flux/v0.x/stdlib/timezone/fixed.md +++ b/content/flux/v0.x/stdlib/timezone/fixed.md @@ -61,6 +61,7 @@ import "timezone" timezone.fixed(offset: -8h)// Returns {offset: -8h, zone: "UTC"} + ``` @@ -71,5 +72,6 @@ import "timezone" // This results in midnight at 00:00:00-08:00 on any day. option location = timezone.fixed(offset: -8h) + ``` diff --git a/content/flux/v0.x/stdlib/timezone/location.md b/content/flux/v0.x/stdlib/timezone/location.md index 204b7971e..204d5b9d9 100644 --- a/content/flux/v0.x/stdlib/timezone/location.md +++ b/content/flux/v0.x/stdlib/timezone/location.md @@ -60,6 +60,7 @@ import "timezone" timezone.location(name: "America/Los_Angeles")// Returns {offset: 0ns, zone: "America/Los_Angeles"} + ``` @@ -69,5 +70,6 @@ timezone.location(name: "America/Los_Angeles")// Returns {offset: 0ns, zone: "Am import "timezone" option location = timezone.location(name: "America/Los_Angeles") + ``` diff --git a/content/flux/v0.x/stdlib/types/istype.md b/content/flux/v0.x/stdlib/types/istype.md index e50190172..cc1133109 100644 --- a/content/flux/v0.x/stdlib/types/istype.md +++ b/content/flux/v0.x/stdlib/types/istype.md @@ -75,6 +75,7 @@ import "types" data |> filter(fn: (r) => types.isType(v: r._value, type: "string")) + ``` {{< expand-wrapper >}} @@ -125,6 +126,7 @@ numericData = |> aggregateWindow(every: 30s, fn: mean) union(tables: [nonNumericData, numericData]) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/aggregatewindow.md b/content/flux/v0.x/stdlib/universe/aggregatewindow.md index 6043169a4..bdad26097 100644 --- a/content/flux/v0.x/stdlib/universe/aggregatewindow.md +++ b/content/flux/v0.x/stdlib/universe/aggregatewindow.md @@ -145,6 +145,7 @@ Input data. Default is piped-forward data (`<-`). ```js data |> aggregateWindow(every: 20s, fn: mean) + ``` {{< expand-wrapper >}} @@ -202,6 +203,7 @@ data every: 20s, fn: (column, tables=<-) => tables |> quantile(q: 0.99, column: column), ) + ``` {{< expand-wrapper >}} @@ -250,6 +252,7 @@ data ```js data |> aggregateWindow(every: 1mo, fn: mean) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/bool.md b/content/flux/v0.x/stdlib/universe/bool.md index 08deaa717..291bfd1a5 100644 --- a/content/flux/v0.x/stdlib/universe/bool.md +++ b/content/flux/v0.x/stdlib/universe/bool.md @@ -63,6 +63,7 @@ bool(v: "true") // Returns true bool(v: "false")// Returns false + ``` @@ -86,6 +87,7 @@ bool(v: uint(v: 1)) // Returns true bool(v: uint(v: 0))// Returns false + ``` @@ -98,6 +100,7 @@ row and `bool()` to covert a column value to a boolean type. ```js data |> map(fn: (r) => ({r with powerOn: bool(v: r.powerOn)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/bottom.md b/content/flux/v0.x/stdlib/universe/bottom.md index 9c9eaa9ce..229df18c5 100644 --- a/content/flux/v0.x/stdlib/universe/bottom.md +++ b/content/flux/v0.x/stdlib/universe/bottom.md @@ -72,6 +72,7 @@ import "sampledata" sampledata.int() |> bottom(n: 2) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/bytes.md b/content/flux/v0.x/stdlib/universe/bytes.md index 064d087a7..aaf25b74c 100644 --- a/content/flux/v0.x/stdlib/universe/bytes.md +++ b/content/flux/v0.x/stdlib/universe/bytes.md @@ -56,5 +56,6 @@ Value to convert. ```js bytes(v: "Example string")// Returns 0x4578616d706c6520737472696e67 + ``` diff --git a/content/flux/v0.x/stdlib/universe/chandemomentumoscillator.md b/content/flux/v0.x/stdlib/universe/chandemomentumoscillator.md index 6e75f1329..1bf997c00 100644 --- a/content/flux/v0.x/stdlib/universe/chandemomentumoscillator.md +++ b/content/flux/v0.x/stdlib/universe/chandemomentumoscillator.md @@ -83,5 +83,6 @@ import "sampledata" sampledata.int() |> chandeMomentumOscillator(n: 2) + ``` diff --git a/content/flux/v0.x/stdlib/universe/columns.md b/content/flux/v0.x/stdlib/universe/columns.md index 39607247e..566133d65 100644 --- a/content/flux/v0.x/stdlib/universe/columns.md +++ b/content/flux/v0.x/stdlib/universe/columns.md @@ -70,5 +70,6 @@ import "sampledata" sampledata.string() |> columns(column: "labels") + ``` diff --git a/content/flux/v0.x/stdlib/universe/contains.md b/content/flux/v0.x/stdlib/universe/contains.md index 131387ce0..285f9959b 100644 --- a/content/flux/v0.x/stdlib/universe/contains.md +++ b/content/flux/v0.x/stdlib/universe/contains.md @@ -64,6 +64,7 @@ fields = ["f1", "f2"] data |> filter(fn: (r) => contains(value: r._field, set: fields)) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/count.md b/content/flux/v0.x/stdlib/universe/count.md index 51ab174fb..3a3a803a8 100644 --- a/content/flux/v0.x/stdlib/universe/count.md +++ b/content/flux/v0.x/stdlib/universe/count.md @@ -75,5 +75,6 @@ import "sampledata" sampledata.string() |> count() + ``` diff --git a/content/flux/v0.x/stdlib/universe/cov.md b/content/flux/v0.x/stdlib/universe/cov.md index 5f7468a0c..afb3a22df 100644 --- a/content/flux/v0.x/stdlib/universe/cov.md +++ b/content/flux/v0.x/stdlib/universe/cov.md @@ -83,6 +83,7 @@ stream2 = |> toFloat() cov(x: stream1, y: stream2, on: ["_time"]) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/covariance.md b/content/flux/v0.x/stdlib/universe/covariance.md index 1580679a3..ec9f2201c 100644 --- a/content/flux/v0.x/stdlib/universe/covariance.md +++ b/content/flux/v0.x/stdlib/universe/covariance.md @@ -74,6 +74,7 @@ Input data. Default is piped-forward data (`<-`). ```js data |> covariance(columns: ["x", "y"]) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/cumulativesum.md b/content/flux/v0.x/stdlib/universe/cumulativesum.md index 9de8bee8d..9721f4f48 100644 --- a/content/flux/v0.x/stdlib/universe/cumulativesum.md +++ b/content/flux/v0.x/stdlib/universe/cumulativesum.md @@ -64,6 +64,7 @@ import "sampledata" sampledata.int() |> cumulativeSum() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/derivative.md b/content/flux/v0.x/stdlib/universe/derivative.md index 7b2d75835..579966157 100644 --- a/content/flux/v0.x/stdlib/universe/derivative.md +++ b/content/flux/v0.x/stdlib/universe/derivative.md @@ -109,6 +109,7 @@ import "sampledata" sampledata.int() |> derivative(nonNegative: true) + ``` {{< expand-wrapper >}} @@ -163,6 +164,7 @@ import "sampledata" sampledata.int(includeNull: true) |> derivative() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/die.md b/content/flux/v0.x/stdlib/universe/die.md index 000e1e770..b883c8d2e 100644 --- a/content/flux/v0.x/stdlib/universe/die.md +++ b/content/flux/v0.x/stdlib/universe/die.md @@ -55,5 +55,6 @@ Error message to return. ```js die(msg: "This is an error message") + ``` diff --git a/content/flux/v0.x/stdlib/universe/difference.md b/content/flux/v0.x/stdlib/universe/difference.md index 62611b7fe..34851ae90 100644 --- a/content/flux/v0.x/stdlib/universe/difference.md +++ b/content/flux/v0.x/stdlib/universe/difference.md @@ -108,6 +108,7 @@ import "sampledata" sampledata.int() |> difference() + ``` {{< expand-wrapper >}} @@ -162,6 +163,7 @@ import "sampledata" sampledata.int() |> difference(nonNegative: true) + ``` {{< expand-wrapper >}} @@ -216,6 +218,7 @@ import "sampledata" sampledata.int(includeNull: true) |> difference() + ``` {{< expand-wrapper >}} @@ -270,6 +273,7 @@ import "sampledata" sampledata.int() |> difference(keepFirst: true) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/display.md b/content/flux/v0.x/stdlib/universe/display.md index 6f68c263f..8ad28bf3d 100644 --- a/content/flux/v0.x/stdlib/universe/display.md +++ b/content/flux/v0.x/stdlib/universe/display.md @@ -77,6 +77,7 @@ Use `array.from()` and `display()` to quickly observe any value. import "array" array.from(rows: [{dict: display(v: ["a": 1, "b": 2]), record: display(v: {x: 1, y: 2}), array: display(v: [5, 6, 7])}]) + ``` @@ -87,6 +88,7 @@ x = {a: 1, b: 2, c: 3} display(v: x)// Returns {a: 1, b: 2, c: 3} + ``` @@ -97,6 +99,7 @@ x = [1, 2, 3] display(v: x)// Returns [1, 2, 3] + ``` @@ -107,6 +110,7 @@ x = ["a": 1, "b": 2, "c": 3] display(v: x)// Returns [a: 1, b: 2, c: 3] + ``` @@ -117,6 +121,7 @@ x = bytes(v: "abc") display(v: x)// Returns 0x616263 + ``` @@ -133,5 +138,6 @@ display(v: x)// Returns // string: str // } + ``` diff --git a/content/flux/v0.x/stdlib/universe/distinct.md b/content/flux/v0.x/stdlib/universe/distinct.md index a02525fde..3697d1c10 100644 --- a/content/flux/v0.x/stdlib/universe/distinct.md +++ b/content/flux/v0.x/stdlib/universe/distinct.md @@ -69,6 +69,7 @@ import "sampledata" sampledata.int() |> distinct() + ``` {{< expand-wrapper >}} @@ -124,6 +125,7 @@ import "sampledata" sampledata.int() |> distinct(column: "tag") + ``` {{< expand-wrapper >}} @@ -170,6 +172,7 @@ import "sampledata" sampledata.int(includeNull: true) |> distinct() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/doubleema.md b/content/flux/v0.x/stdlib/universe/doubleema.md index 4098fa8d7..c3180129f 100644 --- a/content/flux/v0.x/stdlib/universe/doubleema.md +++ b/content/flux/v0.x/stdlib/universe/doubleema.md @@ -74,6 +74,7 @@ import "sampledata" sampledata.int() |> doubleEMA(n: 3) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/drop.md b/content/flux/v0.x/stdlib/universe/drop.md index b7029222e..8ecc1f7c8 100644 --- a/content/flux/v0.x/stdlib/universe/drop.md +++ b/content/flux/v0.x/stdlib/universe/drop.md @@ -77,6 +77,7 @@ import "sampledata" sampledata.int() |> drop(columns: ["_time", "tag"]) + ``` {{< expand-wrapper >}} @@ -130,6 +131,7 @@ import "sampledata" sampledata.int() |> drop(fn: (column) => column =~ /^t/) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/duplicate.md b/content/flux/v0.x/stdlib/universe/duplicate.md index da31459ee..3e5091260 100644 --- a/content/flux/v0.x/stdlib/universe/duplicate.md +++ b/content/flux/v0.x/stdlib/universe/duplicate.md @@ -71,6 +71,7 @@ import "sampledata" sampledata.int() |> duplicate(column: "tag", as: "tag_dup") + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/duration.md b/content/flux/v0.x/stdlib/universe/duration.md index d46d05191..551c4530e 100644 --- a/content/flux/v0.x/stdlib/universe/duration.md +++ b/content/flux/v0.x/stdlib/universe/duration.md @@ -62,6 +62,7 @@ Value to convert. ```js duration(v: "1h20m")// Returns 1h20m + ``` @@ -73,6 +74,7 @@ duration(v: 4800000000000) // Returns 1h20m duration(v: uint(v: 9600000000000))// Returns 2h40m + ``` @@ -84,6 +86,7 @@ To store durations in a column, convert duration types to strings. ```js data |> map(fn: (r) => ({r with _value: string(v: duration(v: r._value))})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/elapsed.md b/content/flux/v0.x/stdlib/universe/elapsed.md index 6816a1653..e0e8f484e 100644 --- a/content/flux/v0.x/stdlib/universe/elapsed.md +++ b/content/flux/v0.x/stdlib/universe/elapsed.md @@ -78,6 +78,7 @@ import "sampledata" sampledata.int() |> elapsed(unit: 1s) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/exponentialmovingaverage.md b/content/flux/v0.x/stdlib/universe/exponentialmovingaverage.md index b4f064ae7..e6c2dce71 100644 --- a/content/flux/v0.x/stdlib/universe/exponentialmovingaverage.md +++ b/content/flux/v0.x/stdlib/universe/exponentialmovingaverage.md @@ -77,6 +77,7 @@ import "sampledata" sampledata.int() |> exponentialMovingAverage(n: 3) + ``` {{< expand-wrapper >}} @@ -129,6 +130,7 @@ import "sampledata" sampledata.int(includeNull: true) |> exponentialMovingAverage(n: 3) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/fill.md b/content/flux/v0.x/stdlib/universe/fill.md index 66b16d016..3ea55b216 100644 --- a/content/flux/v0.x/stdlib/universe/fill.md +++ b/content/flux/v0.x/stdlib/universe/fill.md @@ -81,6 +81,7 @@ import "sampledata" sampledata.int(includeNull: true) |> fill(value: 0) + ``` {{< expand-wrapper >}} @@ -137,6 +138,7 @@ import "sampledata" sampledata.int(includeNull: true) |> fill(usePrevious: true) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/filter.md b/content/flux/v0.x/stdlib/universe/filter.md index b91257792..4aa4c96bf 100644 --- a/content/flux/v0.x/stdlib/universe/filter.md +++ b/content/flux/v0.x/stdlib/universe/filter.md @@ -77,6 +77,7 @@ Input data. Default is piped-forward data (`<-`). from(bucket: "example-bucket") |> range(start: -1h) |> filter(fn: (r) => r._measurement == "cpu" and r._field == "usage_system" and r.cpu == "cpu-total") + ``` @@ -88,6 +89,7 @@ import "experimental/table" sampledata.int() |> filter(fn: (r) => r._value > 18, onEmpty: "keep") + ``` {{< expand-wrapper >}} @@ -134,6 +136,7 @@ import "sampledata" sampledata.int() |> filter(fn: (r) => r._value > 0 and r._value < 10) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/findcolumn.md b/content/flux/v0.x/stdlib/universe/findcolumn.md index ccc663de8..11ced1223 100644 --- a/content/flux/v0.x/stdlib/universe/findcolumn.md +++ b/content/flux/v0.x/stdlib/universe/findcolumn.md @@ -76,5 +76,6 @@ import "sampledata" sampledata.int() |> findColumn(fn: (key) => key.tag == "t1", column: "_value")// Returns [-2, 10, 7, 17, 15, 4] + ``` diff --git a/content/flux/v0.x/stdlib/universe/findrecord.md b/content/flux/v0.x/stdlib/universe/findrecord.md index a1c6e3aee..3ae247b80 100644 --- a/content/flux/v0.x/stdlib/universe/findrecord.md +++ b/content/flux/v0.x/stdlib/universe/findrecord.md @@ -79,5 +79,6 @@ sampledata.int() idx: 0, )// Returns {_time: 2021-01-01T00:00:00.000000000Z, _value: -2, tag: t1} + ``` diff --git a/content/flux/v0.x/stdlib/universe/first.md b/content/flux/v0.x/stdlib/universe/first.md index dbb3b343a..392c0da7b 100644 --- a/content/flux/v0.x/stdlib/universe/first.md +++ b/content/flux/v0.x/stdlib/universe/first.md @@ -64,6 +64,7 @@ import "sampledata" sampledata.int() |> first() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/float.md b/content/flux/v0.x/stdlib/universe/float.md index ed8992cbe..23c672b41 100644 --- a/content/flux/v0.x/stdlib/universe/float.md +++ b/content/flux/v0.x/stdlib/universe/float.md @@ -61,6 +61,7 @@ Value to convert. ```js float(v: "3.14")// Returns 3.14 + ``` @@ -69,6 +70,7 @@ float(v: "3.14")// Returns 3.14 ```js float(v: "1.23e+20")// Returns 1.23e+20 (float) + ``` @@ -77,6 +79,7 @@ float(v: "1.23e+20")// Returns 1.23e+20 (float) ```js float(v: "10")// Returns 10.0 + ``` @@ -89,6 +92,7 @@ row and `float()` to covert a column value to a float type. ```js data |> map(fn: (r) => ({r with exampleCol: float(v: r.exampleCol)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/getcolumn.md b/content/flux/v0.x/stdlib/universe/getcolumn.md index f96635faa..82ae99e9b 100644 --- a/content/flux/v0.x/stdlib/universe/getcolumn.md +++ b/content/flux/v0.x/stdlib/universe/getcolumn.md @@ -66,5 +66,6 @@ sampledata.int() |> tableFind(fn: (key) => key.tag == "t1") |> getColumn(column: "_value")// Returns [-2, 10, 7, 17, 15, 4] + ``` diff --git a/content/flux/v0.x/stdlib/universe/getrecord.md b/content/flux/v0.x/stdlib/universe/getrecord.md index 54b4d5ffe..1af581cc2 100644 --- a/content/flux/v0.x/stdlib/universe/getrecord.md +++ b/content/flux/v0.x/stdlib/universe/getrecord.md @@ -66,5 +66,6 @@ sampledata.int() |> tableFind(fn: (key) => key.tag == "t1") |> getRecord(idx: 0)// Returns {_time: 2021-01-01T00:00:00.000000000Z, _value: -2, tag: t1} + ``` diff --git a/content/flux/v0.x/stdlib/universe/group.md b/content/flux/v0.x/stdlib/universe/group.md index 823a4d284..a87503369 100644 --- a/content/flux/v0.x/stdlib/universe/group.md +++ b/content/flux/v0.x/stdlib/universe/group.md @@ -79,6 +79,7 @@ import "sampledata" sampledata.int() |> group(columns: ["_time", "tag"]) + ``` {{< expand-wrapper >}} @@ -165,6 +166,7 @@ import "sampledata" sampledata.int() |> group(columns: ["_time"], mode: "except") + ``` {{< expand-wrapper >}} @@ -249,6 +251,7 @@ import "sampledata" // Merge all tables into a single table sampledata.int() |> group() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/highestaverage.md b/content/flux/v0.x/stdlib/universe/highestaverage.md index aa3264535..09bac1899 100644 --- a/content/flux/v0.x/stdlib/universe/highestaverage.md +++ b/content/flux/v0.x/stdlib/universe/highestaverage.md @@ -78,6 +78,7 @@ import "sampledata" sampledata.int() |> highestAverage(n: 1, groupColumns: ["tag"]) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/highestcurrent.md b/content/flux/v0.x/stdlib/universe/highestcurrent.md index 481d41f16..6a27e95b7 100644 --- a/content/flux/v0.x/stdlib/universe/highestcurrent.md +++ b/content/flux/v0.x/stdlib/universe/highestcurrent.md @@ -78,6 +78,7 @@ import "sampledata" sampledata.int() |> highestCurrent(n: 1, groupColumns: ["tag"]) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/highestmax.md b/content/flux/v0.x/stdlib/universe/highestmax.md index 80e88b76e..baafe6a2e 100644 --- a/content/flux/v0.x/stdlib/universe/highestmax.md +++ b/content/flux/v0.x/stdlib/universe/highestmax.md @@ -78,6 +78,7 @@ import "sampledata" sampledata.int() |> highestMax(n: 2, groupColumns: ["tag"]) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/histogram.md b/content/flux/v0.x/stdlib/universe/histogram.md index 8fea2dc67..71eb0543d 100644 --- a/content/flux/v0.x/stdlib/universe/histogram.md +++ b/content/flux/v0.x/stdlib/universe/histogram.md @@ -113,6 +113,7 @@ import "sampledata" sampledata.float() |> histogram(bins: [0.0, 5.0, 10.0, 20.0]) + ``` {{< expand-wrapper >}} @@ -165,6 +166,7 @@ import "sampledata" sampledata.float() |> histogram(bins: linearBins(start: 0.0, width: 4.0, count: 3)) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/histogramquantile.md b/content/flux/v0.x/stdlib/universe/histogramquantile.md index 8bef29e3c..05efed90e 100644 --- a/content/flux/v0.x/stdlib/universe/histogramquantile.md +++ b/content/flux/v0.x/stdlib/universe/histogramquantile.md @@ -114,6 +114,7 @@ Input data. Default is piped-forward data (`<-`). ```js data |> histogramQuantile(quantile: 0.9) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/holtwinters.md b/content/flux/v0.x/stdlib/universe/holtwinters.md index 4b009c21d..7df450098 100644 --- a/content/flux/v0.x/stdlib/universe/holtwinters.md +++ b/content/flux/v0.x/stdlib/universe/holtwinters.md @@ -144,6 +144,7 @@ import "sampledata" sampledata.int() |> holtWinters(n: 6, interval: 10s) + ``` {{< expand-wrapper >}} @@ -200,6 +201,7 @@ import "sampledata" sampledata.int() |> holtWinters(n: 4, interval: 10s, seasonality: 4) + ``` {{< expand-wrapper >}} @@ -252,6 +254,7 @@ import "sampledata" sampledata.int() |> holtWinters(n: 3, interval: 10s, withFit: true) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/hourselection.md b/content/flux/v0.x/stdlib/universe/hourselection.md index 8837f4f38..6ca817f75 100644 --- a/content/flux/v0.x/stdlib/universe/hourselection.md +++ b/content/flux/v0.x/stdlib/universe/hourselection.md @@ -86,6 +86,7 @@ Input data. Default is piped-forward data (`<-`). ```js data |> hourSelection(start: 9, stop: 17) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/increase.md b/content/flux/v0.x/stdlib/universe/increase.md index da4881be5..7c0fabe69 100644 --- a/content/flux/v0.x/stdlib/universe/increase.md +++ b/content/flux/v0.x/stdlib/universe/increase.md @@ -67,6 +67,7 @@ import "sampledata" sampledata.int() |> increase() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/int.md b/content/flux/v0.x/stdlib/universe/int.md index 53816f21c..a3a2f034e 100644 --- a/content/flux/v0.x/stdlib/universe/int.md +++ b/content/flux/v0.x/stdlib/universe/int.md @@ -80,6 +80,7 @@ int(v: 1m) // Returns 160000000000 int(v: 2022-01-01T00:00:00Z)// Returns 1640995200000000000 + ``` @@ -92,6 +93,7 @@ row and `int()` to covert a column value to a integer type. ```js data |> map(fn: (r) => ({r with exampleCol: int(v: r.exampleCol)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/integral.md b/content/flux/v0.x/stdlib/universe/integral.md index 8b36e960b..7fc74e878 100644 --- a/content/flux/v0.x/stdlib/universe/integral.md +++ b/content/flux/v0.x/stdlib/universe/integral.md @@ -93,6 +93,7 @@ Input data. Default is piped-forward data (`<-`). ```js data |> integral(unit: 10s) + ``` {{< expand-wrapper >}} @@ -137,6 +138,7 @@ data ```js data |> integral(unit: 10s, interpolate: "linear") + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/join.md b/content/flux/v0.x/stdlib/universe/join.md index 2c0622866..ff638f055 100644 --- a/content/flux/v0.x/stdlib/universe/join.md +++ b/content/flux/v0.x/stdlib/universe/join.md @@ -103,6 +103,7 @@ t2 = |> set(key: "tag", value: "foo") join(tables: {t1: t1, t2: t2}, on: ["_time", "tag"]) + ``` {{< expand-wrapper >}} @@ -139,5 +140,6 @@ tsData = |> filter(fn: (r) => exists r.sensorID) join(tables: {sql: sqlData, ts: tsData}, on: ["_time", "sensorID"]) + ``` diff --git a/content/flux/v0.x/stdlib/universe/kaufmansama.md b/content/flux/v0.x/stdlib/universe/kaufmansama.md index f01f38399..c447df5c9 100644 --- a/content/flux/v0.x/stdlib/universe/kaufmansama.md +++ b/content/flux/v0.x/stdlib/universe/kaufmansama.md @@ -73,6 +73,7 @@ import "sampledata" sampledata.int() |> kaufmansAMA(n: 3) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/kaufmanser.md b/content/flux/v0.x/stdlib/universe/kaufmanser.md index f0fbf2e50..235555339 100644 --- a/content/flux/v0.x/stdlib/universe/kaufmanser.md +++ b/content/flux/v0.x/stdlib/universe/kaufmanser.md @@ -68,6 +68,7 @@ import "sampledata" sampledata.int() |> kaufmansER(n: 3) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/keep.md b/content/flux/v0.x/stdlib/universe/keep.md index 4f58991ab..013031486 100644 --- a/content/flux/v0.x/stdlib/universe/keep.md +++ b/content/flux/v0.x/stdlib/universe/keep.md @@ -77,6 +77,7 @@ import "sampledata" sampledata.int() |> keep(columns: ["_time", "_value"]) + ``` {{< expand-wrapper >}} @@ -130,6 +131,7 @@ import "sampledata" sampledata.int() |> keep(fn: (column) => column =~ /^_?t/) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/keys.md b/content/flux/v0.x/stdlib/universe/keys.md index df4a20b80..8d269bd02 100644 --- a/content/flux/v0.x/stdlib/universe/keys.md +++ b/content/flux/v0.x/stdlib/universe/keys.md @@ -68,6 +68,7 @@ Input data. Default is piped-forward data (`<-`). ```js data |> keys() + ``` {{< expand-wrapper >}} @@ -127,6 +128,7 @@ data |> keys() |> keep(columns: ["_value"]) |> distinct() + ``` {{< expand-wrapper >}} @@ -179,5 +181,6 @@ sampledata.int() |> keys() |> findColumn(fn: (key) => true, column: "_value")// Returns [tag] + ``` diff --git a/content/flux/v0.x/stdlib/universe/keyvalues.md b/content/flux/v0.x/stdlib/universe/keyvalues.md index 833c9305e..80712f9dc 100644 --- a/content/flux/v0.x/stdlib/universe/keyvalues.md +++ b/content/flux/v0.x/stdlib/universe/keyvalues.md @@ -67,6 +67,7 @@ Input data. Default is piped-forward data (`<-`). ```js data |> keyValues(keyColumns: ["sensorID", "_field"]) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/last.md b/content/flux/v0.x/stdlib/universe/last.md index 3349f1a9b..3e362b3fa 100644 --- a/content/flux/v0.x/stdlib/universe/last.md +++ b/content/flux/v0.x/stdlib/universe/last.md @@ -66,6 +66,7 @@ import "sampledata" sampledata.int() |> last() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/length.md b/content/flux/v0.x/stdlib/universe/length.md index b844b7bc2..963205296 100644 --- a/content/flux/v0.x/stdlib/universe/length.md +++ b/content/flux/v0.x/stdlib/universe/length.md @@ -58,5 +58,6 @@ people = ["John", "Jane", "Abed"] people |> length()// Returns 3 + ``` diff --git a/content/flux/v0.x/stdlib/universe/limit.md b/content/flux/v0.x/stdlib/universe/limit.md index ce7f3ad99..100ce474a 100644 --- a/content/flux/v0.x/stdlib/universe/limit.md +++ b/content/flux/v0.x/stdlib/universe/limit.md @@ -75,6 +75,7 @@ import "sampledata" sampledata.int() |> limit(n: 3) + ``` {{< expand-wrapper >}} @@ -125,5 +126,6 @@ import "sampledata" sampledata.int() |> limit(n: 3, offset: 2) + ``` diff --git a/content/flux/v0.x/stdlib/universe/linearbins.md b/content/flux/v0.x/stdlib/universe/linearbins.md index 3fbe2707d..68a0f8095 100644 --- a/content/flux/v0.x/stdlib/universe/linearbins.md +++ b/content/flux/v0.x/stdlib/universe/linearbins.md @@ -74,5 +74,6 @@ Include an infinite value at the end of the list. Default is `true`. ```js linearBins(start: 0.0, width: 10.0, count: 10)// Returns [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, +Inf] + ``` diff --git a/content/flux/v0.x/stdlib/universe/logarithmicbins.md b/content/flux/v0.x/stdlib/universe/logarithmicbins.md index 7c4ebc3c3..2cb477789 100644 --- a/content/flux/v0.x/stdlib/universe/logarithmicbins.md +++ b/content/flux/v0.x/stdlib/universe/logarithmicbins.md @@ -79,5 +79,6 @@ logarithmicBins( infinity: true, )// Returns [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, +Inf] + ``` diff --git a/content/flux/v0.x/stdlib/universe/lowestaverage.md b/content/flux/v0.x/stdlib/universe/lowestaverage.md index 9df29712f..4784ffd69 100644 --- a/content/flux/v0.x/stdlib/universe/lowestaverage.md +++ b/content/flux/v0.x/stdlib/universe/lowestaverage.md @@ -78,6 +78,7 @@ import "sampledata" sampledata.int() |> lowestAverage(n: 1, groupColumns: ["tag"]) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/lowestcurrent.md b/content/flux/v0.x/stdlib/universe/lowestcurrent.md index 11367ac1b..f5fa8d849 100644 --- a/content/flux/v0.x/stdlib/universe/lowestcurrent.md +++ b/content/flux/v0.x/stdlib/universe/lowestcurrent.md @@ -78,6 +78,7 @@ import "sampledata" sampledata.int() |> lowestCurrent(n: 1, groupColumns: ["tag"]) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/lowestmin.md b/content/flux/v0.x/stdlib/universe/lowestmin.md index 413f246c8..0b408b148 100644 --- a/content/flux/v0.x/stdlib/universe/lowestmin.md +++ b/content/flux/v0.x/stdlib/universe/lowestmin.md @@ -78,6 +78,7 @@ import "sampledata" sampledata.int() |> lowestMin(n: 2, groupColumns: ["tag"]) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/map.md b/content/flux/v0.x/stdlib/universe/map.md index e30f73d47..8182b920b 100644 --- a/content/flux/v0.x/stdlib/universe/map.md +++ b/content/flux/v0.x/stdlib/universe/map.md @@ -105,6 +105,7 @@ import "sampledata" sampledata.int() |> map(fn: (r) => ({r with _value: r._value * r._value})) + ``` {{< expand-wrapper >}} @@ -161,6 +162,7 @@ import "sampledata" sampledata.int() |> map(fn: (r) => ({time: r._time, source: r.tag, alert: if r._value > 10 then true else false})) + ``` {{< expand-wrapper >}} @@ -217,6 +219,7 @@ import "sampledata" sampledata.int() |> map(fn: (r) => ({r with server: "server-${r.tag}", valueFloat: float(v: r._value)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/max.md b/content/flux/v0.x/stdlib/universe/max.md index 858f7613e..80954624c 100644 --- a/content/flux/v0.x/stdlib/universe/max.md +++ b/content/flux/v0.x/stdlib/universe/max.md @@ -66,6 +66,7 @@ import "sampledata" sampledata.int() |> max() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/mean.md b/content/flux/v0.x/stdlib/universe/mean.md index 0544ed727..f02f58174 100644 --- a/content/flux/v0.x/stdlib/universe/mean.md +++ b/content/flux/v0.x/stdlib/universe/mean.md @@ -66,6 +66,7 @@ import "sampledata" sampledata.int() |> mean() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/median.md b/content/flux/v0.x/stdlib/universe/median.md index 054d0ce6b..25ca20bd2 100644 --- a/content/flux/v0.x/stdlib/universe/median.md +++ b/content/flux/v0.x/stdlib/universe/median.md @@ -99,6 +99,7 @@ import "sampledata" sampledata.float() |> median() + ``` {{< expand-wrapper >}} @@ -145,6 +146,7 @@ import "sampledata" sampledata.float() |> median(method: "exact_selector") + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/min.md b/content/flux/v0.x/stdlib/universe/min.md index 09ed25a87..975e8a661 100644 --- a/content/flux/v0.x/stdlib/universe/min.md +++ b/content/flux/v0.x/stdlib/universe/min.md @@ -66,6 +66,7 @@ import "sampledata" sampledata.int() |> min() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/mode.md b/content/flux/v0.x/stdlib/universe/mode.md index bd99a47c7..a7213af21 100644 --- a/content/flux/v0.x/stdlib/universe/mode.md +++ b/content/flux/v0.x/stdlib/universe/mode.md @@ -69,6 +69,7 @@ import "sampledata" sampledata.int() |> mode() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/movingaverage.md b/content/flux/v0.x/stdlib/universe/movingaverage.md index d0cfd9dd6..d0d135c22 100644 --- a/content/flux/v0.x/stdlib/universe/movingaverage.md +++ b/content/flux/v0.x/stdlib/universe/movingaverage.md @@ -74,6 +74,7 @@ import "sampledata" sampledata.int() |> movingAverage(n: 3) + ``` {{< expand-wrapper >}} @@ -126,6 +127,7 @@ import "sampledata" sampledata.int(includeNull: true) |> movingAverage(n: 3) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/now.md b/content/flux/v0.x/stdlib/universe/now.md index 1aa19e2f5..f7870b412 100644 --- a/content/flux/v0.x/stdlib/universe/now.md +++ b/content/flux/v0.x/stdlib/universe/now.md @@ -55,6 +55,7 @@ Each instance of `system.time()` in a Flux script returns a unique value. ```js data |> range(start: -10h, stop: now()) + ``` @@ -62,5 +63,6 @@ data ```js option now = () => 2022-01-01T00:00:00Z + ``` diff --git a/content/flux/v0.x/stdlib/universe/pearsonr.md b/content/flux/v0.x/stdlib/universe/pearsonr.md index 7f32dd435..a219651fb 100644 --- a/content/flux/v0.x/stdlib/universe/pearsonr.md +++ b/content/flux/v0.x/stdlib/universe/pearsonr.md @@ -79,6 +79,7 @@ stream2 = |> toFloat() pearsonr(x: stream1, y: stream2, on: ["_time"]) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/pivot.md b/content/flux/v0.x/stdlib/universe/pivot.md index 2c4a66704..8099c169d 100644 --- a/content/flux/v0.x/stdlib/universe/pivot.md +++ b/content/flux/v0.x/stdlib/universe/pivot.md @@ -106,6 +106,7 @@ Input data. Default is piped-forward data (`<-`). ```js data |> pivot(rowKey: ["_time"], columnKey: ["_field"], valueColumn: "_value") + ``` {{< expand-wrapper >}} @@ -145,6 +146,7 @@ import "sampledata" sampledata.int() |> pivot(rowKey: ["_time"], columnKey: ["tag"], valueColumn: "_value") + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/quantile.md b/content/flux/v0.x/stdlib/universe/quantile.md index 5f3bc2644..2f657ffb4 100644 --- a/content/flux/v0.x/stdlib/universe/quantile.md +++ b/content/flux/v0.x/stdlib/universe/quantile.md @@ -115,6 +115,7 @@ import "sampledata" sampledata.float() |> quantile(q: 0.99, method: "estimate_tdigest") + ``` {{< expand-wrapper >}} @@ -161,6 +162,7 @@ import "sampledata" sampledata.float() |> quantile(q: 0.5, method: "exact_selector") + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/range.md b/content/flux/v0.x/stdlib/universe/range.md index 5f8001780..2432fd4ea 100644 --- a/content/flux/v0.x/stdlib/universe/range.md +++ b/content/flux/v0.x/stdlib/universe/range.md @@ -84,6 +84,7 @@ Input data. Default is piped-forward data (`<-`). ```js from(bucket: "example-bucket") |> range(start: -12h) + ``` @@ -92,6 +93,7 @@ from(bucket: "example-bucket") ```js from(bucket: "example-bucket") |> range(start: 2021-05-22T23:30:00Z, stop: 2021-05-23T00:00:00Z) + ``` @@ -100,5 +102,6 @@ from(bucket: "example-bucket") ```js from(bucket: "example-bucket") |> range(start: 1621726200000000000, stop: 1621728000000000000) + ``` diff --git a/content/flux/v0.x/stdlib/universe/reduce.md b/content/flux/v0.x/stdlib/universe/reduce.md index cf9ddd658..fed20eddb 100644 --- a/content/flux/v0.x/stdlib/universe/reduce.md +++ b/content/flux/v0.x/stdlib/universe/reduce.md @@ -92,6 +92,7 @@ import "sampledata" sampledata.int() |> reduce(fn: (r, accumulator) => ({sum: r._value + accumulator.sum}), identity: {sum: 0}) + ``` {{< expand-wrapper >}} @@ -141,6 +142,7 @@ sampledata.int() fn: (r, accumulator) => ({sum: r._value + accumulator.sum, count: accumulator.count + 1}), identity: {sum: 0, count: 0}, ) + ``` {{< expand-wrapper >}} @@ -187,6 +189,7 @@ import "sampledata" sampledata.int() |> reduce(fn: (r, accumulator) => ({prod: r._value * accumulator.prod}), identity: {prod: 1}) + ``` {{< expand-wrapper >}} @@ -241,6 +244,7 @@ sampledata.int() }), identity: {count: 0, total: 0, avg: 0.0}, ) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/relativestrengthindex.md b/content/flux/v0.x/stdlib/universe/relativestrengthindex.md index 179cb656e..75817f1b6 100644 --- a/content/flux/v0.x/stdlib/universe/relativestrengthindex.md +++ b/content/flux/v0.x/stdlib/universe/relativestrengthindex.md @@ -81,6 +81,7 @@ import "sampledata" sampledata.int() |> relativeStrengthIndex(n: 3) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/rename.md b/content/flux/v0.x/stdlib/universe/rename.md index 5329b5b60..b3adcbe1c 100644 --- a/content/flux/v0.x/stdlib/universe/rename.md +++ b/content/flux/v0.x/stdlib/universe/rename.md @@ -74,6 +74,7 @@ import "sampledata" sampledata.int() |> rename(columns: {tag: "uid", _value: "val"}) + ``` {{< expand-wrapper >}} @@ -130,6 +131,7 @@ import "sampledata" sampledata.int() |> rename(fn: (column) => "${column}_new") + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/sample.md b/content/flux/v0.x/stdlib/universe/sample.md index 2e5db6e4f..52e755ff5 100644 --- a/content/flux/v0.x/stdlib/universe/sample.md +++ b/content/flux/v0.x/stdlib/universe/sample.md @@ -77,6 +77,7 @@ import "sampledata" sampledata.int() |> sample(n: 2, pos: 1) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/set.md b/content/flux/v0.x/stdlib/universe/set.md index 5ecd4d8fd..57924a100 100644 --- a/content/flux/v0.x/stdlib/universe/set.md +++ b/content/flux/v0.x/stdlib/universe/set.md @@ -72,6 +72,7 @@ import "sampledata" sampledata.int() |> set(key: "host", value: "prod1") + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/skew.md b/content/flux/v0.x/stdlib/universe/skew.md index abd303d7e..6fe3b40a2 100644 --- a/content/flux/v0.x/stdlib/universe/skew.md +++ b/content/flux/v0.x/stdlib/universe/skew.md @@ -64,6 +64,7 @@ import "sampledata" sampledata.int() |> skew() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/sort.md b/content/flux/v0.x/stdlib/universe/sort.md index 7ca8cf601..7a6a13f6d 100644 --- a/content/flux/v0.x/stdlib/universe/sort.md +++ b/content/flux/v0.x/stdlib/universe/sort.md @@ -76,6 +76,7 @@ import "sampledata" sampledata.int() |> sort() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/spread.md b/content/flux/v0.x/stdlib/universe/spread.md index bae2a840e..dd0af6e9d 100644 --- a/content/flux/v0.x/stdlib/universe/spread.md +++ b/content/flux/v0.x/stdlib/universe/spread.md @@ -66,6 +66,7 @@ import "sampledata" sampledata.int() |> spread() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/statecount.md b/content/flux/v0.x/stdlib/universe/statecount.md index 13e34b8ff..a567a5fe5 100644 --- a/content/flux/v0.x/stdlib/universe/statecount.md +++ b/content/flux/v0.x/stdlib/universe/statecount.md @@ -75,6 +75,7 @@ import "sampledata" sampledata.int() |> stateCount(fn: (r) => r._value < 10) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/stateduration.md b/content/flux/v0.x/stdlib/universe/stateduration.md index a5b4ec422..1896b674e 100644 --- a/content/flux/v0.x/stdlib/universe/stateduration.md +++ b/content/flux/v0.x/stdlib/universe/stateduration.md @@ -107,6 +107,7 @@ import "sampledata" sampledata.int() |> stateDuration(fn: (r) => r._value < 15) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/statetracking.md b/content/flux/v0.x/stdlib/universe/statetracking.md index 454241cff..83039afa7 100644 --- a/content/flux/v0.x/stdlib/universe/statetracking.md +++ b/content/flux/v0.x/stdlib/universe/statetracking.md @@ -105,6 +105,7 @@ Input data. Default is piped-forward data (`<-`). ```js data |> stateTracking(fn: (r) => r.state == "crit", countColumn: "count") + ``` {{< expand-wrapper >}} @@ -159,6 +160,7 @@ data ```js data |> stateTracking(fn: (r) => r.state == "crit", durationColumn: "duration", durationUnit: 1ms) + ``` {{< expand-wrapper >}} @@ -213,6 +215,7 @@ data ```js data |> stateTracking(fn: (r) => r.state == "crit", countColumn: "count", durationColumn: "duration") + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/stddev.md b/content/flux/v0.x/stdlib/universe/stddev.md index 258a6b8fe..1ba23cc6f 100644 --- a/content/flux/v0.x/stdlib/universe/stddev.md +++ b/content/flux/v0.x/stdlib/universe/stddev.md @@ -75,6 +75,7 @@ import "sampledata" sampledata.int() |> stddev() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/string.md b/content/flux/v0.x/stdlib/universe/string.md index 700811254..ec0d2866a 100644 --- a/content/flux/v0.x/stdlib/universe/string.md +++ b/content/flux/v0.x/stdlib/universe/string.md @@ -68,6 +68,7 @@ string(v: 2021-01-01T00:00:00Z) // Returns "2021-01-01T00:00:00Z" string(v: 10.12)// Returns "10.12" + ``` @@ -80,6 +81,7 @@ row and `string()` to covert a column value to a string type. ```js data |> map(fn: (r) => ({r with exampleCol: string(v: r.exampleCol)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/sum.md b/content/flux/v0.x/stdlib/universe/sum.md index e25a9f134..4b6018bb9 100644 --- a/content/flux/v0.x/stdlib/universe/sum.md +++ b/content/flux/v0.x/stdlib/universe/sum.md @@ -63,7 +63,8 @@ Input data. Default is piped-forward data (`<-`). import "sampledata" sampledata.int() - |> stddev() + |> sum() + ``` {{< expand-wrapper >}} @@ -92,13 +93,14 @@ sampledata.int() #### Output data -| *tag | _value | -| ---- | ----------------- | -| t1 | 7.063993204979744 | +| *tag | _value | +| ---- | ------- | +| t1 | 51 | + +| *tag | _value | +| ---- | ------- | +| t2 | 53 | -| *tag | _value | -| ---- | ----------------- | -| t2 | 9.474527252938094 | {{% /expand %}} {{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/tablefind.md b/content/flux/v0.x/stdlib/universe/tablefind.md index a1213bf27..f6ba6c4ea 100644 --- a/content/flux/v0.x/stdlib/universe/tablefind.md +++ b/content/flux/v0.x/stdlib/universe/tablefind.md @@ -71,5 +71,6 @@ t = |> tableFind(fn: (key) => key.tag == "t2")// t represents the first table in a stream whose group key // contains "tag" with a value of "t2". + ``` diff --git a/content/flux/v0.x/stdlib/universe/tail.md b/content/flux/v0.x/stdlib/universe/tail.md index 4d6271601..66b80fa5e 100644 --- a/content/flux/v0.x/stdlib/universe/tail.md +++ b/content/flux/v0.x/stdlib/universe/tail.md @@ -77,6 +77,7 @@ import "sampledata" sampledata.int() |> tail(n: 3) + ``` {{< expand-wrapper >}} @@ -127,6 +128,7 @@ import "sampledata" sampledata.int() |> tail(n: 3, offset: 1) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/time.md b/content/flux/v0.x/stdlib/universe/time.md index 4391a5d5d..1699e4c45 100644 --- a/content/flux/v0.x/stdlib/universe/time.md +++ b/content/flux/v0.x/stdlib/universe/time.md @@ -61,6 +61,7 @@ Integer and unsigned integer values are parsed as nanosecond epoch timestamps. ```js time(v: "2021-01-01T00:00:00Z")// Returns 2021-01-01T00:00:00Z (time) + ``` @@ -69,6 +70,7 @@ time(v: "2021-01-01T00:00:00Z")// Returns 2021-01-01T00:00:00Z (time) ```js time(v: 1640995200000000000)// Returns 2022-01-01T00:00:00Z + ``` @@ -81,6 +83,7 @@ row and `time()` to covert a column value to a time type. ```js data |> map(fn: (r) => ({r with exampleCol: time(v: r.exampleCol)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/timedmovingaverage.md b/content/flux/v0.x/stdlib/universe/timedmovingaverage.md index ad17d772b..b0374b1c4 100644 --- a/content/flux/v0.x/stdlib/universe/timedmovingaverage.md +++ b/content/flux/v0.x/stdlib/universe/timedmovingaverage.md @@ -87,6 +87,7 @@ Input data. Default is piped-forward data (`<-`). ```js data |> timedMovingAverage(every: 1y, period: 5y) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/timeshift.md b/content/flux/v0.x/stdlib/universe/timeshift.md index a34ddd007..424ccc223 100644 --- a/content/flux/v0.x/stdlib/universe/timeshift.md +++ b/content/flux/v0.x/stdlib/universe/timeshift.md @@ -74,6 +74,7 @@ import "sampledata" sampledata.int() |> timeShift(duration: 12h) + ``` {{< expand-wrapper >}} @@ -130,6 +131,7 @@ import "sampledata" sampledata.int() |> timeShift(duration: -12h) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/timeweightedavg.md b/content/flux/v0.x/stdlib/universe/timeweightedavg.md index dd9274b4f..2d0d5cd3c 100644 --- a/content/flux/v0.x/stdlib/universe/timeweightedavg.md +++ b/content/flux/v0.x/stdlib/universe/timeweightedavg.md @@ -64,6 +64,7 @@ Input data. Default is piped-forward data (`<-`). ```js data |> timeWeightedAvg(unit: 1s) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/tobool.md b/content/flux/v0.x/stdlib/universe/tobool.md index 98e1717f5..9bbcc8554 100644 --- a/content/flux/v0.x/stdlib/universe/tobool.md +++ b/content/flux/v0.x/stdlib/universe/tobool.md @@ -62,6 +62,7 @@ import "sampledata" sampledata.numericBool() |> toBool() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/today.md b/content/flux/v0.x/stdlib/universe/today.md index acfc38b34..b7b1129ba 100644 --- a/content/flux/v0.x/stdlib/universe/today.md +++ b/content/flux/v0.x/stdlib/universe/today.md @@ -53,6 +53,7 @@ option now = () => 2022-01-01T13:45:28Z today()// Returns 2022-01-01T00:00:00.000000000Z + ``` @@ -61,5 +62,6 @@ today()// Returns 2022-01-01T00:00:00.000000000Z ```js from(bucket: "example-bucket") |> range(start: today()) + ``` diff --git a/content/flux/v0.x/stdlib/universe/tofloat.md b/content/flux/v0.x/stdlib/universe/tofloat.md index 7e0571123..9fabaed99 100644 --- a/content/flux/v0.x/stdlib/universe/tofloat.md +++ b/content/flux/v0.x/stdlib/universe/tofloat.md @@ -65,6 +65,7 @@ import "sampledata" sampledata.int() |> toFloat() + ``` {{< expand-wrapper >}} @@ -121,6 +122,7 @@ import "sampledata" sampledata.bool() |> toFloat() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/toint.md b/content/flux/v0.x/stdlib/universe/toint.md index 07dc63e2d..6fbc30598 100644 --- a/content/flux/v0.x/stdlib/universe/toint.md +++ b/content/flux/v0.x/stdlib/universe/toint.md @@ -72,6 +72,7 @@ import "sampledata" sampledata.float() |> toInt() + ``` {{< expand-wrapper >}} @@ -128,6 +129,7 @@ import "sampledata" sampledata.bool() |> toInt() + ``` {{< expand-wrapper >}} @@ -184,6 +186,7 @@ import "sampledata" sampledata.uint() |> toInt() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/top.md b/content/flux/v0.x/stdlib/universe/top.md index bf7bbbc01..4f27065e5 100644 --- a/content/flux/v0.x/stdlib/universe/top.md +++ b/content/flux/v0.x/stdlib/universe/top.md @@ -72,6 +72,7 @@ import "sampledata" sampledata.int() |> top(n: 3) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/tostring.md b/content/flux/v0.x/stdlib/universe/tostring.md index 1ac89c1e0..a1cb5eadb 100644 --- a/content/flux/v0.x/stdlib/universe/tostring.md +++ b/content/flux/v0.x/stdlib/universe/tostring.md @@ -58,6 +58,7 @@ import "sampledata" sampledata.float() |> toString() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/totime.md b/content/flux/v0.x/stdlib/universe/totime.md index 16ef5a9e6..de34c8b29 100644 --- a/content/flux/v0.x/stdlib/universe/totime.md +++ b/content/flux/v0.x/stdlib/universe/totime.md @@ -61,6 +61,7 @@ Input data. Default is piped-forward data (`<-`). ```js data |> toTime() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/touint.md b/content/flux/v0.x/stdlib/universe/touint.md index c33e2c614..d742b8d19 100644 --- a/content/flux/v0.x/stdlib/universe/touint.md +++ b/content/flux/v0.x/stdlib/universe/touint.md @@ -72,6 +72,7 @@ import "sampledata" sampledata.float() |> toUInt() + ``` {{< expand-wrapper >}} @@ -128,6 +129,7 @@ import "sampledata" sampledata.bool() |> toUInt() + ``` {{< expand-wrapper >}} @@ -184,6 +186,7 @@ import "sampledata" sampledata.uint() |> toUInt() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/tripleema.md b/content/flux/v0.x/stdlib/universe/tripleema.md index 9ed9f1d76..0ce8334bb 100644 --- a/content/flux/v0.x/stdlib/universe/tripleema.md +++ b/content/flux/v0.x/stdlib/universe/tripleema.md @@ -78,6 +78,7 @@ import "sampledata" sampledata.int() |> tripleEMA(n: 3) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/tripleexponentialderivative.md b/content/flux/v0.x/stdlib/universe/tripleexponentialderivative.md index 0d0ee35ac..131036472 100644 --- a/content/flux/v0.x/stdlib/universe/tripleexponentialderivative.md +++ b/content/flux/v0.x/stdlib/universe/tripleexponentialderivative.md @@ -89,5 +89,6 @@ import "sampledata" sampledata.float() |> tripleExponentialDerivative(n: 2) + ``` diff --git a/content/flux/v0.x/stdlib/universe/truncatetimecolumn.md b/content/flux/v0.x/stdlib/universe/truncatetimecolumn.md index 61d25a96b..f05c4eec5 100644 --- a/content/flux/v0.x/stdlib/universe/truncatetimecolumn.md +++ b/content/flux/v0.x/stdlib/universe/truncatetimecolumn.md @@ -86,6 +86,7 @@ import "sampledata" sampledata.int() |> truncateTimeColumn(unit: 1m) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/uint.md b/content/flux/v0.x/stdlib/universe/uint.md index 399b96ceb..8b7e809cd 100644 --- a/content/flux/v0.x/stdlib/universe/uint.md +++ b/content/flux/v0.x/stdlib/universe/uint.md @@ -80,6 +80,7 @@ uint(v: 10.12) // Returns 10 uint(v: -100)// Returns 18446744073709551516 + ``` @@ -92,6 +93,7 @@ row and `uint()` to covert a column value to a uint type. ```js data |> map(fn: (r) => ({r with exampleCol: uint(v: r.exampleCol)})) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/union.md b/content/flux/v0.x/stdlib/universe/union.md index 148ce8b14..e4c0d8c8c 100644 --- a/content/flux/v0.x/stdlib/universe/union.md +++ b/content/flux/v0.x/stdlib/universe/union.md @@ -78,6 +78,7 @@ t2 = |> group(columns: ["tag"]) union(tables: [t1, t2]) + ``` {{< expand-wrapper >}} @@ -118,6 +119,7 @@ t2 = |> group() union(tables: [t1, t2]) + ``` {{< expand-wrapper >}} @@ -127,14 +129,14 @@ union(tables: [t1, t2]) | _time | _value | tag | | -------------------- | ------- | ---- | -| 2021-01-01T00:00:00Z | 0 | bar | -| 2021-01-02T00:00:00Z | -1 | bar | -| 2021-01-03T00:00:00Z | -2 | bar | -| 2021-01-04T00:00:00Z | -3 | bar | | 2021-01-01T00:00:00Z | 1 | foo | | 2021-01-02T00:00:00Z | 2 | foo | | 2021-01-03T00:00:00Z | 3 | foo | | 2021-01-04T00:00:00Z | 4 | foo | +| 2021-01-01T00:00:00Z | 0 | bar | +| 2021-01-02T00:00:00Z | -1 | bar | +| 2021-01-03T00:00:00Z | -2 | bar | +| 2021-01-04T00:00:00Z | -3 | bar | {{% /expand %}} {{< /expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/unique.md b/content/flux/v0.x/stdlib/universe/unique.md index 4cff50bfc..f48c94e42 100644 --- a/content/flux/v0.x/stdlib/universe/unique.md +++ b/content/flux/v0.x/stdlib/universe/unique.md @@ -65,6 +65,7 @@ import "sampledata" sampledata.int() |> unique() + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/window.md b/content/flux/v0.x/stdlib/universe/window.md index 10f61fd4d..ac1bfeb8f 100644 --- a/content/flux/v0.x/stdlib/universe/window.md +++ b/content/flux/v0.x/stdlib/universe/window.md @@ -132,6 +132,7 @@ Input data. Default is piped-forward data (`<-`). ```js data |> window(every: 30s) + ``` {{< expand-wrapper >}} @@ -192,6 +193,7 @@ data ```js data |> window(every: 20s, period: 40s) + ``` {{< expand-wrapper >}} @@ -276,6 +278,7 @@ data ```js data |> window(every: 1mo) + ``` {{< expand-wrapper >}} diff --git a/content/flux/v0.x/stdlib/universe/yield.md b/content/flux/v0.x/stdlib/universe/yield.md index bd39ce3df..93fe3a188 100644 --- a/content/flux/v0.x/stdlib/universe/yield.md +++ b/content/flux/v0.x/stdlib/universe/yield.md @@ -70,5 +70,6 @@ sampledata.int() |> yield(name: "unmodified") |> map(fn: (r) => ({r with _value: r._value * r._value})) |> yield(name: "squared") + ``` diff --git a/content/influxdb/cloud/reference/release-notes/cloud-updates.md b/content/influxdb/cloud/reference/release-notes/cloud-updates.md index fcb8eacd6..3b4bdb047 100644 --- a/content/influxdb/cloud/reference/release-notes/cloud-updates.md +++ b/content/influxdb/cloud/reference/release-notes/cloud-updates.md @@ -14,6 +14,39 @@ aliases: InfluxDB Cloud updates occur frequently. Find a compilation of recent updates below. To find information about the latest Flux updates in InfluxDB Cloud, see [Flux release notes](/influxdb/cloud/reference/release-notes/flux/). +## June 2022 + +### Private InfluxDB Cloud offering + +New support for private InfluxDB Cloud offering on AWS, Azure, and Google Cloud Marketplaces for annual customers. Please contact sales@influxdata.com for more information. + +### Sample IoT application and code snippets for Node.js + +Quickly start writing and querying your data with **JavaScript/Node.js**. Now, when you complete the **JavaScript/Node.js** onboarding wizard, you'll have the option to do either of the following: +- View an IoT [Sample App](https://github.com/influxdata/iot-api-js) written in Node.js. +- View [Boilerplate Snippets](https://github.com/influxdata/nodejs-samples/) of code in Node.js. + +### Help bar updates + +- If you have a [Usage-Based plan](/influxdb/cloud/account-management/pricing-plans/#usage-based-plan), you can now submit **Support requests** and questions directly to our **Salesforce Support queue** (without needing a Salesforce account). Hover over the question mark in InfluxDB Cloud, and select **Contact Support**. You'll receive a confirmation email with your ticket number for reference. + +- Add a [Status page](https://status.influxdata.com/) to display InfluxDB uptime, downtime, and incident management information for all Cloud regions. Hover over the question mark in InfluxDB Cloud, and select **Status Page**. + +- Add a link to quickly access InfluxDB University. Hover over the question mark in InfluxDB Cloud, and select [InfluxDB University](https://university.influxdata.com/). + +### Bug fixes + +- Keep the time picker on the screen when the Script Editor is open. +- Escape commas in strings that were breaking the rendering of table visualizations. +- Add a Copy to Clipboard button to copy the organization name on the Organization Settings page. +- Ensure the following: + - The Copy button no longer hides graph error messages. + - Nested objects no longer break tables. + - Query Explorer displays results when data is returned. + - Single Usage stats text is selectable. + - Users get redirected to the Login page after a session expires. + - Renamed “Token last used” to “Token last modified” to be more accurate and descriptive. + ## May 2022 ### Bulk delete API tokens diff --git a/content/influxdb/v2.2/security/enable-hardening.md b/content/influxdb/v2.2/security/enable-hardening.md index 84c974ec5..d3b49ced1 100644 --- a/content/influxdb/v2.2/security/enable-hardening.md +++ b/content/influxdb/v2.2/security/enable-hardening.md @@ -25,9 +25,10 @@ when starting InfluxDB. ### Private IP Validation Some Flux functions ([`to()`](/flux/v0.x/stdlib/influxdata/influxdb/to/), -[`from()`](/flux/v0.x/stdlib/influxdata/influxdb/from/), [`http.post()`](/flux/v0.x/stdlib/http/post/), etc.) -and [template fetching](/influxdb/v2.2/influxdb-templates/) can require InfluxDB to make -HTTP requests over the network. +[`from()`](/flux/v0.x/stdlib/influxdata/influxdb/from/), [`http.post()`](/flux/v0.x/stdlib/http/post/), etc.), +[template fetching](/influxdb/v2.2/influxdb-templates/) and +[notification endpoints](influxdb/v2.2/monitor-alert/notification-endpoints/) +can require InfluxDB to make HTTP requests over the network. With private IP validation enabled, InfluxDB first verifies that the IP address of the URL is not a private IP address. IP addresses are considered private if they fall into one of the following categories: diff --git a/content/influxdb/v2.3/api-guide/tutorials/client-library-starter/nodejs.md b/content/influxdb/v2.3/api-guide/tutorials/client-library-starter/nodejs.md index c080eebba..1dc43bc78 100644 --- a/content/influxdb/v2.3/api-guide/tutorials/client-library-starter/nodejs.md +++ b/content/influxdb/v2.3/api-guide/tutorials/client-library-starter/nodejs.md @@ -360,7 +360,7 @@ In `./api/devices/create.js`, add the following `createAuthorization(deviceId)` {{% truncate %}} -```ts +```js import { InfluxDB } from '@influxdata/influxdb-client' import { getDevices } from './_devices' import { AuthorizationsAPI, BucketsAPI } from '@influxdata/influxdb-client-apis' @@ -385,22 +385,25 @@ async function createAuthorization(deviceId) { const buckets = await bucketsAPI.getBuckets({name: INFLUX_BUCKET, orgID: INFLUX_ORG}) const bucketId = buckets.buckets[0]?.id - return await authorizationsAPI.postAuthorizations({ - body: { - orgID: INFLUX_ORG, - description: DESC_PREFIX + deviceId, - permissions: [ - { - action: 'read', - resource: {type: 'buckets', id: bucketId, orgID: INFLUX_ORG}, - }, - { - action: 'write', - resource: {type: 'buckets', id: bucketId, orgID: INFLUX_ORG}, - }, - ], - }, - }) + return await authorizationsAPI.postAuthorizations( + { + body: { + orgID: INFLUX_ORG, + description: DESC_PREFIX + deviceId, + permissions: [ + { + action: 'read', + resource: {type: 'buckets', id: bucketId, orgID: INFLUX_ORG}, + }, + { + action: 'write', + resource: {type: 'buckets', id: bucketId, orgID: INFLUX_ORG}, + }, + ], + }, + } + ) + } ``` diff --git a/content/influxdb/v2.3/security/enable-hardening.md b/content/influxdb/v2.3/security/enable-hardening.md index 9c040de09..73627b923 100644 --- a/content/influxdb/v2.3/security/enable-hardening.md +++ b/content/influxdb/v2.3/security/enable-hardening.md @@ -25,9 +25,10 @@ when starting InfluxDB. ### Private IP Validation Some Flux functions ([`to()`](/flux/v0.x/stdlib/influxdata/influxdb/to/), -[`from()`](/flux/v0.x/stdlib/influxdata/influxdb/from/), [`http.post()`](/flux/v0.x/stdlib/http/post/), etc.) -and [template fetching](/influxdb/v2.3/influxdb-templates/) can require InfluxDB to make -HTTP requests over the network. +[`from()`](/flux/v0.x/stdlib/influxdata/influxdb/from/), [`http.post()`](/flux/v0.x/stdlib/http/post/), etc.), +[template fetching](/influxdb/v2.3/influxdb-templates/) and +[notification endpoints](influxdb/v2.3/monitor-alert/notification-endpoints/) +can require InfluxDB to make HTTP requests over the network. With private IP validation enabled, InfluxDB first verifies that the IP address of the URL is not a private IP address. IP addresses are considered private if they fall into one of the following categories: diff --git a/content/telegraf/v1.23/install.md b/content/telegraf/v1.23/install.md index ac04db447..e6a6a34bf 100644 --- a/content/telegraf/v1.23/install.md +++ b/content/telegraf/v1.23/install.md @@ -1,4 +1,4 @@ -1.23--- +--- title: Install Telegraf description: Install Telegraf on your operating system. menu: diff --git a/content/telegraf/v1.23/release-notes-changelog.md b/content/telegraf/v1.23/release-notes-changelog.md index b0593168b..27a2ab727 100644 --- a/content/telegraf/v1.23/release-notes-changelog.md +++ b/content/telegraf/v1.23/release-notes-changelog.md @@ -11,6 +11,47 @@ menu: weight: 60 --- +## v1.23.1 [2022-7-5] + +## Bug fixes +- Jolokia2 input plugin (`jolikia2`): Resolve panic on null response. +- RabbitMQ input plugin (`rabbitmq`) Don't require listeners to be present in overview. +- Sync back `sample.confs` for Couchbuse input plugin (`couchbase`) and Groundwork output plugin (`groundwork`). +- Filter out views in MongoDB lookup. +- Fix race condition in configuration and prevent concurrent map writes to `c.UnusedFields`. +- Restore sample configurations broken during initial migration +- Sync back sample.confs for inputs.couchbase and outputs.groundwork. + +## Dependency updates +- Bump `cloud.google.com/go/monitoring` from 1.2.0 to 1.5.0. +- Bump `github.com/aws/aws-sdk-go-v2/credentials` from 1.12.2 to 1.12.5. +- Bump `google.golang.org/grpc` from 1.46.2 to 1.47.0. +- Bump `k8s.io/client-go` from 0.23.3 to 0.24.1. +- Bump `github.com/go-logfmt/logfmt` from 0.5.0 to 0.5.1. +- Bump `github.com/aws/aws-sdk-go-v2/service/dynamodb` from 1.15.3 to 1.15.7. +- Bump `go.mongodb.org/mongo-driver` from 1.9.0 to 1.9.1. +- Bump `github.com/gophercloud/gophercloud` from 0.24.0 to 0.25.0. +- Bump `google.golang.org/api` from 0.74.0 to 0.84.0. +- Bump `github.com/fatih/color` from 1.10.0 to 1.13.0. +- Bump `github.com/aws/aws-sdk-go-v2/service/timestreamwrite` from 1.3.2 to 1.13.6. +- Bump `github.com/shopify/sarama` from 1.32.0 to 1.34.1. +- Bump `github.com/dynatrace-oss/dynatrace-metric-utils-go` from 0.3.0 to 0.5.0. +- Bump `github.com/nats-io/nats.go` from 1.15.0 to 1.16.0. +- Bump `cloud.google.com/go/pubsub` from 1.18.0 to 1.22.2. +- Bump `go.opentelemetry.io/collector/pdata` from 0.52.0 to 0.54.0. +- Bump `github.com/jackc/pgx/v4` from 4.15.0 to 4.16.1. +- Bump `cloud.google.com/go/bigquery` from 1.8.0 to 1.33.0. +- Bump `github.com/Azure/azure-kusto-go` from 0.6.0 to 0.7.0. +- Bump `cloud.google.com/go/pubsub` from 1.22.2 to 1.23.0. +- Bump `github.com/aws/aws-sdk-go-v2/service/kinesis` from 1.13.0 to 1.15.7. +- Bump `github.com/aws/aws-sdk-go-v2/service/ec2` from 1.1.0 to 1.46.0. +- Bump `github.com/golang-jwt/jwt/v4` from 4.4.1 to 4.4.2. +- Bump `github.com/vmware/govmomi` from 0.27.3 to 0.28.0. +- Bump `github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs` from 1.15.4 to 1.15.8. +- Bump `github.com/influxdata/influxdb-observability/otel2influx` from 0.2.21 to 0.2.22. +- Bump `k8s.io/api` from 0.24.1 to 0.24.2. +- Bump `github.com/prometheus/client_golang` from 1.12.1 to 1.12.2. + ## v1.23.0 [2022-6-13] - Sample configuration (`sample.conf`) files for the different plugins are now embedded into the Golang code by the Go compiler. You can now download the sample configuration from diff --git a/data/products.yml b/data/products.yml index ae74fad6b..fde3a203d 100644 --- a/data/products.yml +++ b/data/products.yml @@ -38,7 +38,7 @@ telegraf: versions: [v1.9, v1.10, v1.11, v1.12, v1.13, v1.14, v1.15, v1.16, v1.17, v1.18, v1.19, v1.20, v1.21, v1.22, v1.23] latest: v1.23 latest_patches: - "1.23": 0 + "1.23": 1 "1.22": 2 "1.21": 4 "1.20": 4 diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 320125840..5e063ce51 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -87,6 +87,7 @@ {{ if ne $product "resources" }}

Additional resources

+ {{ end }} diff --git a/package.json b/package.json index de1eda30b..4d6a4df8a 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,12 @@ "description": "InfluxDB documentation", "license": "MIT", "devDependencies": { - "autoprefixer": "^10.2.5", - "hugo-extended": "^0.92.1", - "postcss": "^8.2.13", - "postcss-cli": "^9.1.0", + "autoprefixer": ">=10.2.5", + "hugo-extended": ">=0.101.0", + "postcss": ">=8.2.13", + "postcss-cli": "=>9.1.0" + }, + "dependencies": { "js-yaml": "^4.1.0" } } diff --git a/yarn.lock b/yarn.lock index baec9f3aa..93e9e2e0f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15,9 +15,9 @@ integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== "@babel/highlight@^7.16.7": - version "7.16.10" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.16.10.tgz#744f2eb81579d6eea753c227b0f570ad785aba88" - integrity sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw== + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.17.12.tgz#257de56ee5afbd20451ac0a75686b6b404257351" + integrity sha512-7yykMVF3hfZY2jsHZEEgLc+3x4o1O+fYyULu11GynEUQNwB6lua+IIQn1FiJxNucd5UlyJryrwsOh8PL9Sn8Qg== dependencies: "@babel/helper-validator-identifier" "^7.16.7" chalk "^2.0.0" @@ -150,14 +150,14 @@ array-union@^3.0.1: resolved "https://registry.yarnpkg.com/array-union/-/array-union-3.0.1.tgz#da52630d327f8b88cfbfb57728e2af5cd9b6b975" integrity sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw== -autoprefixer@^10.2.5: - version "10.4.2" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.2.tgz#25e1df09a31a9fba5c40b578936b90d35c9d4d3b" - integrity sha512-9fOPpHKuDW1w/0EKfRmVnxTDt8166MAnLI3mgZ1JCnhNtYWxcJ6Ud5CO/AVOZi/AvFa8DY9RTy3h3+tFBlrrdQ== +autoprefixer@>=10.2.5: + version "10.4.7" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.7.tgz#1db8d195f41a52ca5069b7593be167618edbbedf" + integrity sha512-ypHju4Y2Oav95SipEcCcI5J7CGPuvz8oat7sUtYj3ClK44bldfvtvcxK6IEK++7rqB7YchDGzweZIBG+SD0ZAA== dependencies: - browserslist "^4.19.1" - caniuse-lite "^1.0.30001297" - fraction.js "^4.1.2" + browserslist "^4.20.3" + caniuse-lite "^1.0.30001335" + fraction.js "^4.2.0" normalize-range "^0.1.2" picocolors "^1.0.0" postcss-value-parser "^4.2.0" @@ -193,23 +193,22 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^3.0.1, braces@~3.0.2: +braces@^3.0.2, braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: fill-range "^7.0.1" -browserslist@^4.19.1: - version "4.19.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.19.1.tgz#4ac0435b35ab655896c31d53018b6dd5e9e4c9a3" - integrity sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A== +browserslist@^4.20.3: + version "4.21.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.0.tgz#7ab19572361a140ecd1e023e2c1ed95edda0cefe" + integrity sha512-UQxE0DIhRB5z/zDz9iA03BOfxaN2+GQdBYH/2WrSIWEUrnpzTPJbhqt+umq6r3acaPRTW1FNTkrcp0PXgtFkvA== dependencies: - caniuse-lite "^1.0.30001286" - electron-to-chromium "^1.4.17" - escalade "^3.1.1" - node-releases "^2.0.1" - picocolors "^1.0.0" + caniuse-lite "^1.0.30001358" + electron-to-chromium "^1.4.164" + node-releases "^2.0.5" + update-browserslist-db "^1.0.0" buffer-alloc-unsafe@^1.1.0: version "1.1.0" @@ -227,12 +226,12 @@ buffer-alloc@^1.2.0: buffer-crc32@~0.2.3: version "0.2.13" resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= + integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== buffer-fill@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" - integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= + integrity sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ== buffer@^5.2.1: version "5.7.1" @@ -260,20 +259,20 @@ cacheable-request@^7.0.2: normalize-url "^6.0.1" responselike "^2.0.0" -caniuse-lite@^1.0.30001286, caniuse-lite@^1.0.30001297: - version "1.0.30001306" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001306.tgz#582592afe243bad2223081b8abab07bf289cc699" - integrity sha512-Wd1OuggRzg1rbnM5hv1wXs2VkxJH/AA+LuudlIqvZiCvivF+wJJe2mgBZC8gPMgI7D76PP5CTx8Luvaqc1V6OQ== +caniuse-lite@^1.0.30001335, caniuse-lite@^1.0.30001358: + version "1.0.30001359" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001359.tgz#a1c1cbe1c2da9e689638813618b4219acbd4925e" + integrity sha512-Xln/BAsPzEuiVLgJ2/45IaqD9jShtk3Y33anKb4+yLwQzws3+v6odKfpgES/cDEaZMLzSChpIGdbOYtH9MyuHw== -careful-downloader@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/careful-downloader/-/careful-downloader-2.0.1.tgz#2e2ad890108ba881895837f01865de978a9e1b91" - integrity sha512-nSvCrtMhl3Mtkif2RyOdswyvWQpgPO03fAym/5p0g84YWKf4gpulAjxPwiDfT8BRuoIVRBXUJtVTNnWI2jC0ig== +careful-downloader@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/careful-downloader/-/careful-downloader-2.0.2.tgz#53f879942c715f530ee6ac48a88cd2d07256b085" + integrity sha512-reL+MmVF5Y+Yzj94Udo63+b9IzdkbxNYfrw620YwBYDtiqRZr5Y9rTrrAndWycAa7yW/JtyV0OYvJlPzqjtSFA== dependencies: - debug "^4.3.2" + debug "^4.3.3" decompress "^4.2.1" fs-extra "^10.0.0" - got "^11.8.2" + got "^11.8.3" is-path-inside "^4.0.0" tempy "^2.0.0" @@ -287,9 +286,9 @@ chalk@^2.0.0: supports-color "^5.3.0" chalk@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.0.0.tgz#bd96c6bb8e02b96e08c0c3ee2a9d90e050c7b832" - integrity sha512-/duVOqst+luxCQRKEo4bNxinsOQtMP80ZYm7mMqzuh5PociNL0PvmHFvREJ9ueYL2TxlHjBcmLCdmocx9Vg+IQ== + version "5.0.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.0.1.tgz#ca57d71e82bb534a296df63bbacc4a1c22b2a4b6" + integrity sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w== chokidar@^3.3.0: version "3.5.3" @@ -344,7 +343,7 @@ color-convert@^2.0.1: color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== color-name@~1.1.4: version "1.1.4" @@ -367,7 +366,7 @@ compress-brotli@^1.3.8: concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== core-util-is@~1.0.0: version "1.0.3" @@ -381,10 +380,10 @@ crypto-random-string@^4.0.0: dependencies: type-fest "^1.0.1" -debug@^4.3.2: - version "4.3.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" - integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== +debug@^4.3.3: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" @@ -427,7 +426,7 @@ decompress-targz@^4.0.0: decompress-unzip@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/decompress-unzip/-/decompress-unzip-4.0.1.tgz#deaaccdfd14aeaf85578f733ae8210f9b4848f69" - integrity sha1-3qrM39FK6vhVePczroIQ+bSEj2k= + integrity sha512-1fqeluvxgnn86MOh66u8FjbtJpAFv5wgCT9Iw8rcBqQcCo5tO8eiJw7NNTrvt9n4CRBVq7CstiS922oPgyGLrw== dependencies: file-type "^3.8.0" get-stream "^2.2.0" @@ -454,9 +453,9 @@ defer-to-connect@^2.0.0: integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== del@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/del/-/del-6.0.0.tgz#0b40d0332cea743f1614f818be4feb717714c952" - integrity sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ== + version "6.1.1" + resolved "https://registry.yarnpkg.com/del/-/del-6.1.1.tgz#3b70314f1ec0aa325c6b14eb36b95786671edb7a" + integrity sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg== dependencies: globby "^11.0.1" graceful-fs "^4.2.4" @@ -479,10 +478,10 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -electron-to-chromium@^1.4.17: - version "1.4.64" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.64.tgz#8b1b5372f77ca208f2c498c6490da0e51176bd81" - integrity sha512-8mec/99xgLUZCIZZq3wt61Tpxg55jnOSpxGYapE/1Ma9MpFEYYaz4QNYm0CM1rrnCo7i3FRHhbaWjeCLsveGjQ== +electron-to-chromium@^1.4.164: + version "1.4.169" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.169.tgz#d4b8cf9816566c7e9518128f1a97f39de9c7af9d" + integrity sha512-Yb7UFva1sLlAaRyCkgoFF3qWvwZacFDtsGKi44rZsk8vnhL0DMhsUdhI4Dz9CCJQfftncDMGSI3AYiDtg8mD/w== emoji-regex@^8.0.0: version "8.0.0" @@ -511,7 +510,7 @@ escalade@^3.1.1: escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== fast-glob@^3.2.7, fast-glob@^3.2.9: version "3.2.11" @@ -534,19 +533,19 @@ fastq@^1.6.0: fd-slicer@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" - integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= + integrity sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g== dependencies: pend "~1.2.0" file-type@^3.8.0: version "3.9.0" resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9" - integrity sha1-JXoHg4TR24CHvESdEH1SpSZyuek= + integrity sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA== file-type@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/file-type/-/file-type-5.2.0.tgz#2ddbea7c73ffe36368dfae49dc338c058c2b8ad6" - integrity sha1-LdvqfHP/42No365J3DOMBYwritY= + integrity sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ== file-type@^6.1.0: version "6.2.0" @@ -560,18 +559,18 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -find-up@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-6.2.0.tgz#f3b81d633fa83bebe64f83a8bab357f86d5914be" - integrity sha512-yWHzMzXCaFoABSnFTCPKNFlYoq4mSga9QLRRKOCLSJ33hSkzROB14ITbAWW0QDQDyuzsPQ33S1DsOWQb/oW1yA== +find-up@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-6.3.0.tgz#2abab3d3280b2dc7ac10199ef324c4e002c8c790" + integrity sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw== dependencies: - locate-path "^7.0.0" + locate-path "^7.1.0" path-exists "^5.0.0" -fraction.js@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.1.2.tgz#13e420a92422b6cf244dff8690ed89401029fbe8" - integrity sha512-o2RiJQ6DZaR/5+Si0qJUIy637QMRudSi9kU/FFzx9EZazrIdnBgpU+3sEWCxAVhH2RtxW2Oz+T4p2o8uOPVcgA== +fraction.js@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.2.0.tgz#448e5109a313a3527f5a3ab2119ec4cf0e0e2950" + integrity sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA== fs-constants@^1.0.0: version "1.0.0" @@ -579,9 +578,9 @@ fs-constants@^1.0.0: integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== fs-extra@^10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.0.0.tgz#9ff61b655dde53fb34a82df84bb214ce802e17c1" - integrity sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ== + version "10.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== dependencies: graceful-fs "^4.2.0" jsonfile "^6.0.1" @@ -590,7 +589,7 @@ fs-extra@^10.0.0: fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== fsevents@~2.3.2: version "2.3.2" @@ -615,7 +614,7 @@ get-stdin@^9.0.0: get-stream@^2.2.0: version "2.3.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de" - integrity sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4= + integrity sha512-AUGhbbemXxrZJRD5cDvKtQxLuYaIbNtDTK8YqupCI393Q2KSTreEsLUN3ZxAWFGiKTzL6nKuzfcIvieflUX9qA== dependencies: object-assign "^4.0.1" pinkie-promise "^2.0.0" @@ -635,14 +634,14 @@ glob-parent@^5.1.2, glob-parent@~5.1.2: is-glob "^4.0.1" glob@^7.1.3: - version "7.2.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.0.4" + minimatch "^3.1.1" once "^1.3.0" path-is-absolute "^1.0.0" @@ -670,7 +669,7 @@ globby@^12.0.0: merge2 "^1.4.1" slash "^4.0.0" -got@^11.8.2: +got@^11.8.3: version "11.8.5" resolved "https://registry.yarnpkg.com/got/-/got-11.8.5.tgz#ce77d045136de56e8f024bebb82ea349bc730046" integrity sha512-o0Je4NvQObAuZPHLFoRSkdG2lTgtcynqymzg2Vupdx6PorhaT5MCbIyXG6d4D94kk8ZG57QeosgdiqfJWhEhlQ== @@ -688,14 +687,14 @@ got@^11.8.2: responselike "^2.0.0" graceful-fs@^4.1.10, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: - version "4.2.9" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" - integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== has@^1.0.3: version "1.0.3" @@ -724,14 +723,14 @@ http2-wrapper@^1.0.0-beta.5.2: quick-lru "^5.1.1" resolve-alpn "^1.0.0" -hugo-extended@^0.92.1: - version "0.92.1" - resolved "https://registry.yarnpkg.com/hugo-extended/-/hugo-extended-0.92.1.tgz#aa82964fbbff7d02379168ea7ed0e3b12ed38a13" - integrity sha512-e/G4KcdvZOH//wiIy8f7DgqAp9yPJIgN23fPoOne1MhZcWKRutqSTNuUWt7NKXI7kDxAYzbsXSbsvvkN9pfpRQ== +hugo-extended@>=0.101.0: + version "0.101.0" + resolved "https://registry.yarnpkg.com/hugo-extended/-/hugo-extended-0.101.0.tgz#a96bf343f5795b7ccdc109a0ca894370a69fb286" + integrity sha512-azK6Kf4AneCyal4yVXiC7w0yW2UnP0ZnciPPu52DMm1s2AFBvZhXvQYCJg92qTJ+3Ls5Zy9qMLM09/DKhaVswA== dependencies: - careful-downloader "^2.0.1" + careful-downloader "^2.0.2" log-symbols "^5.1.0" - read-pkg-up "^9.0.0" + read-pkg-up "^9.1.0" ieee754@^1.1.13: version "1.2.1" @@ -751,7 +750,7 @@ indent-string@^4.0.0: inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" wrappy "1" @@ -764,7 +763,7 @@ inherits@2, inherits@~2.0.3: is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== is-binary-path@~2.1.0: version "2.1.0" @@ -774,16 +773,16 @@ is-binary-path@~2.1.0: binary-extensions "^2.0.0" is-core-module@^2.5.0: - version "2.8.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" - integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== + version "2.9.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" + integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== dependencies: has "^1.0.3" is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== is-fullwidth-code-point@^3.0.0: version "3.0.0" @@ -800,7 +799,7 @@ is-glob@^4.0.1, is-glob@~4.0.1: is-natural-number@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8" - integrity sha1-q5124dtM7VHjXeDHLr7PCfc0zeg= + integrity sha512-Y4LTamMe0DDQIIAlaer9eKebAlDSV6huy+TWhJVPlzZh2o4tRP5SQWFlLn5N0To4mDD22/qdOq+veo1cSISLgQ== is-number@^7.0.0: version "7.0.0" @@ -825,7 +824,7 @@ is-path-inside@^4.0.0: is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + integrity sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ== is-stream@^3.0.0: version "3.0.0" @@ -833,14 +832,14 @@ is-stream@^3.0.0: integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== is-unicode-supported@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-1.1.0.tgz#9127b71f9fa82f52ca5c20e982e7bec0ee31ee1e" - integrity sha512-lDcxivp8TJpLG75/DpatAqNzOpDPSpED8XNtrpBHTdQ2InQ1PbW78jhwSxyxhhu+xbVSast2X38bwj8atwoUQA== + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-1.2.0.tgz#f4f54f34d8ebc84a46b93559a036763b6d3e1014" + integrity sha512-wH+U77omcRzevfIG8dDhTS0V9zZyweakfD01FULl97+0EHiJTTZtJqxPSkIIo/SDPv/i07k/C9jAPY+jwLLeUQ== isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== js-tokens@^4.0.0: version "4.0.0" @@ -881,20 +880,20 @@ keyv@^4.0.0: compress-brotli "^1.3.8" json-buffer "3.0.1" -lilconfig@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.4.tgz#f4507d043d7058b380b6a8f5cb7bcd4b34cee082" - integrity sha512-bfTIN7lEsiooCocSISTWXkiWJkRqtL9wYtYy+8EK3Y41qh3mpwPU0ycTOgjdY9ErwXCc8QyrQp82bdL0Xkm9yA== +lilconfig@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.5.tgz#19e57fd06ccc3848fd1891655b5a447092225b25" + integrity sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg== lines-and-columns@^1.1.6: version "1.2.4" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -locate-path@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-7.0.0.tgz#f0a60c8dd7ef0f737699eb9461b9567a92bc97da" - integrity sha512-+cg2yXqDUKfo4hsFxwa3G1cBJeA+gs1vD8FyV9/odWoUlQe/4syxHQ5DPtKjtfm6gnKbZzjCqzX03kXosvZB1w== +locate-path@^7.1.0: + version "7.1.1" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-7.1.1.tgz#8e1e5a75c7343770cef02ff93c4bf1f0aa666374" + integrity sha512-vJXaRMJgRVD3+cUZs3Mncj2mxpt5mP0EmNOsxRSZRMlbqjvxzDEOIUWXGmavo0ZC9+tNZCBLQ66reA11nbpHZg== dependencies: p-locate "^6.0.0" @@ -931,12 +930,12 @@ merge2@^1.3.0, merge2@^1.4.1: integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== micromatch@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" - integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== dependencies: - braces "^3.0.1" - picomatch "^2.2.3" + braces "^3.0.2" + picomatch "^2.3.1" mimic-response@^1.0.0: version "1.0.1" @@ -948,10 +947,10 @@ mimic-response@^3.1.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== -minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== +minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" @@ -960,15 +959,15 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -nanoid@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.2.0.tgz#62667522da6673971cca916a6d3eff3f415ff80c" - integrity sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA== +nanoid@^3.3.4: + version "3.3.4" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" + integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== -node-releases@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.1.tgz#3d1d395f204f1f2f29a54358b9fb678765ad2fc5" - integrity sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA== +node-releases@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.5.tgz#280ed5bc3eba0d96ce44897d8aee478bfb3d9666" + integrity sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q== normalize-package-data@^3.0.2: version "3.0.3" @@ -988,7 +987,7 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: normalize-range@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" - integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= + integrity sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA== normalize-url@^6.0.1: version "6.1.0" @@ -998,7 +997,7 @@ normalize-url@^6.0.1: object-assign@^4.0.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" @@ -1051,7 +1050,7 @@ path-exists@^5.0.0: path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== path-type@^4.0.0: version "4.0.0" @@ -1061,14 +1060,14 @@ path-type@^4.0.0: pend@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" - integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= + integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== picocolors@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== @@ -1076,26 +1075,26 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + integrity sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg== pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= + integrity sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw== dependencies: pinkie "^2.0.0" pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= + integrity sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg== -postcss-cli@^9.1.0: +postcss-cli@=>9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/postcss-cli/-/postcss-cli-9.1.0.tgz#1a86404cbe848e370127b4bdf5cd2be83bc45ebe" integrity sha512-zvDN2ADbWfza42sAnj+O2uUWyL0eRL1V+6giM2vi4SqTR3gTYy8XzcpfwccayF2szcUif0HMmXiEaDv9iEhcpw== @@ -1114,11 +1113,11 @@ postcss-cli@^9.1.0: yargs "^17.0.0" postcss-load-config@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.1.tgz#2f53a17f2f543d9e63864460af42efdac0d41f87" - integrity sha512-c/9XYboIbSEUZpiD1UQD0IKiUe8n9WHYV7YFe7X7J+ZwCsEKkUJSFWjS9hBU1RR9THR7jMXst8sxiqP0jjo2mg== + version "3.1.4" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.4.tgz#1ab2571faf84bb078877e1d07905eabe9ebda855" + integrity sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg== dependencies: - lilconfig "^2.0.4" + lilconfig "^2.0.5" yaml "^1.10.2" postcss-reporter@^7.0.0: @@ -1134,19 +1133,19 @@ postcss-value-parser@^4.2.0: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -postcss@^8.2.13: - version "8.4.6" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.6.tgz#c5ff3c3c457a23864f32cb45ac9b741498a09ae1" - integrity sha512-OovjwIzs9Te46vlEx7+uXB0PLijpwjXGKXjVGGPIGubGpq7uh5Xgf6D6FiJ/SzJMBosHDp6a2hiXOS97iBXcaA== +postcss@>=8.2.13: + version "8.4.14" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf" + integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig== dependencies: - nanoid "^3.2.0" + nanoid "^3.3.4" picocolors "^1.0.0" source-map-js "^1.0.2" pretty-hrtime@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" - integrity sha1-t+PqQkNaTJsnWdmeDyAesZWALuE= + integrity sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A== process-nextick-args@~2.0.0: version "2.0.1" @@ -1174,23 +1173,23 @@ quick-lru@^5.1.1: read-cache@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774" - integrity sha1-5mTvMRYRZsl1HNvo28+GtftY93Q= + integrity sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA== dependencies: pify "^2.3.0" -read-pkg-up@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-9.0.0.tgz#2f03ba3e1430c56f8f0a4da73274c6d26c283b45" - integrity sha512-7dNMZVru/9QQYnYYjboVqpaqT/e24MuhovJWjZHFBmUnCKVz5ZVFNLbd+fJCUsH7uIgkYbX9yQJvab2nc6P7Nw== +read-pkg-up@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-9.1.0.tgz#38ca48e0bc6c6b260464b14aad9bcd4e5b1fbdc3" + integrity sha512-vaMRR1AC1nrd5CQM0PhlRsO5oc2AAigqr7cCrZ/MW/Rsaflz4RlgzkpL4qoU/z1F6wrbd85iFv1OQj/y5RdGvg== dependencies: - find-up "^6.2.0" - read-pkg "^7.0.0" + find-up "^6.3.0" + read-pkg "^7.1.0" type-fest "^2.5.0" -read-pkg@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-7.0.0.tgz#7009094a9cd58c7efc325d31f1f6cfce1928fa00" - integrity sha512-oG2cKegOo2gjy/hrAM+KFHD9IqKdQvWcpWBBxuHbaucziM9PY45EuF6YbenLF7tL9ekXgB6Lfruo9hwdHQZUrA== +read-pkg@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-7.1.0.tgz#438b4caed1ad656ba359b3e00fd094f3c427a43e" + integrity sha512-5iOehe+WF75IccPc30bWTbpdDQLOCc3Uu8bi3Dte3Eueij81yx1Mrufk8qBx/YAbR4uL1FdUr+7BKXDwEtisXg== dependencies: "@types/normalize-package-data" "^2.4.1" normalize-package-data "^3.0.2" @@ -1220,7 +1219,7 @@ readdirp@~3.6.0: require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== resolve-alpn@^1.0.0: version "1.2.1" @@ -1271,9 +1270,9 @@ seek-bzip@^1.0.5: commander "^2.8.1" semver@^7.3.4: - version "7.3.5" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + version "7.3.7" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== dependencies: lru-cache "^6.0.0" @@ -1392,7 +1391,7 @@ thenby@^1.3.4: through@^2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== to-buffer@^1.1.1: version "1.1.1" @@ -1412,9 +1411,9 @@ type-fest@^1.0.1: integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== type-fest@^2.0.0, type-fest@^2.5.0: - version "2.11.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.11.1.tgz#04ddf5c0dbbd403fb8270d98ad1b4857e7ff7b24" - integrity sha512-fPcV5KLAqFfmhHobtAUwEpbpfYhVF7wSLVgbG/7mIGe/Pete7ky/bPAPRkzbWdrj0/EkswFAAR2feJCgigkUKg== + version "2.14.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.14.0.tgz#f990e19169517d689c98e16d128b231022b27e12" + integrity sha512-hQnTQkFjL5ik6HF2fTAM8ycbr94UbQXK364wF930VHb0dfBJ5JBP8qwrR8TaK9zwUEk7meruo2JAUDMwvuxd/w== unbzip2-stream@^1.0.9: version "1.4.3" @@ -1436,10 +1435,18 @@ universalify@^2.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== +update-browserslist-db@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz#dbfc5a789caa26b1db8990796c2c8ebbce304824" + integrity sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== validate-npm-package-license@^3.0.1: version "3.0.4" @@ -1484,14 +1491,14 @@ yaml@^1.10.2: integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== yargs-parser@^21.0.0: - version "21.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.0.tgz#a485d3966be4317426dd56bdb6a30131b281dc55" - integrity sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA== + version "21.0.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.1.tgz#0267f286c877a4f0f728fceb6f8a3e4cb95c6e35" + integrity sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg== yargs@^17.0.0: - version "17.3.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.3.1.tgz#da56b28f32e2fd45aefb402ed9c26f42be4c07b9" - integrity sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA== + version "17.5.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.5.1.tgz#e109900cab6fcb7fd44b1d8249166feb0b36e58e" + integrity sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA== dependencies: cliui "^7.0.2" escalade "^3.1.1" @@ -1504,7 +1511,7 @@ yargs@^17.0.0: yauzl@^2.4.2: version "2.10.0" resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" - integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= + integrity sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g== dependencies: buffer-crc32 "~0.2.3" fd-slicer "~1.1.0"