diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml
index 334eb59..91f2b93 100644
--- a/.github/workflows/productionize.yml
+++ b/.github/workflows/productionize.yml
@@ -82,21 +82,6 @@ jobs:
id: transform-error-messages
uses: stdlib-js/transform-errors-action@main
- # Format error messages:
- - name: 'Replace double quotes with single quotes in rewritten format string error messages'
- run: |
- find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \;
-
- # Format string literal error messages:
- - name: 'Replace double quotes with single quotes in rewritten string literal error messages'
- run: |
- find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \;
-
- # Format code:
- - name: 'Replace double quotes with single quotes in inserted `require` calls'
- run: |
- find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \;
-
# Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency:
- name: 'Update dependencies in package.json'
run: |
diff --git a/README.md b/README.md
index 55512c3..d933bc9 100644
--- a/README.md
+++ b/README.md
@@ -192,8 +192,8 @@ Copyright © 2016-2023. 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.0.1
-[test-url]: https://github.com/stdlib-js/array-empty/actions/workflows/test.yml?query=branch:v0.0.1
+[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
diff --git a/dist/index.d.ts b/dist/index.d.ts
new file mode 100644
index 0000000..8f04474
--- /dev/null
+++ b/dist/index.d.ts
@@ -0,0 +1,3 @@
+///
+import empty from '../docs/types/index';
+export = empty;
\ No newline at end of file
diff --git a/dist/index.js b/dist/index.js
new file mode 100644
index 0000000..91eb122
--- /dev/null
+++ b/dist/index.js
@@ -0,0 +1,9 @@
+"use strict";var n=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var m=n(function(F,v){
+var d=require('@stdlib/buffer-alloc-unsafe/dist'),x=require('@stdlib/assert-is-uint8array/dist');function w(){var r=d(1);return x(r)}v.exports=w
+});var y=n(function(I,p){
+var c=require('@stdlib/assert-is-nonnegative-integer/dist').isPrimitive,U=require('@stdlib/buffer-alloc-unsafe/dist'),E=require('@stdlib/array-typed-ctors/dist'),z=require('@stdlib/array-base-zeros/dist'),A=require('@stdlib/ndarray-base-bytes-per-element/dist'),l=require('@stdlib/error-tools-fmtprodmsg/dist');function N(r){var e,a,t,o,i,f,u;if(!c(r))throw new TypeError(l('1Zj2d',r));if(arguments.length>1?t=arguments[1]:t="float64",t==="generic")return z(r);if(e=A(t),e===null)throw new TypeError(l('1ZjEC',t));return o=E(t),u=e*r,t==="complex128"&&(u+=8),i=U(u),a=i.byteOffset,t==="complex128"&&(c(a/e)||(a+=8)),f=new o(i.buffer,a,r),f}p.exports=N
+});var b=n(function(O,g){
+var q=require('@stdlib/array-zeros/dist');function P(r){return arguments.length>1?q(r,arguments[1]):q(r)}g.exports=P
+});var T=m(),V=y(),k=b(),s;T()?s=V:s=k;module.exports=s;
+/** @license Apache-2.0 */
+//# sourceMappingURL=index.js.map
diff --git a/dist/index.js.map b/dist/index.js.map
new file mode 100644
index 0000000..70b14fd
--- /dev/null
+++ b/dist/index.js.map
@@ -0,0 +1,7 @@
+{
+ "version": 3,
+ "sources": ["../lib/is_buffer_uint8array.js", "../lib/main.js", "../lib/polyfill.js", "../lib/index.js"],
+ "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar allocUnsafe = require( '@stdlib/buffer-alloc-unsafe' );\nvar isUint8Array = require( '@stdlib/assert-is-uint8array' );\n\n\n// MAIN //\n\n/**\n* Checks whether an environment supports Node.js buffer instances which inherit from `Uint8Array`.\n*\n* @private\n* @returns {boolean} boolean indicating whether an environment supports Node.js buffer instances inheriting from `Uint8Array`\n*\n* @example\n* var bool = check();\n* // returns \n*/\nfunction check() {\n\tvar buf = allocUnsafe( 1 );\n\treturn isUint8Array( buf );\n}\n\n\n// EXPORTS //\n\nmodule.exports = check;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNonNegativeInteger = require( '@stdlib/assert-is-nonnegative-integer' ).isPrimitive;\nvar allocUnsafe = require( '@stdlib/buffer-alloc-unsafe' );\nvar ctors = require( '@stdlib/array-typed-ctors' );\nvar zeros = require( '@stdlib/array-base-zeros' );\nvar bytesPerElement = require( '@stdlib/ndarray-base-bytes-per-element' );\nvar format = require( '@stdlib/string-format' );\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tvar nbytes;\n\tvar offset;\n\tvar dtype;\n\tvar ctor;\n\tvar buf;\n\tvar out;\n\tvar nb;\n\n\tif ( !isNonNegativeInteger( length ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', length ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tdtype = arguments[ 1 ];\n\t} else {\n\t\tdtype = 'float64';\n\t}\n\tif ( dtype === 'generic' ) {\n\t\treturn zeros( length );\n\t}\n\tnbytes = bytesPerElement( dtype );\n\tif ( nbytes === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a supported data type. Value: `%s`.', dtype ) );\n\t}\n\t// Resolve typed array constructor:\n\tctor = ctors( dtype );\n\n\t// Compute the number of bytes to allocate:\n\tnb = nbytes * length;\n\tif ( dtype === 'complex128' ) {\n\t\tnb += 8; // Note: need to allocate additional bytes to ensure alignment\n\t}\n\t// Allocate binary buffer:\n\tbuf = allocUnsafe( nb );\n\n\t// Resolve the byte offset:\n\toffset = buf.byteOffset;\n\tif ( dtype === 'complex128' ) {\n\t\tif ( !isNonNegativeInteger( offset/nbytes ) ) {\n\t\t\toffset += 8; // Note: ensure alignment\n\t\t}\n\t}\n\t// Reinterpret the binary buffer:\n\tout = new ctor( buf.buffer, offset, length );\n\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = empty;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar zeros = require( '@stdlib/array-zeros' );\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized array having a specified length.\n*\n* @private\n* @param {NonNegativeInteger} length - array length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\nfunction empty( length ) {\n\tif ( arguments.length > 1 ) {\n\t\treturn zeros( length, arguments[ 1 ] );\n\t}\n\treturn zeros( length );\n}\n\n\n// EXPORTS //\n\nmodule.exports = empty;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an uninitialized array having a specified length.\n*\n* @module @stdlib/array-empty\n*\n* @example\n* var empty = require( '@stdlib/array-empty' );\n*\n* var arr = empty( 2 );\n* // returns \n*\n* @example\n* var empty = require( '@stdlib/array-empty' );\n*\n* var arr = empty( 2, 'float32' );\n* // returns \n*/\n\n// MODULES //\n\nvar isBufferUint8Array = require( './is_buffer_uint8array.js' );\nvar main = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar empty;\nif ( isBufferUint8Array() ) {\n\tempty = main;\n} else {\n\tempty = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = empty;\n"],
+ "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAc,QAAS,6BAA8B,EACrDC,EAAe,QAAS,8BAA+B,EAe3D,SAASC,GAAQ,CAChB,IAAIC,EAAMH,EAAa,CAAE,EACzB,OAAOC,EAAcE,CAAI,CAC1B,CAKAJ,EAAO,QAAUG,IC9CjB,IAAAE,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAuB,QAAS,uCAAwC,EAAE,YAC1EC,EAAc,QAAS,6BAA8B,EACrDC,EAAQ,QAAS,2BAA4B,EAC7CC,EAAQ,QAAS,0BAA2B,EAC5CC,EAAkB,QAAS,wCAAyC,EACpEC,EAAS,QAAS,uBAAwB,EAsB9C,SAASC,EAAOC,EAAS,CACxB,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAEJ,GAAK,CAACd,EAAsBO,CAAO,EAClC,MAAM,IAAI,UAAWF,EAAQ,+EAAgFE,CAAO,CAAE,EAOvH,GALK,UAAU,OAAS,EACvBG,EAAQ,UAAW,CAAE,EAErBA,EAAQ,UAEJA,IAAU,UACd,OAAOP,EAAOI,CAAO,EAGtB,GADAC,EAASJ,EAAiBM,CAAM,EAC3BF,IAAW,KACf,MAAM,IAAI,UAAWH,EAAQ,gFAAiFK,CAAM,CAAE,EAGvH,OAAAC,EAAOT,EAAOQ,CAAM,EAGpBI,EAAKN,EAASD,EACTG,IAAU,eACdI,GAAM,GAGPF,EAAMX,EAAaa,CAAG,EAGtBL,EAASG,EAAI,WACRF,IAAU,eACRV,EAAsBS,EAAOD,CAAO,IACzCC,GAAU,IAIZI,EAAM,IAAIF,EAAMC,EAAI,OAAQH,EAAQF,CAAO,EAEpCM,CACR,CAKAd,EAAO,QAAUO,ICpGjB,IAAAS,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAQ,QAAS,qBAAsB,EAuB3C,SAASC,EAAOC,EAAS,CACxB,OAAK,UAAU,OAAS,EAChBF,EAAOE,EAAQ,UAAW,CAAE,CAAE,EAE/BF,EAAOE,CAAO,CACtB,CAKAH,EAAO,QAAUE,ICfjB,IAAIE,EAAqB,IACrBC,EAAO,IACPC,EAAW,IAKXC,EACCH,EAAmB,EACvBG,EAAQF,EAERE,EAAQD,EAMT,OAAO,QAAUC",
+ "names": ["require_is_buffer_uint8array", "__commonJSMin", "exports", "module", "allocUnsafe", "isUint8Array", "check", "buf", "require_main", "__commonJSMin", "exports", "module", "isNonNegativeInteger", "allocUnsafe", "ctors", "zeros", "bytesPerElement", "format", "empty", "length", "nbytes", "offset", "dtype", "ctor", "buf", "out", "nb", "require_polyfill", "__commonJSMin", "exports", "module", "zeros", "empty", "length", "isBufferUint8Array", "main", "polyfill", "empty"]
+}
diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts
index d91bc1d..35d6bd3 100644
--- a/docs/types/index.d.ts
+++ b/docs/types/index.d.ts
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-// TypeScript Version: 2.0
+// TypeScript Version: 4.1
///