Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Feb 22, 2024
1 parent a454738 commit 17df0bc
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 252 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/npm_downloads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ jobs:
# Upload the download data:
- name: 'Upload data'
# Pin action to full length commit SHA corresponding to v3.1.3
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
# Pin action to full length commit SHA
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
# Define a name for the uploaded artifact (ensuring a unique name for each job):
name: npm_downloads
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,10 @@ jobs:
mv ./package.json.tmp ./package.json
fi
done
jq -r '.devDependencies | keys[]' ./package.json | while read -r dep; do
if [[ "$dep" != "@stdlib"* ]]; then
continue
fi
dep=$(echo "$dep" | xargs)
if ! find lib -name "*.js" -exec grep -q "$dep" {} + && ! grep -q -s "$dep" manifest.json && ! grep -q -s "$dep" include.gypi; then
jq --indent 2 "del(.devDependencies[\"$dep\"])" ./package.json > ./package.json.tmp
mv ./package.json.tmp ./package.json
fi
done
# Set `devDependencies` to an empty object:
jq --indent 2 '.devDependencies = {}' ./package.json > ./package.json.tmp
mv ./package.json.tmp ./package.json
# Remove CLI section:
find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/(\* \* \*\n+)?<section class=\"cli\">[\s\S]+?<\!\-\- \/.cli \-\->//"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_bundles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ jobs:

# Install Deno:
- name: 'Install Deno'
# Pin action to full length commit SHA corresponding to v1.1.2
uses: denoland/setup-deno@61fe2df320078202e33d7d5ad347e7dcfa0e8f31
# Pin action to full length commit SHA
uses: denoland/setup-deno@041b854f97b325bd60e53e9dc2de9cb9f9ac0cba # v1.1.4
with:
deno-version: vx.x.x

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
[npm-image]: http://img.shields.io/npm/v/@stdlib/array-empty.svg
[npm-url]: https://npmjs.org/package/@stdlib/array-empty

[test-image]: https://github.com/stdlib-js/array-empty/actions/workflows/test.yml/badge.svg?branch=v0.2.0
[test-url]: https://github.com/stdlib-js/array-empty/actions/workflows/test.yml?query=branch:v0.2.0
[test-image]: https://github.com/stdlib-js/array-empty/actions/workflows/test.yml/badge.svg?branch=main
[test-url]: https://github.com/stdlib-js/array-empty/actions/workflows/test.yml?query=branch:main

