@ohos-ports/stdlib-process-read-stdin 0.0.0-stage → 0.2.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +177 -0
- package/NOTICE +1 -0
- package/README.md +242 -2
- package/SECURITY.md +5 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +7 -0
- package/docs/types/index.d.ts +108 -0
- package/lib/browser.js +66 -0
- package/lib/index.js +47 -0
- package/lib/main.js +159 -0
- package/node_modules/@stdlib/assert-has-node-buffer-support/LICENSE +177 -0
- package/node_modules/@stdlib/assert-has-node-buffer-support/NOTICE +1 -0
- package/node_modules/@stdlib/assert-has-node-buffer-support/README.md +187 -0
- package/node_modules/@stdlib/assert-has-node-buffer-support/SECURITY.md +5 -0
- package/node_modules/@stdlib/assert-has-node-buffer-support/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/assert-has-node-buffer-support/dist/index.js +7 -0
- package/node_modules/@stdlib/assert-has-node-buffer-support/dist/index.js.map +7 -0
- package/node_modules/@stdlib/assert-has-node-buffer-support/docs/types/index.d.ts +35 -0
- package/node_modules/@stdlib/assert-has-node-buffer-support/lib/buffer.js +28 -0
- package/node_modules/@stdlib/assert-has-node-buffer-support/lib/index.js +40 -0
- package/node_modules/@stdlib/assert-has-node-buffer-support/lib/main.js +68 -0
- package/node_modules/@stdlib/assert-has-node-buffer-support/package.json +76 -0
- package/node_modules/@stdlib/assert-has-own-property/LICENSE +177 -0
- package/node_modules/@stdlib/assert-has-own-property/NOTICE +1 -0
- package/node_modules/@stdlib/assert-has-own-property/README.md +263 -0
- package/node_modules/@stdlib/assert-has-own-property/SECURITY.md +5 -0
- package/node_modules/@stdlib/assert-has-own-property/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/assert-has-own-property/dist/index.js +5 -0
- package/node_modules/@stdlib/assert-has-own-property/dist/index.js.map +7 -0
- package/node_modules/@stdlib/assert-has-own-property/docs/types/index.d.ts +49 -0
- package/node_modules/@stdlib/assert-has-own-property/lib/index.js +47 -0
- package/node_modules/@stdlib/assert-has-own-property/lib/main.js +64 -0
- package/node_modules/@stdlib/assert-has-own-property/package.json +74 -0
- package/node_modules/@stdlib/assert-has-symbol-support/LICENSE +177 -0
- package/node_modules/@stdlib/assert-has-symbol-support/NOTICE +1 -0
- package/node_modules/@stdlib/assert-has-symbol-support/README.md +193 -0
- package/node_modules/@stdlib/assert-has-symbol-support/SECURITY.md +5 -0
- package/node_modules/@stdlib/assert-has-symbol-support/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/assert-has-symbol-support/dist/index.js +5 -0
- package/node_modules/@stdlib/assert-has-symbol-support/dist/index.js.map +7 -0
- package/node_modules/@stdlib/assert-has-symbol-support/docs/types/index.d.ts +35 -0
- package/node_modules/@stdlib/assert-has-symbol-support/lib/index.js +40 -0
- package/node_modules/@stdlib/assert-has-symbol-support/lib/main.js +42 -0
- package/node_modules/@stdlib/assert-has-symbol-support/package.json +73 -0
- package/node_modules/@stdlib/assert-has-tostringtag-support/LICENSE +177 -0
- package/node_modules/@stdlib/assert-has-tostringtag-support/NOTICE +1 -0
- package/node_modules/@stdlib/assert-has-tostringtag-support/README.md +187 -0
- package/node_modules/@stdlib/assert-has-tostringtag-support/SECURITY.md +5 -0
- package/node_modules/@stdlib/assert-has-tostringtag-support/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/assert-has-tostringtag-support/dist/index.js +5 -0
- package/node_modules/@stdlib/assert-has-tostringtag-support/dist/index.js.map +7 -0
- package/node_modules/@stdlib/assert-has-tostringtag-support/docs/types/index.d.ts +35 -0
- package/node_modules/@stdlib/assert-has-tostringtag-support/lib/index.js +40 -0
- package/node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js +49 -0
- package/node_modules/@stdlib/assert-has-tostringtag-support/package.json +79 -0
- package/node_modules/@stdlib/assert-is-array/LICENSE +177 -0
- package/node_modules/@stdlib/assert-is-array/NOTICE +1 -0
- package/node_modules/@stdlib/assert-is-array/README.md +183 -0
- package/node_modules/@stdlib/assert-is-array/SECURITY.md +5 -0
- package/node_modules/@stdlib/assert-is-array/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/assert-is-array/dist/index.js +5 -0
- package/node_modules/@stdlib/assert-is-array/dist/index.js.map +7 -0
- package/node_modules/@stdlib/assert-is-array/docs/types/index.d.ts +40 -0
- package/node_modules/@stdlib/assert-is-array/lib/index.js +43 -0
- package/node_modules/@stdlib/assert-is-array/lib/main.js +63 -0
- package/node_modules/@stdlib/assert-is-array/package.json +72 -0
- package/node_modules/@stdlib/assert-is-boolean/LICENSE +177 -0
- package/node_modules/@stdlib/assert-is-boolean/NOTICE +1 -0
- package/node_modules/@stdlib/assert-is-boolean/README.md +228 -0
- package/node_modules/@stdlib/assert-is-boolean/SECURITY.md +5 -0
- package/node_modules/@stdlib/assert-is-boolean/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/assert-is-boolean/dist/index.js +13 -0
- package/node_modules/@stdlib/assert-is-boolean/dist/index.js.map +7 -0
- package/node_modules/@stdlib/assert-is-boolean/docs/types/index.d.ts +125 -0
- package/node_modules/@stdlib/assert-is-boolean/lib/index.js +73 -0
- package/node_modules/@stdlib/assert-is-boolean/lib/main.js +62 -0
- package/node_modules/@stdlib/assert-is-boolean/lib/object.js +68 -0
- package/node_modules/@stdlib/assert-is-boolean/lib/primitive.js +48 -0
- package/node_modules/@stdlib/assert-is-boolean/lib/tostring.js +27 -0
- package/node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js +47 -0
- package/node_modules/@stdlib/assert-is-boolean/package.json +80 -0
- package/node_modules/@stdlib/assert-is-buffer/LICENSE +177 -0
- package/node_modules/@stdlib/assert-is-buffer/NOTICE +1 -0
- package/node_modules/@stdlib/assert-is-buffer/README.md +223 -0
- package/node_modules/@stdlib/assert-is-buffer/SECURITY.md +5 -0
- package/node_modules/@stdlib/assert-is-buffer/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/assert-is-buffer/dist/index.js +5 -0
- package/node_modules/@stdlib/assert-is-buffer/dist/index.js.map +7 -0
- package/node_modules/@stdlib/assert-is-buffer/docs/types/index.d.ts +50 -0
- package/node_modules/@stdlib/assert-is-buffer/lib/index.js +43 -0
- package/node_modules/@stdlib/assert-is-buffer/lib/main.js +70 -0
- package/node_modules/@stdlib/assert-is-buffer/package.json +73 -0
- package/node_modules/@stdlib/assert-is-function/LICENSE +177 -0
- package/node_modules/@stdlib/assert-is-function/NOTICE +1 -0
- package/node_modules/@stdlib/assert-is-function/README.md +192 -0
- package/node_modules/@stdlib/assert-is-function/SECURITY.md +5 -0
- package/node_modules/@stdlib/assert-is-function/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/assert-is-function/dist/index.js +5 -0
- package/node_modules/@stdlib/assert-is-function/dist/index.js.map +7 -0
- package/node_modules/@stdlib/assert-is-function/docs/types/index.d.ts +40 -0
- package/node_modules/@stdlib/assert-is-function/lib/index.js +44 -0
- package/node_modules/@stdlib/assert-is-function/lib/main.js +50 -0
- package/node_modules/@stdlib/assert-is-function/package.json +74 -0
- package/node_modules/@stdlib/assert-is-object-like/LICENSE +177 -0
- package/node_modules/@stdlib/assert-is-object-like/NOTICE +1 -0
- package/node_modules/@stdlib/assert-is-object-like/README.md +264 -0
- package/node_modules/@stdlib/assert-is-object-like/SECURITY.md +5 -0
- package/node_modules/@stdlib/assert-is-object-like/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/assert-is-object-like/dist/index.js +5 -0
- package/node_modules/@stdlib/assert-is-object-like/dist/index.js.map +7 -0
- package/node_modules/@stdlib/assert-is-object-like/docs/types/index.d.ts +48 -0
- package/node_modules/@stdlib/assert-is-object-like/lib/index.js +67 -0
- package/node_modules/@stdlib/assert-is-object-like/lib/main.js +49 -0
- package/node_modules/@stdlib/assert-is-object-like/package.json +79 -0
- package/node_modules/@stdlib/assert-is-string/LICENSE +177 -0
- package/node_modules/@stdlib/assert-is-string/NOTICE +1 -0
- package/node_modules/@stdlib/assert-is-string/README.md +224 -0
- package/node_modules/@stdlib/assert-is-string/SECURITY.md +5 -0
- package/node_modules/@stdlib/assert-is-string/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/assert-is-string/dist/index.js +13 -0
- package/node_modules/@stdlib/assert-is-string/dist/index.js.map +7 -0
- package/node_modules/@stdlib/assert-is-string/docs/types/index.d.ts +101 -0
- package/node_modules/@stdlib/assert-is-string/lib/index.js +73 -0
- package/node_modules/@stdlib/assert-is-string/lib/main.js +50 -0
- package/node_modules/@stdlib/assert-is-string/lib/object.js +65 -0
- package/node_modules/@stdlib/assert-is-string/lib/primitive.js +42 -0
- package/node_modules/@stdlib/assert-is-string/lib/try2valueof.js +47 -0
- package/node_modules/@stdlib/assert-is-string/lib/valueof.js +27 -0
- package/node_modules/@stdlib/assert-is-string/package.json +80 -0
- package/node_modules/@stdlib/assert-tools-array-function/LICENSE +177 -0
- package/node_modules/@stdlib/assert-tools-array-function/NOTICE +1 -0
- package/node_modules/@stdlib/assert-tools-array-function/README.md +216 -0
- package/node_modules/@stdlib/assert-tools-array-function/SECURITY.md +5 -0
- package/node_modules/@stdlib/assert-tools-array-function/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/assert-tools-array-function/dist/index.js +5 -0
- package/node_modules/@stdlib/assert-tools-array-function/dist/index.js.map +7 -0
- package/node_modules/@stdlib/assert-tools-array-function/docs/types/index.d.ts +61 -0
- package/node_modules/@stdlib/assert-tools-array-function/lib/index.js +49 -0
- package/node_modules/@stdlib/assert-tools-array-function/lib/main.js +85 -0
- package/node_modules/@stdlib/assert-tools-array-function/package.json +73 -0
- package/node_modules/@stdlib/boolean-ctor/LICENSE +177 -0
- package/node_modules/@stdlib/boolean-ctor/NOTICE +1 -0
- package/node_modules/@stdlib/boolean-ctor/README.md +264 -0
- package/node_modules/@stdlib/boolean-ctor/SECURITY.md +5 -0
- package/node_modules/@stdlib/boolean-ctor/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/boolean-ctor/dist/index.js +5 -0
- package/node_modules/@stdlib/boolean-ctor/dist/index.js.map +7 -0
- package/node_modules/@stdlib/boolean-ctor/docs/types/index.d.ts +52 -0
- package/node_modules/@stdlib/boolean-ctor/lib/index.js +52 -0
- package/node_modules/@stdlib/boolean-ctor/lib/main.js +51 -0
- package/node_modules/@stdlib/boolean-ctor/package.json +61 -0
- package/node_modules/@stdlib/buffer-ctor/LICENSE +177 -0
- package/node_modules/@stdlib/buffer-ctor/NOTICE +1 -0
- package/node_modules/@stdlib/buffer-ctor/README.md +273 -0
- package/node_modules/@stdlib/buffer-ctor/SECURITY.md +5 -0
- package/node_modules/@stdlib/buffer-ctor/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/buffer-ctor/dist/index.js +19 -0
- package/node_modules/@stdlib/buffer-ctor/dist/index.js.map +7 -0
- package/node_modules/@stdlib/buffer-ctor/docs/types/index.d.ts +37 -0
- package/node_modules/@stdlib/buffer-ctor/lib/index.js +52 -0
- package/node_modules/@stdlib/buffer-ctor/lib/main.js +28 -0
- package/node_modules/@stdlib/buffer-ctor/lib/polyfill.js +37 -0
- package/node_modules/@stdlib/buffer-ctor/package.json +66 -0
- package/node_modules/@stdlib/buffer-from-string/LICENSE +177 -0
- package/node_modules/@stdlib/buffer-from-string/NOTICE +1 -0
- package/node_modules/@stdlib/buffer-from-string/README.md +249 -0
- package/node_modules/@stdlib/buffer-from-string/SECURITY.md +5 -0
- package/node_modules/@stdlib/buffer-from-string/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/buffer-from-string/dist/index.js +19 -0
- package/node_modules/@stdlib/buffer-from-string/dist/index.js.map +7 -0
- package/node_modules/@stdlib/buffer-from-string/docs/types/index.d.ts +42 -0
- package/node_modules/@stdlib/buffer-from-string/lib/has_from.js +34 -0
- package/node_modules/@stdlib/buffer-from-string/lib/index.js +52 -0
- package/node_modules/@stdlib/buffer-from-string/lib/main.js +60 -0
- package/node_modules/@stdlib/buffer-from-string/lib/polyfill.js +60 -0
- package/node_modules/@stdlib/buffer-from-string/package.json +74 -0
- package/node_modules/@stdlib/error-tools-fmtprodmsg/LICENSE +177 -0
- package/node_modules/@stdlib/error-tools-fmtprodmsg/NOTICE +1 -0
- package/node_modules/@stdlib/error-tools-fmtprodmsg/README.md +182 -0
- package/node_modules/@stdlib/error-tools-fmtprodmsg/SECURITY.md +5 -0
- package/node_modules/@stdlib/error-tools-fmtprodmsg/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/error-tools-fmtprodmsg/dist/index.js +5 -0
- package/node_modules/@stdlib/error-tools-fmtprodmsg/dist/index.js.map +7 -0
- package/node_modules/@stdlib/error-tools-fmtprodmsg/docs/types/index.d.ts +39 -0
- package/node_modules/@stdlib/error-tools-fmtprodmsg/lib/index.js +40 -0
- package/node_modules/@stdlib/error-tools-fmtprodmsg/lib/main.js +48 -0
- package/node_modules/@stdlib/error-tools-fmtprodmsg/package.json +71 -0
- package/node_modules/@stdlib/regexp-function-name/LICENSE +177 -0
- package/node_modules/@stdlib/regexp-function-name/NOTICE +1 -0
- package/node_modules/@stdlib/regexp-function-name/README.md +215 -0
- package/node_modules/@stdlib/regexp-function-name/SECURITY.md +5 -0
- package/node_modules/@stdlib/regexp-function-name/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/regexp-function-name/dist/index.js +8 -0
- package/node_modules/@stdlib/regexp-function-name/dist/index.js.map +7 -0
- package/node_modules/@stdlib/regexp-function-name/docs/types/index.d.ts +74 -0
- package/node_modules/@stdlib/regexp-function-name/lib/index.js +61 -0
- package/node_modules/@stdlib/regexp-function-name/lib/main.js +54 -0
- package/node_modules/@stdlib/regexp-function-name/lib/regexp.js +60 -0
- package/node_modules/@stdlib/regexp-function-name/package.json +68 -0
- package/node_modules/@stdlib/streams-node-stdin/LICENSE +177 -0
- package/node_modules/@stdlib/streams-node-stdin/NOTICE +1 -0
- package/node_modules/@stdlib/streams-node-stdin/README.md +227 -0
- package/node_modules/@stdlib/streams-node-stdin/SECURITY.md +5 -0
- package/node_modules/@stdlib/streams-node-stdin/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/streams-node-stdin/dist/index.js +5 -0
- package/node_modules/@stdlib/streams-node-stdin/dist/index.js.map +7 -0
- package/node_modules/@stdlib/streams-node-stdin/docs/types/index.d.ts +31 -0
- package/node_modules/@stdlib/streams-node-stdin/lib/index.js +41 -0
- package/node_modules/@stdlib/streams-node-stdin/lib/main.js +28 -0
- package/node_modules/@stdlib/streams-node-stdin/package.json +65 -0
- package/node_modules/@stdlib/string-base-format-interpolate/LICENSE +177 -0
- package/node_modules/@stdlib/string-base-format-interpolate/NOTICE +1 -0
- package/node_modules/@stdlib/string-base-format-interpolate/README.md +219 -0
- package/node_modules/@stdlib/string-base-format-interpolate/SECURITY.md +5 -0
- package/node_modules/@stdlib/string-base-format-interpolate/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/string-base-format-interpolate/dist/index.js +17 -0
- package/node_modules/@stdlib/string-base-format-interpolate/dist/index.js.map +7 -0
- package/node_modules/@stdlib/string-base-format-interpolate/docs/types/index.d.ts +71 -0
- package/node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js +103 -0
- package/node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js +115 -0
- package/node_modules/@stdlib/string-base-format-interpolate/lib/index.js +41 -0
- package/node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js +46 -0
- package/node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js +42 -0
- package/node_modules/@stdlib/string-base-format-interpolate/lib/main.js +243 -0
- package/node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js +65 -0
- package/node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js +84 -0
- package/node_modules/@stdlib/string-base-format-interpolate/package.json +72 -0
- package/node_modules/@stdlib/string-base-format-tokenize/LICENSE +177 -0
- package/node_modules/@stdlib/string-base-format-tokenize/NOTICE +1 -0
- package/node_modules/@stdlib/string-base-format-tokenize/README.md +203 -0
- package/node_modules/@stdlib/string-base-format-tokenize/SECURITY.md +5 -0
- package/node_modules/@stdlib/string-base-format-tokenize/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/string-base-format-tokenize/dist/index.js +5 -0
- package/node_modules/@stdlib/string-base-format-tokenize/dist/index.js.map +7 -0
- package/node_modules/@stdlib/string-base-format-tokenize/docs/types/index.d.ts +68 -0
- package/node_modules/@stdlib/string-base-format-tokenize/lib/index.js +41 -0
- package/node_modules/@stdlib/string-base-format-tokenize/lib/main.js +95 -0
- package/node_modules/@stdlib/string-base-format-tokenize/package.json +70 -0
- package/node_modules/@stdlib/string-format/LICENSE +177 -0
- package/node_modules/@stdlib/string-format/NOTICE +1 -0
- package/node_modules/@stdlib/string-format/README.md +341 -0
- package/node_modules/@stdlib/string-format/SECURITY.md +5 -0
- package/node_modules/@stdlib/string-format/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/string-format/dist/index.js +7 -0
- package/node_modules/@stdlib/string-format/dist/index.js.map +7 -0
- package/node_modules/@stdlib/string-format/docs/types/index.d.ts +42 -0
- package/node_modules/@stdlib/string-format/lib/index.js +43 -0
- package/node_modules/@stdlib/string-format/lib/is_string.js +42 -0
- package/node_modules/@stdlib/string-format/lib/main.js +64 -0
- package/node_modules/@stdlib/string-format/package.json +73 -0
- package/node_modules/@stdlib/symbol-ctor/LICENSE +177 -0
- package/node_modules/@stdlib/symbol-ctor/NOTICE +1 -0
- package/node_modules/@stdlib/symbol-ctor/README.md +234 -0
- package/node_modules/@stdlib/symbol-ctor/SECURITY.md +5 -0
- package/node_modules/@stdlib/symbol-ctor/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/symbol-ctor/dist/index.js +5 -0
- package/node_modules/@stdlib/symbol-ctor/dist/index.js.map +7 -0
- package/node_modules/@stdlib/symbol-ctor/docs/types/index.d.ts +34 -0
- package/node_modules/@stdlib/symbol-ctor/lib/index.js +40 -0
- package/node_modules/@stdlib/symbol-ctor/lib/main.js +28 -0
- package/node_modules/@stdlib/symbol-ctor/package.json +63 -0
- package/node_modules/@stdlib/types/LICENSE +177 -0
- package/node_modules/@stdlib/types/NOTICE +1 -0
- package/node_modules/@stdlib/types/README.md +212 -0
- package/node_modules/@stdlib/types/SECURITY.md +5 -0
- package/node_modules/@stdlib/types/index.d.ts +3923 -0
- package/node_modules/@stdlib/types/lib/browser.js +28 -0
- package/node_modules/@stdlib/types/lib/index.js +39 -0
- package/node_modules/@stdlib/types/lib/main.js +40 -0
- package/node_modules/@stdlib/types/package.json +68 -0
- package/node_modules/@stdlib/types/test.ts +734 -0
- package/node_modules/@stdlib/utils-constructor-name/LICENSE +177 -0
- package/node_modules/@stdlib/utils-constructor-name/NOTICE +1 -0
- package/node_modules/@stdlib/utils-constructor-name/README.md +400 -0
- package/node_modules/@stdlib/utils-constructor-name/SECURITY.md +5 -0
- package/node_modules/@stdlib/utils-constructor-name/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/utils-constructor-name/dist/index.js +5 -0
- package/node_modules/@stdlib/utils-constructor-name/dist/index.js.map +7 -0
- package/node_modules/@stdlib/utils-constructor-name/docs/types/index.d.ts +52 -0
- package/node_modules/@stdlib/utils-constructor-name/lib/index.js +46 -0
- package/node_modules/@stdlib/utils-constructor-name/lib/main.js +80 -0
- package/node_modules/@stdlib/utils-constructor-name/package.json +77 -0
- package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/LICENSE +177 -0
- package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/NOTICE +1 -0
- package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/README.md +216 -0
- package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/SECURITY.md +5 -0
- package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/dist/index.js +31 -0
- package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/dist/index.js.map +7 -0
- package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/dist/main.js +58 -0
- package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/docs/types/index.d.ts +52 -0
- package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/index.js +47 -0
- package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js +58 -0
- package/node_modules/@stdlib/utils-define-nonenumerable-read-only-property/package.json +93 -0
- package/node_modules/@stdlib/utils-define-property/LICENSE +177 -0
- package/node_modules/@stdlib/utils-define-property/NOTICE +1 -0
- package/node_modules/@stdlib/utils-define-property/README.md +228 -0
- package/node_modules/@stdlib/utils-define-property/SECURITY.md +5 -0
- package/node_modules/@stdlib/utils-define-property/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/utils-define-property/dist/index.js +36 -0
- package/node_modules/@stdlib/utils-define-property/dist/index.js.map +7 -0
- package/node_modules/@stdlib/utils-define-property/docs/types/index.d.ts +52 -0
- package/node_modules/@stdlib/utils-define-property/lib/builtin.js +61 -0
- package/node_modules/@stdlib/utils-define-property/lib/define_property.js +28 -0
- package/node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js +51 -0
- package/node_modules/@stdlib/utils-define-property/lib/index.js +58 -0
- package/node_modules/@stdlib/utils-define-property/lib/polyfill.js +122 -0
- package/node_modules/@stdlib/utils-define-property/package.json +75 -0
- package/node_modules/@stdlib/utils-global/LICENSE +177 -0
- package/node_modules/@stdlib/utils-global/NOTICE +1 -0
- package/node_modules/@stdlib/utils-global/README.md +208 -0
- package/node_modules/@stdlib/utils-global/SECURITY.md +5 -0
- package/node_modules/@stdlib/utils-global/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/utils-global/dist/index.js +36 -0
- package/node_modules/@stdlib/utils-global/dist/index.js.map +7 -0
- package/node_modules/@stdlib/utils-global/docs/types/index.d.ts +40 -0
- package/node_modules/@stdlib/utils-global/lib/browser.js +79 -0
- package/node_modules/@stdlib/utils-global/lib/codegen.js +36 -0
- package/node_modules/@stdlib/utils-global/lib/global.js +28 -0
- package/node_modules/@stdlib/utils-global/lib/global_this.js +28 -0
- package/node_modules/@stdlib/utils-global/lib/index.js +40 -0
- package/node_modules/@stdlib/utils-global/lib/main.js +83 -0
- package/node_modules/@stdlib/utils-global/lib/self.js +28 -0
- package/node_modules/@stdlib/utils-global/lib/window.js +28 -0
- package/node_modules/@stdlib/utils-global/package.json +74 -0
- package/node_modules/@stdlib/utils-native-class/LICENSE +177 -0
- package/node_modules/@stdlib/utils-native-class/NOTICE +1 -0
- package/node_modules/@stdlib/utils-native-class/README.md +349 -0
- package/node_modules/@stdlib/utils-native-class/SECURITY.md +5 -0
- package/node_modules/@stdlib/utils-native-class/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/utils-native-class/dist/index.js +11 -0
- package/node_modules/@stdlib/utils-native-class/dist/index.js.map +7 -0
- package/node_modules/@stdlib/utils-native-class/docs/types/index.d.ts +51 -0
- package/node_modules/@stdlib/utils-native-class/lib/index.js +61 -0
- package/node_modules/@stdlib/utils-native-class/lib/main.js +56 -0
- package/node_modules/@stdlib/utils-native-class/lib/polyfill.js +81 -0
- package/node_modules/@stdlib/utils-native-class/lib/tostring.js +28 -0
- package/node_modules/@stdlib/utils-native-class/lib/tostringtag.js +33 -0
- package/node_modules/@stdlib/utils-native-class/package.json +84 -0
- package/node_modules/@stdlib/utils-next-tick/LICENSE +177 -0
- package/node_modules/@stdlib/utils-next-tick/NOTICE +1 -0
- package/node_modules/@stdlib/utils-next-tick/README.md +183 -0
- package/node_modules/@stdlib/utils-next-tick/SECURITY.md +5 -0
- package/node_modules/@stdlib/utils-next-tick/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/utils-next-tick/dist/index.js +5 -0
- package/node_modules/@stdlib/utils-next-tick/dist/index.js.map +7 -0
- package/node_modules/@stdlib/utils-next-tick/docs/types/index.d.ts +43 -0
- package/node_modules/@stdlib/utils-next-tick/lib/index.js +43 -0
- package/node_modules/@stdlib/utils-next-tick/lib/main.js +72 -0
- package/node_modules/@stdlib/utils-next-tick/package.json +77 -0
- package/node_modules/@stdlib/utils-type-of/LICENSE +177 -0
- package/node_modules/@stdlib/utils-type-of/NOTICE +1 -0
- package/node_modules/@stdlib/utils-type-of/README.md +366 -0
- package/node_modules/@stdlib/utils-type-of/SECURITY.md +5 -0
- package/node_modules/@stdlib/utils-type-of/dist/index.d.ts +3 -0
- package/node_modules/@stdlib/utils-type-of/dist/index.js +15 -0
- package/node_modules/@stdlib/utils-type-of/dist/index.js.map +7 -0
- package/node_modules/@stdlib/utils-type-of/docs/types/index.d.ts +50 -0
- package/node_modules/@stdlib/utils-type-of/lib/check.js +55 -0
- package/node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js +34 -0
- package/node_modules/@stdlib/utils-type-of/lib/fixtures/re.js +26 -0
- package/node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js +26 -0
- package/node_modules/@stdlib/utils-type-of/lib/index.js +50 -0
- package/node_modules/@stdlib/utils-type-of/lib/main.js +76 -0
- package/node_modules/@stdlib/utils-type-of/lib/polyfill.js +41 -0
- package/node_modules/@stdlib/utils-type-of/package.json +72 -0
- package/package.json +108 -3
|
@@ -0,0 +1,734 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @license Apache-2.0
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2019 The Stdlib Authors.
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/// <reference types="@stdlib/types"/>
|
|
20
|
+
|
|
21
|
+
import * as array from '@stdlib/types/array';
|
|
22
|
+
import * as blas from '@stdlib/types/blas';
|
|
23
|
+
import * as complex from '@stdlib/types/complex';
|
|
24
|
+
import * as iter from '@stdlib/types/iter';
|
|
25
|
+
import * as ndarray from '@stdlib/types/ndarray';
|
|
26
|
+
import * as obj from '@stdlib/types/object';
|
|
27
|
+
import * as random from '@stdlib/types/random';
|
|
28
|
+
import * as slice from '@stdlib/types/slice';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Returns an iterator protocol-compliant object.
|
|
32
|
+
*
|
|
33
|
+
* @returns iterator protocol-compliant object
|
|
34
|
+
*/
|
|
35
|
+
function createIterator1(): iter.Iterator {
|
|
36
|
+
return {
|
|
37
|
+
'next': next1
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Implements the iterator protocol `next` method.
|
|
43
|
+
*
|
|
44
|
+
* @returns iterator protocol-compliant object
|
|
45
|
+
*/
|
|
46
|
+
function next1(): iter.IteratorResult {
|
|
47
|
+
return {
|
|
48
|
+
'value': true,
|
|
49
|
+
'done': false
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Returns an iterator protocol-compliant object.
|
|
55
|
+
*
|
|
56
|
+
* @returns iterator protocol-compliant object
|
|
57
|
+
*/
|
|
58
|
+
function createIterator2(): iter.Iterator {
|
|
59
|
+
return {
|
|
60
|
+
'next': next2
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Implements the iterator protocol `next` method.
|
|
66
|
+
*
|
|
67
|
+
* @returns iterator protocol-compliant object
|
|
68
|
+
*/
|
|
69
|
+
function next2(): iter.IteratorResult {
|
|
70
|
+
return {
|
|
71
|
+
'done': true
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Returns an iterable iterator protocol-compliant object.
|
|
77
|
+
*
|
|
78
|
+
* @returns iterable iterator protocol-compliant object
|
|
79
|
+
*/
|
|
80
|
+
function createIterableIterator(): iter.IterableIterator {
|
|
81
|
+
return {
|
|
82
|
+
'next': next3,
|
|
83
|
+
[ Symbol.iterator ]: factory
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Implements the iterator protocol `next` method.
|
|
89
|
+
*
|
|
90
|
+
* @returns iterator protocol-compliant object
|
|
91
|
+
*/
|
|
92
|
+
function next3(): iter.IteratorResult {
|
|
93
|
+
return {
|
|
94
|
+
'done': true
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Returns an iterable iterator protocol-compliant object.
|
|
100
|
+
*
|
|
101
|
+
* @returns iterable iterator protocol-compliant object
|
|
102
|
+
*/
|
|
103
|
+
function factory(): iter.IterableIterator {
|
|
104
|
+
return createIterableIterator();
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Returns a boolean array-like object.
|
|
109
|
+
*
|
|
110
|
+
* @returns boolean array-like object
|
|
111
|
+
*/
|
|
112
|
+
function boolArray(): array.BooleanArrayLike {
|
|
113
|
+
const buf: array.TypedArray = new Uint8Array( 8 );
|
|
114
|
+
const obj: array.BooleanArrayLike = {
|
|
115
|
+
'byteLength': 8,
|
|
116
|
+
'byteOffset': 0,
|
|
117
|
+
'BYTES_PER_ELEMENT': 1,
|
|
118
|
+
'length': 8,
|
|
119
|
+
'get': ( i: number ): boolean => {
|
|
120
|
+
return Boolean( buf[ i ] );
|
|
121
|
+
},
|
|
122
|
+
'set': ( value: boolean, i?: number ) => {
|
|
123
|
+
i = ( i ) ? i : 0;
|
|
124
|
+
buf[ i ] = ( buf[ i ] ) ? 1 : 0;
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
return obj;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Returns a complex number array-like object.
|
|
132
|
+
*
|
|
133
|
+
* @returns complex number array-like object
|
|
134
|
+
*/
|
|
135
|
+
function cmplxArray(): array.ComplexArrayLike {
|
|
136
|
+
const buf: array.TypedArray = new Float64Array( 8 );
|
|
137
|
+
const obj: array.ComplexArrayLike = {
|
|
138
|
+
'byteLength': 64,
|
|
139
|
+
'byteOffset': 0,
|
|
140
|
+
'BYTES_PER_ELEMENT': 8,
|
|
141
|
+
'length': 8,
|
|
142
|
+
'get': ( i: number ): complex.ComplexLike => {
|
|
143
|
+
return {
|
|
144
|
+
're': i * 10,
|
|
145
|
+
'im': i * 10
|
|
146
|
+
};
|
|
147
|
+
},
|
|
148
|
+
'set': ( value: complex.ComplexLike, i?: number ) => {
|
|
149
|
+
i = ( i ) ? i : 0;
|
|
150
|
+
buf[ i ] = value.re;
|
|
151
|
+
buf[ i + 1 ] = value.im;
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
return obj;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Returns a 64-bit complex number array.
|
|
159
|
+
*
|
|
160
|
+
* @returns 64-bit complex number array
|
|
161
|
+
*/
|
|
162
|
+
function cmplx64Array(): array.Complex64Array {
|
|
163
|
+
const buf: array.TypedArray = new Float64Array( 8 );
|
|
164
|
+
const obj: array.Complex64Array = {
|
|
165
|
+
'byteLength': 64,
|
|
166
|
+
'byteOffset': 0,
|
|
167
|
+
'BYTES_PER_ELEMENT': 8,
|
|
168
|
+
'length': 8,
|
|
169
|
+
'get': ( i: number ): complex.Complex64 => {
|
|
170
|
+
return {
|
|
171
|
+
're': i * 10,
|
|
172
|
+
'im': i * 10,
|
|
173
|
+
'byteLength': 8,
|
|
174
|
+
'BYTES_PER_ELEMENT': 4
|
|
175
|
+
};
|
|
176
|
+
},
|
|
177
|
+
'set': ( value: complex.Complex64, i?: number ) => {
|
|
178
|
+
i = ( i ) ? i : 0;
|
|
179
|
+
buf[ i ] = value.re;
|
|
180
|
+
buf[ i + 1 ] = value.im;
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
return obj;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Returns a 128-bit complex number array.
|
|
188
|
+
*
|
|
189
|
+
* @returns 128-bit complex number array
|
|
190
|
+
*/
|
|
191
|
+
function cmplx128Array(): array.Complex128Array {
|
|
192
|
+
const buf: array.TypedArray = new Float64Array( 16 );
|
|
193
|
+
const obj: array.Complex128Array = {
|
|
194
|
+
'byteLength': 128,
|
|
195
|
+
'byteOffset': 0,
|
|
196
|
+
'BYTES_PER_ELEMENT': 16,
|
|
197
|
+
'length': 8,
|
|
198
|
+
'get': ( i: number ): complex.Complex128 => {
|
|
199
|
+
return {
|
|
200
|
+
're': i * 10,
|
|
201
|
+
'im': i * 10,
|
|
202
|
+
'byteLength': 16,
|
|
203
|
+
'BYTES_PER_ELEMENT': 8
|
|
204
|
+
};
|
|
205
|
+
},
|
|
206
|
+
'set': ( value: complex.Complex128, i?: number ) => {
|
|
207
|
+
i = ( i ) ? i : 0;
|
|
208
|
+
buf[ i ] = value.re;
|
|
209
|
+
buf[ i + 1 ] = value.im;
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
return obj;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
// TESTS //
|
|
217
|
+
|
|
218
|
+
// The compiler should not throw an error when using array type aliases...
|
|
219
|
+
{
|
|
220
|
+
const v1: array.TypedArray = new Float64Array( 10 );
|
|
221
|
+
if ( v1[ 0 ] !== 0.0 ) {
|
|
222
|
+
throw new Error( 'something went wrong' );
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
const v2: array.IntegerTypedArray = new Int32Array( 10 );
|
|
226
|
+
if ( v2[ 0 ] !== 0 ) {
|
|
227
|
+
throw new Error( 'something went wrong' );
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
const v3: array.NumericArray = new Float64Array( 10 );
|
|
231
|
+
if ( v3[ 0 ] !== 0.0 ) {
|
|
232
|
+
throw new Error( 'something went wrong' );
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
const v4: array.ArrayLike<string> = 'beep';
|
|
236
|
+
if ( v4[ 0 ] !== 'b' ) {
|
|
237
|
+
throw new Error( 'something went wrong' );
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
const v5: array.ArrayLike<number> = [ 1, 2, 3 ];
|
|
241
|
+
if ( v5[ 0 ] !== 1 ) {
|
|
242
|
+
throw new Error( 'something went wrong' );
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
const v6: array.ArrayLike<number> = new Int8Array( 10 );
|
|
246
|
+
if ( v6[ 0 ] !== 1 ) {
|
|
247
|
+
throw new Error( 'something went wrong' );
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
const v7: array.ComplexArrayLike = cmplxArray();
|
|
251
|
+
if ( v7.byteOffset !== 0 ) {
|
|
252
|
+
throw new Error( 'something went wrong' );
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
const v8: array.Complex64Array = cmplx64Array();
|
|
256
|
+
if ( v8.byteOffset !== 0 ) {
|
|
257
|
+
throw new Error( 'something went wrong' );
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
const v9: array.Complex128Array = cmplx128Array();
|
|
261
|
+
if ( v9.byteOffset !== 0 ) {
|
|
262
|
+
throw new Error( 'something went wrong' );
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
const v10: array.ComplexTypedArray = cmplx64Array();
|
|
266
|
+
if ( v10.byteOffset !== 0 ) {
|
|
267
|
+
throw new Error( 'something went wrong' );
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
const v11: array.ArrayOrTypedArray = new Float64Array( 10 );
|
|
271
|
+
if ( v11[ 0 ] !== 0.0 ) {
|
|
272
|
+
throw new Error( 'something went wrong' );
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
const v12: array.FloatTypedArray = new Float64Array( 10 );
|
|
276
|
+
if ( v12[ 0 ] !== 0.0 ) {
|
|
277
|
+
throw new Error( 'something went wrong' );
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
const v13: array.RealOrComplexArray = new Float64Array( 10 );
|
|
281
|
+
if ( v13[ 0 ] !== 0.0 ) {
|
|
282
|
+
throw new Error( 'something went wrong' );
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
const v14: array.RealOrComplexTypedArray = new Float64Array( 10 );
|
|
286
|
+
if ( v14[ 0 ] !== 0.0 ) {
|
|
287
|
+
throw new Error( 'something went wrong' );
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
const v15buf: array.ArrayLike<number> = new Float64Array( 10 );
|
|
291
|
+
const v15: array.AccessorArrayLike<number> = {
|
|
292
|
+
'length': 10,
|
|
293
|
+
'data': v15buf,
|
|
294
|
+
'get': ( i: number ): number => v15buf[ i ],
|
|
295
|
+
'set': ( value: number, i?: number ): void => {
|
|
296
|
+
v15buf[ i || 0 ] = value;
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
if ( v15.length !== 10 ) {
|
|
301
|
+
throw new Error( 'something went wrong' );
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
const v16: array.IntegerTypedArray = new Int32Array( 10 );
|
|
305
|
+
if ( v16[ 0 ] !== 0 ) {
|
|
306
|
+
throw new Error( 'something went wrong' );
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
const v17: array.SignedIntegerTypedArray = new Int32Array( 10 );
|
|
310
|
+
if ( v17[ 0 ] !== 0 ) {
|
|
311
|
+
throw new Error( 'something went wrong' );
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
const v18: array.UnsignedIntegerTypedArray = new Uint32Array( 10 );
|
|
315
|
+
if ( v18[ 0 ] !== 0 ) {
|
|
316
|
+
throw new Error( 'something went wrong' );
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
const v19: array.AnyArray = new Uint32Array( 10 );
|
|
320
|
+
if ( v19[ 0 ] !== 0 ) {
|
|
321
|
+
throw new Error( 'something went wrong' );
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
const v20: array.RealTypedArray = new Uint32Array( 10 );
|
|
325
|
+
if ( v20[ 0 ] !== 0 ) {
|
|
326
|
+
throw new Error( 'something went wrong' );
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
const v21: array.FloatOrComplexTypedArray = new Float64Array( 10 );
|
|
330
|
+
if ( v21[ 0 ] !== 0.0 ) {
|
|
331
|
+
throw new Error( 'something went wrong' );
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
const v22: array.Array1D<number> = [ 1, 2, 3 ];
|
|
335
|
+
if ( v22.length === 0 ) {
|
|
336
|
+
throw new Error( 'something went wrong' );
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
const v23: array.Array2D<number> = [ [ 1, 2, 3 ] ];
|
|
340
|
+
if ( v23.length === 0 ) {
|
|
341
|
+
throw new Error( 'something went wrong' );
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
const v24: array.Array3D<number> = [ [ [ 1, 2, 3 ] ] ];
|
|
345
|
+
if ( v24.length === 0 ) {
|
|
346
|
+
throw new Error( 'something went wrong' );
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
const v25: array.Array4D<number> = [ [ [ [ 1, 2, 3 ] ] ] ];
|
|
350
|
+
if ( v25.length === 0 ) {
|
|
351
|
+
throw new Error( 'something went wrong' );
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
const v26: array.Array5D<number> = [ [ [ [ [ 1, 2, 3 ] ] ] ] ];
|
|
355
|
+
if ( v26.length === 0 ) {
|
|
356
|
+
throw new Error( 'something went wrong' );
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
const v27: array.Array6D<number> = [ [ [ [ [ [ 1, 2, 3 ] ] ] ] ] ];
|
|
360
|
+
if ( v27.length === 0 ) {
|
|
361
|
+
throw new Error( 'something went wrong' );
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
const v28: array.Array7D<number> = [ [ [ [ [ [ [ 1, 2, 3 ] ] ] ] ] ] ];
|
|
365
|
+
if ( v28.length === 0 ) {
|
|
366
|
+
throw new Error( 'something went wrong' );
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
const v29: array.Array8D<number> = [ [ [ [ [ [ [ [ 1, 2, 3 ] ] ] ] ] ] ] ];
|
|
370
|
+
if ( v29.length === 0 ) {
|
|
371
|
+
throw new Error( 'something went wrong' );
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
const v30: array.Array9D<number> = [ [ [ [ [ [ [ [ [ 1, 2, 3 ] ] ] ] ] ] ] ] ];
|
|
375
|
+
if ( v30.length === 0 ) {
|
|
376
|
+
throw new Error( 'something went wrong' );
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
const v31: array.Array10D<number> = [ [ [ [ [ [ [ [ [ [ 1, 2, 3 ] ] ] ] ] ] ] ] ] ];
|
|
380
|
+
if ( v31.length === 0 ) {
|
|
381
|
+
throw new Error( 'something went wrong' );
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
const v32: array.Collection<number> = [ 1, 2, 3 ];
|
|
385
|
+
if ( v32.length !== 3 ) {
|
|
386
|
+
throw new Error( 'something went wrong' );
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
const v33: array.BooleanArrayLike = boolArray();
|
|
390
|
+
if ( v33.byteOffset !== 0 ) {
|
|
391
|
+
throw new Error( 'something went wrong' );
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// The compiler should not throw an error when using BLAS types...
|
|
396
|
+
{
|
|
397
|
+
const v1: blas.Layout = 'row-major';
|
|
398
|
+
if ( typeof v1 !== 'string' ) {
|
|
399
|
+
throw new Error( 'something went wrong' );
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
const v2: blas.TransposeOperation = 'transpose';
|
|
403
|
+
if ( typeof v2 !== 'string' ) {
|
|
404
|
+
throw new Error( 'something went wrong' );
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
const v3: blas.MatrixTriangle = 'upper';
|
|
408
|
+
if ( typeof v3 !== 'string' ) {
|
|
409
|
+
throw new Error( 'something went wrong' );
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
const v4: blas.DiagonalType = 'unit';
|
|
413
|
+
if ( typeof v4 !== 'string' ) {
|
|
414
|
+
throw new Error( 'something went wrong' );
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
const v5: blas.OperationSide = 'right';
|
|
418
|
+
if ( typeof v5 !== 'string' ) {
|
|
419
|
+
throw new Error( 'something went wrong' );
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
// The compiler should not throw an error when using complex number types...
|
|
424
|
+
{
|
|
425
|
+
const v1: complex.ComplexLike = {
|
|
426
|
+
're': 1.0,
|
|
427
|
+
'im': 1.0
|
|
428
|
+
};
|
|
429
|
+
if ( v1.re !== 1.0 ) {
|
|
430
|
+
throw new Error( 'something went wrong' );
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
const v2: complex.Complex64 = {
|
|
434
|
+
're': 1.0,
|
|
435
|
+
'im': 1.0,
|
|
436
|
+
'byteLength': 8,
|
|
437
|
+
'BYTES_PER_ELEMENT': 4
|
|
438
|
+
};
|
|
439
|
+
if ( v2.re !== 1.0 ) {
|
|
440
|
+
throw new Error( 'something went wrong' );
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
const v3: complex.Complex128 = {
|
|
444
|
+
're': 1.0,
|
|
445
|
+
'im': 1.0,
|
|
446
|
+
'byteLength': 16,
|
|
447
|
+
'BYTES_PER_ELEMENT': 8
|
|
448
|
+
};
|
|
449
|
+
if ( v3.re !== 1.0 ) {
|
|
450
|
+
throw new Error( 'something went wrong' );
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
// The compiler should not throw an error when using iterator or iterable types...
|
|
455
|
+
{
|
|
456
|
+
createIterator1();
|
|
457
|
+
createIterator2();
|
|
458
|
+
createIterableIterator();
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
// The compiler should not throw an error when using ndarray types...
|
|
462
|
+
{
|
|
463
|
+
const data = [ 1, 2, 3 ];
|
|
464
|
+
const arr: ndarray.ndarray = {
|
|
465
|
+
'byteLength': null,
|
|
466
|
+
'BYTES_PER_ELEMENT': null,
|
|
467
|
+
'data': data,
|
|
468
|
+
'dtype': 'generic',
|
|
469
|
+
'flags': {
|
|
470
|
+
'ROW_MAJOR_CONTIGUOUS': true,
|
|
471
|
+
'COLUMN_MAJOR_CONTIGUOUS': false
|
|
472
|
+
},
|
|
473
|
+
'length': 3,
|
|
474
|
+
'ndims': 1,
|
|
475
|
+
'offset': 0,
|
|
476
|
+
'order': 'row-major',
|
|
477
|
+
'shape': [ 3 ],
|
|
478
|
+
'strides': [ 1 ],
|
|
479
|
+
'get': ( i: number ): number => {
|
|
480
|
+
return data[ i ];
|
|
481
|
+
},
|
|
482
|
+
'set': ( i: number, v: number ): ndarray.ndarray => {
|
|
483
|
+
data[ i ] = v;
|
|
484
|
+
return arr;
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
if ( arr.length !== 3 ) {
|
|
488
|
+
throw new Error( 'something went wrong' );
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
// The compiler should not throw an error when using object types...
|
|
493
|
+
{
|
|
494
|
+
const desc1: obj.DataPropertyDescriptor = {
|
|
495
|
+
'configurable': true,
|
|
496
|
+
'enumerable': false,
|
|
497
|
+
'writable': false,
|
|
498
|
+
'value': 'beep'
|
|
499
|
+
};
|
|
500
|
+
if ( desc1.value !== 'beep' ) {
|
|
501
|
+
throw new Error( 'something went wrong' );
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
const desc2: obj.DataPropertyDescriptor = {
|
|
505
|
+
'enumerable': false,
|
|
506
|
+
'writable': false,
|
|
507
|
+
'value': 'beep'
|
|
508
|
+
};
|
|
509
|
+
if ( desc2.value !== 'beep' ) {
|
|
510
|
+
throw new Error( 'something went wrong' );
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
const desc3: obj.DataPropertyDescriptor = {
|
|
514
|
+
'configurable': true,
|
|
515
|
+
'writable': false,
|
|
516
|
+
'value': 'beep'
|
|
517
|
+
};
|
|
518
|
+
if ( desc3.value !== 'beep' ) {
|
|
519
|
+
throw new Error( 'something went wrong' );
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
const desc4: obj.DataPropertyDescriptor = {
|
|
523
|
+
'configurable': true,
|
|
524
|
+
'enumerable': false,
|
|
525
|
+
'writable': false
|
|
526
|
+
};
|
|
527
|
+
if ( desc4.value ) {
|
|
528
|
+
throw new Error( 'something went wrong' );
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
const desc5: obj.DataPropertyDescriptor = {
|
|
532
|
+
'writable': false,
|
|
533
|
+
'value': 'beep'
|
|
534
|
+
};
|
|
535
|
+
if ( desc5.value !== 'beep' ) {
|
|
536
|
+
throw new Error( 'something went wrong' );
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
const desc6: obj.DataPropertyDescriptor = {
|
|
540
|
+
'configurable': true,
|
|
541
|
+
'value': 'beep'
|
|
542
|
+
};
|
|
543
|
+
if ( desc6.value !== 'beep' ) {
|
|
544
|
+
throw new Error( 'something went wrong' );
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
const desc7: obj.DataPropertyDescriptor = {
|
|
548
|
+
'enumerable': false,
|
|
549
|
+
'value': 'beep'
|
|
550
|
+
};
|
|
551
|
+
if ( desc7.value !== 'beep' ) {
|
|
552
|
+
throw new Error( 'something went wrong' );
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
const desc8: obj.DataPropertyDescriptor = {
|
|
556
|
+
'enumerable': false,
|
|
557
|
+
'writable': false
|
|
558
|
+
};
|
|
559
|
+
if ( desc8.value ) {
|
|
560
|
+
throw new Error( 'something went wrong' );
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
const desc9: obj.AccessorPropertyDescriptor = {
|
|
564
|
+
'configurable': true,
|
|
565
|
+
'enumerable': false,
|
|
566
|
+
'get': (): string => 'beep',
|
|
567
|
+
'set': () => { throw new Error( 'beep' ); }
|
|
568
|
+
};
|
|
569
|
+
if ( desc9.enumerable !== false ) {
|
|
570
|
+
throw new Error( 'something went wrong' );
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
const desc10: obj.AccessorPropertyDescriptor = {
|
|
574
|
+
'enumerable': false,
|
|
575
|
+
'get': (): string => 'beep',
|
|
576
|
+
'set': () => { throw new Error( 'beep' ); }
|
|
577
|
+
};
|
|
578
|
+
if ( desc10.enumerable !== false ) {
|
|
579
|
+
throw new Error( 'something went wrong' );
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
const desc11: obj.AccessorPropertyDescriptor = {
|
|
583
|
+
'configurable': true,
|
|
584
|
+
'get': (): string => 'beep',
|
|
585
|
+
'set': () => { throw new Error( 'beep' ); }
|
|
586
|
+
};
|
|
587
|
+
if ( desc11.enumerable !== false ) {
|
|
588
|
+
throw new Error( 'something went wrong' );
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
const desc12: obj.AccessorPropertyDescriptor = {
|
|
592
|
+
'configurable': true,
|
|
593
|
+
'enumerable': false,
|
|
594
|
+
'set': () => { throw new Error( 'beep' ); }
|
|
595
|
+
};
|
|
596
|
+
if ( desc12.enumerable !== false ) {
|
|
597
|
+
throw new Error( 'something went wrong' );
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
const desc13: obj.AccessorPropertyDescriptor = {
|
|
601
|
+
'configurable': true,
|
|
602
|
+
'enumerable': false,
|
|
603
|
+
'get': (): string => 'beep'
|
|
604
|
+
};
|
|
605
|
+
if ( desc13.enumerable !== false ) {
|
|
606
|
+
throw new Error( 'something went wrong' );
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
const desc14: obj.AccessorPropertyDescriptor = {
|
|
610
|
+
'get': (): string => 'beep',
|
|
611
|
+
'set': () => { throw new Error( 'beep' ); }
|
|
612
|
+
};
|
|
613
|
+
if ( desc14.enumerable !== false ) {
|
|
614
|
+
throw new Error( 'something went wrong' );
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
const desc15: obj.PropertyDescriptor = {
|
|
618
|
+
'configurable': true,
|
|
619
|
+
'enumerable': false,
|
|
620
|
+
'writable': false,
|
|
621
|
+
'value': 'beep'
|
|
622
|
+
};
|
|
623
|
+
if ( desc15.value !== 'beep' ) {
|
|
624
|
+
throw new Error( 'something went wrong' );
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
const prop: obj.PropertyName = 'foo';
|
|
628
|
+
if ( prop !== 'foo' ) {
|
|
629
|
+
throw new Error( 'something went wrong' );
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
// The compiler should not throw an error when using PRNG types...
|
|
634
|
+
{
|
|
635
|
+
const rand: random.PRNG = (): number => 3.14;
|
|
636
|
+
if ( rand() !== 3.14 ) {
|
|
637
|
+
throw new Error( 'something went wrong' );
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
const s1: random.PRNGSeedMT19937 = 12345;
|
|
641
|
+
if ( s1 !== 12345 ) {
|
|
642
|
+
throw new Error( 'something went wrong' );
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
const s2: random.PRNGSeedMT19937 = new Uint32Array( 10 );
|
|
646
|
+
if ( s2[ 0 ] !== 0 ) {
|
|
647
|
+
throw new Error( 'something went wrong' );
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
const s3: random.PRNGSeedMINSTD = 12345;
|
|
651
|
+
if ( s3 !== 12345 ) {
|
|
652
|
+
throw new Error( 'something went wrong' );
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
const s4: random.PRNGSeedMINSTD = new Int32Array( 10 );
|
|
656
|
+
if ( s4[ 0 ] !== 0 ) {
|
|
657
|
+
throw new Error( 'something went wrong' );
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
const s5: random.PRNGStateMT19937 = new Uint32Array( 10 );
|
|
661
|
+
if ( s5[ 0 ] !== 0 ) {
|
|
662
|
+
throw new Error( 'something went wrong' );
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
const s6: random.PRNGStateMINSTD = new Int32Array( 10 );
|
|
666
|
+
if ( s6[ 0 ] !== 0 ) {
|
|
667
|
+
throw new Error( 'something went wrong' );
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
// The compiler should not throw an error when using slice types...
|
|
672
|
+
{
|
|
673
|
+
const v1: slice.Slice = {
|
|
674
|
+
'start': 0,
|
|
675
|
+
'stop': 10,
|
|
676
|
+
'step': 1
|
|
677
|
+
};
|
|
678
|
+
if ( v1.start !== v1.start ) {
|
|
679
|
+
throw new Error( 'something went wrong' );
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
const v2: slice.Slice = {
|
|
683
|
+
'start': null,
|
|
684
|
+
'stop': null,
|
|
685
|
+
'step': null
|
|
686
|
+
};
|
|
687
|
+
if ( v2.start !== v2.start ) {
|
|
688
|
+
throw new Error( 'something went wrong' );
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
const v3: slice.Slice = {
|
|
692
|
+
'start': null,
|
|
693
|
+
'stop': 10,
|
|
694
|
+
'step': null
|
|
695
|
+
};
|
|
696
|
+
if ( v3.start !== v3.start ) {
|
|
697
|
+
throw new Error( 'something went wrong' );
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
const v4: slice.Slice = {
|
|
701
|
+
'start': 0,
|
|
702
|
+
'stop': 10,
|
|
703
|
+
'step': null
|
|
704
|
+
};
|
|
705
|
+
if ( v4.start !== v4.start ) {
|
|
706
|
+
throw new Error( 'something went wrong' );
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
const v5: slice.Slice = {
|
|
710
|
+
'start': 0,
|
|
711
|
+
'stop': null,
|
|
712
|
+
'step': null
|
|
713
|
+
};
|
|
714
|
+
if ( v5.start !== v5.start ) {
|
|
715
|
+
throw new Error( 'something went wrong' );
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
const v6: slice.Slice = {
|
|
719
|
+
'start': 0,
|
|
720
|
+
'stop': null,
|
|
721
|
+
'step': 1
|
|
722
|
+
};
|
|
723
|
+
if ( v6.start !== v6.start ) {
|
|
724
|
+
throw new Error( 'something went wrong' );
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
const v7: slice.MultiSlice = {
|
|
728
|
+
'ndims': 3,
|
|
729
|
+
'data': [ 1, null, 3 ]
|
|
730
|
+
};
|
|
731
|
+
if ( v7.ndims !== v7.ndims ) {
|
|
732
|
+
throw new Error( 'something went wrong' );
|
|
733
|
+
}
|
|
734
|
+
}
|