[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/array-empty/main.svg
[coverage-url]: https://codecov.io/github/stdlib-js/array-empty?branch=main
Expand Down
227 changes: 8 additions & 219 deletions docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,228 +20,11 @@

/// <reference types="@stdlib/types"/>

import { Complex128Array, Complex64Array, DataType } from '@stdlib/types/array';
import { DataTypeMap } from '@stdlib/types/array';

/**
* Creates an uninitialized array having a specified length.
*
* ## Notes
*
* - In browser environments, the function always returns zero-filled arrays.
* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data.
*
* @param length - array length
* @param dtype - data type
* @returns empty array
*
* @example
* var arr = empty( 2, 'float64' );
* // returns <Float64Array>
*/
declare function empty( length: number, dtype: 'float64' ): Float64Array;

/**
* Creates an uninitialized array having a specified length.
*
* ## Notes
*
* - In browser environments, the function always returns zero-filled arrays.
* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data.
*
* @param length - array length
* @param dtype - data type
* @returns empty array
*
* @example
* var arr = empty( 2, 'float32' );
* // returns <Float32Array>
*/
declare function empty( length: number, dtype: 'float32' ): Float32Array;

/**
* Creates an uninitialized array having a specified length.
*
* ## Notes
*
* - In browser environments, the function always returns zero-filled arrays.
* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data.
*
* @param length - array length
* @param dtype - data type
* @returns empty array
*
* @example
* var arr = empty( 2, 'complex128' );
* // returns <Complex128Array>
*/
declare function empty( length: number, dtype: 'complex128' ): Complex128Array;

/**
* Creates an uninitialized array having a specified length.
*
* ## Notes
*
* - In browser environments, the function always returns zero-filled arrays.
* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data.
*
* @param length - array length
* @param dtype - data type
* @returns empty array
*
* @example
* var arr = empty( 2, 'complex64' );
* // returns <Complex64Array>
*/
declare function empty( length: number, dtype: 'complex64' ): Complex64Array;

/**
* Creates an uninitialized array having a specified length.
*
* ## Notes
*
* - In browser environments, the function always returns zero-filled arrays.
* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data.
*
* @param length - array length
* @param dtype - data type
* @returns empty array
*
* @example
* var arr = empty( 2, 'int32' );
* // returns <Int32Array>
*/
declare function empty( length: number, dtype: 'int32' ): Int32Array;

/**
* Creates an uninitialized array having a specified length.
*
* ## Notes
*
* - In browser environments, the function always returns zero-filled arrays.
* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data.
*
* @param length - array length
* @param dtype - data type
* @returns empty array
*
* @example
* var arr = empty( 2, 'int16' );
* // returns <Int16Array>
*/
declare function empty( length: number, dtype: 'int16' ): Int16Array;

/**
* Creates an uninitialized array having a specified length.
*
* ## Notes
*
* - In browser environments, the function always returns zero-filled arrays.
* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data.
*
* @param length - array length
* @param dtype - data type
* @returns empty array
*
* @example
* var arr = empty( 2, 'int8' );
* // returns <Int8Array>
*/
declare function empty( length: number, dtype: 'int8' ): Int8Array;

/**
* Creates an uninitialized array having a specified length.
*
* ## Notes
*
* - In browser environments, the function always returns zero-filled arrays.
* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data.
*
* @param length - array length
* @param dtype - data type
* @returns empty array
*
* @example
* var arr = empty( 2, 'uint32' );
* // returns <Uint32Array>
*/
declare function empty( length: number, dtype: 'uint32' ): Uint32Array;

/**
* Creates an uninitialized array having a specified length.
*
* ## Notes
*
* - In browser environments, the function always returns zero-filled arrays.
* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data.
*
* @param length - array length
* @param dtype - data type
* @returns empty array
*
* @example
* var arr = empty( 2, 'uint16' );
* // returns <Uint16Array>
*/
declare function empty( length: number, dtype: 'uint16' ): Uint16Array;

/**
* Creates an uninitialized array having a specified length.
*
* ## Notes
*
* - In browser environments, the function always returns zero-filled arrays.
* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data.
*
* @param length - array length
* @param dtype - data type
* @returns empty array
*
* @example
* var arr = empty( 2, 'uint8' );
* // returns <Uint8Array>
*/
declare function empty( length: number, dtype: 'uint8' ): Uint8Array;

/**
* Creates an uninitialized array having a specified length.
*
* ## Notes
*
* - In browser environments, the function always returns zero-filled arrays.
* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data.
*
* @param length - array length
* @param dtype - data type
* @returns empty array
*
* @example
* var arr = empty( 2, 'uint8c' );
* // returns <Uint8ClampedArray>
*/
declare function empty( length: number, dtype: 'uint8c' ): Uint8ClampedArray;

/**
* Creates a zero-filled array having a specified length.
*
* @param length - array length
* @param dtype - data type
* @returns zero-filled array
*
* @example
* var arr = empty( 2, 'generic' );
* // returns
*/
declare function empty( length: number, dtype: 'generic' ): Array<number>;

/**
* Creates an uninitialized array having a specified length.
*
* ## Notes
*
* - In browser environments, the function always returns zero-filled arrays.
* - If `dtype` is `'generic'`, the function always returns a zero-filled array.
* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data.
*
* The function recognizes the following data types:
*
* - `float64`: double-precision floating-point numbers (IEEE 754)
Expand All @@ -257,6 +40,12 @@ declare function empty( length: number, dtype: 'generic' ): Array<number>;
* - `uint8c`: 8-bit unsigned integers clamped to `0-255`
* - `generic`: generic JavaScript values
*
* ## Notes
*
* - In browser environments, the function always returns zero-filled arrays.
* - If `dtype` is `'generic'`, the function always returns a zero-filled array.
* - In Node.js versions `>=3.0.0`, the underlying memory of returned typed arrays is **not** initialized. Memory contents are unknown and may contain **sensitive** data.
*
* @param length - array length
* @param dtype - data type (default: 'float64')
* @returns empty array
Expand All @@ -269,7 +58,7 @@ declare function empty( length: number, dtype: 'generic' ): Array<number>;
* var arr = empty( 2, 'float32' );
* // returns <Float32Array>
*/
declare function empty( length: number, dtype?: DataType ): Float64Array;
declare function empty<T extends keyof DataTypeMap<number> = 'float64'>( length: number, dtype?: T ): DataTypeMap<number>[T];


// EXPORTS //
Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,31 @@
"@stdlib/array-typed-ctors": "^0.2.0",
"@stdlib/array-zeros": "^0.2.0",
"@stdlib/assert-is-nonnegative-integer": "^0.2.0",
"@stdlib/assert-is-uint8array": "^0.2.0",
"@stdlib/assert-is-uint8array": "^0.2.1",
"@stdlib/buffer-alloc-unsafe": "^0.2.0",
"@stdlib/ndarray-base-bytes-per-element": "^0.2.0",
"@stdlib/string-format": "^0.2.0",
"@stdlib/types": "^0.3.1"
"@stdlib/string-format": "^0.2.1",
"@stdlib/types": "^0.3.2"
},
"devDependencies": {
"@stdlib/array-complex128": "^0.1.0",
"@stdlib/array-complex64": "^0.1.0",
"@stdlib/array-complex128": "^0.2.0",
"@stdlib/array-complex64": "^0.2.0",
"@stdlib/array-dtypes": "^0.2.0",
"@stdlib/array-float32": "^0.2.0",
"@stdlib/array-float64": "^0.2.0",
"@stdlib/array-int16": "^0.2.0",
"@stdlib/array-int32": "^0.2.0",
"@stdlib/array-int8": "^0.2.0",
"@stdlib/array-uint16": "^0.2.0",
"@stdlib/array-uint32": "^0.2.0",
"@stdlib/array-uint8": "^0.2.0",
"@stdlib/array-uint8c": "^0.2.0",
"@stdlib/assert-instance-of": "^0.2.0",
"@stdlib/assert-is-array": "^0.2.0",
"@stdlib/array-float32": "^0.2.1",
"@stdlib/array-float64": "^0.2.1",
"@stdlib/array-int16": "^0.2.1",
"@stdlib/array-int32": "^0.2.1",
"@stdlib/array-int8": "^0.2.1",
"@stdlib/array-uint16": "^0.2.1",
"@stdlib/array-uint32": "^0.2.1",
"@stdlib/array-uint8": "^0.2.1",
"@stdlib/array-uint8c": "^0.2.1",
"@stdlib/assert-instance-of": "^0.2.1",
"@stdlib/assert-is-array": "^0.2.1",
"@stdlib/assert-is-typed-array": "^0.2.0",
"@stdlib/assert-is-typed-array-like": "^0.2.0",
"@stdlib/math-base-special-pow": "^0.2.0",
"@stdlib/strided-base-reinterpret-complex128": "^0.2.0",
"@stdlib/strided-base-reinterpret-complex128": "^0.2.1",
"@stdlib/strided-base-reinterpret-complex64": "^0.2.0",
"proxyquire": "^2.0.0",
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
Expand Down

0 comments on commit 17df0bc

Please sign in to comment.