@ohos-ports/stdlib-process-read-stdin 0.2.3-beta.0 → 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/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 +36 -5
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@stdlib/string-base-format-tokenize",
|
|
3
|
+
"version": "0.2.4",
|
|
4
|
+
"description": "Tokenize a string into an array of string parts and format identifier objects.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "The Stdlib Authors",
|
|
8
|
+
"url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
|
|
9
|
+
},
|
|
10
|
+
"contributors": [
|
|
11
|
+
{
|
|
12
|
+
"name": "The Stdlib Authors",
|
|
13
|
+
"url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"main": "./lib",
|
|
17
|
+
"directories": {
|
|
18
|
+
"doc": "./docs",
|
|
19
|
+
"lib": "./lib",
|
|
20
|
+
"dist": "./dist"
|
|
21
|
+
},
|
|
22
|
+
"types": "./docs/types",
|
|
23
|
+
"scripts": {},
|
|
24
|
+
"homepage": "https://stdlib.io",
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "git://github.com/stdlib-js/string-base-format-tokenize.git"
|
|
28
|
+
},
|
|
29
|
+
"bugs": {
|
|
30
|
+
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {},
|
|
33
|
+
"devDependencies": {},
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=0.10.0",
|
|
36
|
+
"npm": ">2.7.0"
|
|
37
|
+
},
|
|
38
|
+
"os": [
|
|
39
|
+
"aix",
|
|
40
|
+
"darwin",
|
|
41
|
+
"freebsd",
|
|
42
|
+
"linux",
|
|
43
|
+
"macos",
|
|
44
|
+
"openbsd",
|
|
45
|
+
"openharmony",
|
|
46
|
+
"sunos",
|
|
47
|
+
"win32",
|
|
48
|
+
"windows"
|
|
49
|
+
],
|
|
50
|
+
"keywords": [
|
|
51
|
+
"stdlib",
|
|
52
|
+
"stdstring",
|
|
53
|
+
"utilities",
|
|
54
|
+
"utility",
|
|
55
|
+
"utils",
|
|
56
|
+
"util",
|
|
57
|
+
"string",
|
|
58
|
+
"str",
|
|
59
|
+
"format",
|
|
60
|
+
"formatting",
|
|
61
|
+
"fmt",
|
|
62
|
+
"tokens",
|
|
63
|
+
"tokenize",
|
|
64
|
+
"token"
|
|
65
|
+
],
|
|
66
|
+
"funding": {
|
|
67
|
+
"type": "opencollective",
|
|
68
|
+
"url": "https://opencollective.com/stdlib"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Copyright (c) 2016-2026 The Stdlib Authors.
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
|
|
3
|
+
@license Apache-2.0
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2022 The Stdlib Authors.
|
|
6
|
+
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
you may not use this file except in compliance with the License.
|
|
9
|
+
You may obtain a copy of the License at
|
|
10
|
+
|
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
See the License for the specific language governing permissions and
|
|
17
|
+
limitations under the License.
|
|
18
|
+
|
|
19
|
+
-->
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
<details>
|
|
23
|
+
<summary>
|
|
24
|
+
About stdlib...
|
|
25
|
+
</summary>
|
|
26
|
+
<p>We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.</p>
|
|
27
|
+
<p>The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.</p>
|
|
28
|
+
<p>When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.</p>
|
|
29
|
+
<p>To join us in bringing numerical computing to the web, get started by checking us out on <a href="https://github.com/stdlib-js/stdlib">GitHub</a>, and please consider <a href="https://opencollective.com/stdlib">financially supporting stdlib</a>. We greatly appreciate your continued support!</p>
|
|
30
|
+
</details>
|
|
31
|
+
|
|
32
|
+
# format
|
|
33
|
+
|
|
34
|
+
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
|
|
35
|
+
|
|
36
|
+
> Insert supplied variable values into a format string.
|
|
37
|
+
|
|
38
|
+
<section class="intro">
|
|
39
|
+
|
|
40
|
+
</section>
|
|
41
|
+
|
|
42
|
+
<!-- /.intro -->
|
|
43
|
+
|
|
44
|
+
<section class="installation">
|
|
45
|
+
|
|
46
|
+
## Installation
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npm install @stdlib/string-format
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
</section>
|
|
53
|
+
|
|
54
|
+
<section class="usage">
|
|
55
|
+
|
|
56
|
+
## Usage
|
|
57
|
+
|
|
58
|
+
```javascript
|
|
59
|
+
var format = require( '@stdlib/string-format' );
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
#### format( str, ...args )
|
|
63
|
+
|
|
64
|
+
Inserts supplied variable values into a format string.
|
|
65
|
+
|
|
66
|
+
```javascript
|
|
67
|
+
var str = 'Hello, %s! My name is %s.';
|
|
68
|
+
var out = format( str, 'world', 'Bob' );
|
|
69
|
+
// returns 'Hello, world! My name is Bob.'
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The format string is a string literal containing zero or more conversion specifications, each of which results in a string value being inserted to the output string. A conversion specification consists of a percent sign (`%`) followed by one or more of the following flags, width, precision, and conversion type characters. It thus takes the following form:
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
%[flags][width][.precision]specifier
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Arguments following the format string are used to replace the placeholders in the format string. The number of arguments following the format string should be equal to the number of placeholders in the format string.
|
|
79
|
+
|
|
80
|
+
```javascript
|
|
81
|
+
var str = '%s %s';
|
|
82
|
+
var out = format( str, 'Hello', 'World' );
|
|
83
|
+
// returns 'Hello World'
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
To supply arguments in a different order than they appear in the format string, positional placeholders as indicated by a `$` character in the format string are used. In this case, the conversion specification takes the form:
|
|
87
|
+
|
|
88
|
+
```text
|
|
89
|
+
%[pos$][flags][width][.precision]specifier
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
```javascript
|
|
93
|
+
var str = '%3$s %2$s %1$s';
|
|
94
|
+
var out = format( str, 'foo', 'bar', 'baz' );
|
|
95
|
+
// returns 'baz bar foo'
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The following table summarizes the supported specifiers:
|
|
99
|
+
|
|
100
|
+
| type | description | example |
|
|
101
|
+
| ---- | --------------------------------- | --------- |
|
|
102
|
+
| s | string | beep boop |
|
|
103
|
+
| c | character | a |
|
|
104
|
+
| d, i | signed decimal integer | -12 |
|
|
105
|
+
| u | unsigned decimal integer | 390 |
|
|
106
|
+
| b | unsigned binary integer | 11011011 |
|
|
107
|
+
| o | unsigned octal integer | 510 |
|
|
108
|
+
| x | unsigned hexadecimal (lowercase) | 7b |
|
|
109
|
+
| X | unsigned hexadecimal (uppercase) | 7B |
|
|
110
|
+
| f, F | decimal floating point | 390.24 |
|
|
111
|
+
| e | scientific notation (lowercase) | 3.9e+1 |
|
|
112
|
+
| E | scientific notation (uppercase) | 3.9E+1 |
|
|
113
|
+
| g | shortest representation (`e`/`f`) | 3.9 |
|
|
114
|
+
| G | shortest representation (`E`/`F`) | 3.9 |
|
|
115
|
+
|
|
116
|
+
```javascript
|
|
117
|
+
var str = '%i written as a binary number is %b.';
|
|
118
|
+
var out = format( str, 9, 9 );
|
|
119
|
+
// returns '9 written as a binary number is 1001.'
|
|
120
|
+
|
|
121
|
+
str = '%i written as an octal number is %o.';
|
|
122
|
+
out = format( str, 17, 17 );
|
|
123
|
+
// returns '17 written as an octal number is 21.'
|
|
124
|
+
|
|
125
|
+
str = '%i written as a hexadecimal number is %x.';
|
|
126
|
+
out = format( str, 255, 255 );
|
|
127
|
+
// returns '255 written as a hexadecimal number is ff.'
|
|
128
|
+
|
|
129
|
+
str = '%i written as a hexadecimal number is %X (uppercase letters).';
|
|
130
|
+
out = format( str, 255, 255 );
|
|
131
|
+
// returns '255 written as a hexadecimal number is FF (uppercase letters).'
|
|
132
|
+
|
|
133
|
+
str = '%i written as a floating point number with default precision is %f!';
|
|
134
|
+
out = format( str, 8, 8 );
|
|
135
|
+
// returns '8 written as a floating point number with default precision is 8.000000!'
|
|
136
|
+
|
|
137
|
+
str = 'Scientific notation: %e';
|
|
138
|
+
out = format( str, 3.14159 );
|
|
139
|
+
// returns 'Scientific notation: 3.141590e+00'
|
|
140
|
+
|
|
141
|
+
str = 'Scientific notation: %E (uppercase).';
|
|
142
|
+
out = format( str, 3.14159 );
|
|
143
|
+
// returns 'Scientific notation: 3.141590E+00 (uppercase).'
|
|
144
|
+
|
|
145
|
+
str = '%g (shortest representation)';
|
|
146
|
+
out = format( str, 3.14159 );
|
|
147
|
+
// returns '3.14159'
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
A conversion specification may contain zero or more flags, which modify the behavior of the conversion. The following flags are supported:
|
|
151
|
+
|
|
152
|
+
| flag | description |
|
|
153
|
+
| ----- | ------------------------------------------------------------------------------------------ |
|
|
154
|
+
| - | left-justify the output within the given field width by padding with spaces on the right |
|
|
155
|
+
| 0 | left-pad the output with zeros instead of spaces when padding is required |
|
|
156
|
+
| # | use an alternative format for `o` and `x` conversions |
|
|
157
|
+
| + | prefix the output with a plus (+) or minus (-) sign even if the value is a positive number |
|
|
158
|
+
| space | prefix the value with a space character if no sign is written |
|
|
159
|
+
|
|
160
|
+
```javascript
|
|
161
|
+
var str = 'Always prefix with a sign: %+i';
|
|
162
|
+
var out = format( str, 9 );
|
|
163
|
+
// returns 'Always prefix with a sign: +9'
|
|
164
|
+
|
|
165
|
+
out = format( str, -9 );
|
|
166
|
+
// returns 'Always prefix with a sign: -9'
|
|
167
|
+
|
|
168
|
+
str = 'Only prefix with a sign if negative: %i';
|
|
169
|
+
out = format( str, 6 );
|
|
170
|
+
// returns 'Only prefix with a sign if negative: 6'
|
|
171
|
+
|
|
172
|
+
out = format( str, -6 );
|
|
173
|
+
// returns 'Only prefix with a sign if negative: -6'
|
|
174
|
+
|
|
175
|
+
str = 'Prefix with a sign if negative and a space if positive: % i';
|
|
176
|
+
out = format( str, 3 );
|
|
177
|
+
// returns 'Prefix with a sign if negative and a space if positive: 3'
|
|
178
|
+
|
|
179
|
+
out = format( str, -3 );
|
|
180
|
+
// returns 'Prefix with a sign if negative and a space if positive: -3'
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
The `width` may be specified as a decimal integer representing the minimum number of characters to be written to the output. If the value to be written is shorter than this number, the result is padded with spaces on the left. The value is not truncated even if the result is larger. Alternatively, the `width` may be specified as an asterisk character (`*`), in which case the argument preceding the conversion specification is used as the minimum field width.
|
|
184
|
+
|
|
185
|
+
```javascript
|
|
186
|
+
var str = '%5s';
|
|
187
|
+
var out = format( str, 'baz' );
|
|
188
|
+
// returns ' baz'
|
|
189
|
+
|
|
190
|
+
str = '%-5s';
|
|
191
|
+
out = format( str, 'baz' );
|
|
192
|
+
// returns 'baz '
|
|
193
|
+
|
|
194
|
+
str = '%05i';
|
|
195
|
+
out = format( str, 2 );
|
|
196
|
+
// returns '00002'
|
|
197
|
+
|
|
198
|
+
str = '%*i';
|
|
199
|
+
out = format( str, 5, 2 );
|
|
200
|
+
// returns ' 2'
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
The `precision` may be specified as a decimal integer or as an asterisk character (`*`), in which case the argument preceding the conversion specification is used as the precision value. The behavior of the `precision` differs depending on the conversion type:
|
|
204
|
+
|
|
205
|
+
- For `s` specifiers, the `precision` specifies the maximum number of characters to be written to the output.
|
|
206
|
+
- For floating point specifiers (`f`, `F`, `e`, `E`), the `precision` specifies the number of digits after the decimal point to be written to the output (by default, this is `6`).
|
|
207
|
+
- For `g` and `G` specifiers, the `precision` specifies the maximum number of significant digits to be written to the output.
|
|
208
|
+
- For integer specifiers (`d`, `i`, `u`, `b`, `o`, `x`, `X`), the `precision` specifies the minimum number of digits to be written to the output. If the value to be written is shorter than this number, the result is padded with zeros on the left. The value is not truncated even if the result is longer.
|
|
209
|
+
|
|
210
|
+
Alternatively, the `precision` may be specified as an asterisk character (`*`), in which case the argument preceding the conversion specification is used as the minimum number of digits.
|
|
211
|
+
|
|
212
|
+
```javascript
|
|
213
|
+
var str = '%5.2s';
|
|
214
|
+
var out = format( str, 'baz' );
|
|
215
|
+
// returns ' ba'
|
|
216
|
+
|
|
217
|
+
str = 'PI: ~%.2f';
|
|
218
|
+
out = format( str, 3.14159 );
|
|
219
|
+
// returns 'PI: ~3.14'
|
|
220
|
+
|
|
221
|
+
str = 'Agent %.3i';
|
|
222
|
+
out = format( str, 7 );
|
|
223
|
+
// returns 'Agent 007'
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
</section>
|
|
227
|
+
|
|
228
|
+
<!-- /.usage -->
|
|
229
|
+
|
|
230
|
+
<section class="examples">
|
|
231
|
+
|
|
232
|
+
## Examples
|
|
233
|
+
|
|
234
|
+
<!-- eslint no-undef: "error" -->
|
|
235
|
+
|
|
236
|
+
```javascript
|
|
237
|
+
var format = require( '@stdlib/string-format' );
|
|
238
|
+
|
|
239
|
+
var out = format( '%s %s!', 'Hello', 'World' );
|
|
240
|
+
// returns 'Hello World!'
|
|
241
|
+
|
|
242
|
+
out = format( 'Pi: ~%.2f', 3.141592653589793 );
|
|
243
|
+
// returns 'Pi: ~3.14'
|
|
244
|
+
|
|
245
|
+
out = format( '%-10s %-10s', 'a', 'b' );
|
|
246
|
+
// returns 'a b '
|
|
247
|
+
|
|
248
|
+
out = format( '%10s %10s', 'a', 'b' );
|
|
249
|
+
// returns ' a b'
|
|
250
|
+
|
|
251
|
+
out = format( '%2$s %1$s %3$s', 'b', 'a', 'c' );
|
|
252
|
+
// returns 'a b c'
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
</section>
|
|
256
|
+
|
|
257
|
+
<!-- /.examples -->
|
|
258
|
+
|
|
259
|
+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
|
|
260
|
+
|
|
261
|
+
<section class="related">
|
|
262
|
+
|
|
263
|
+
</section>
|
|
264
|
+
|
|
265
|
+
<!-- /.related -->
|
|
266
|
+
|
|
267
|
+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
<section class="main-repo" >
|
|
271
|
+
|
|
272
|
+
* * *
|
|
273
|
+
|
|
274
|
+
## Notice
|
|
275
|
+
|
|
276
|
+
This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
|
|
277
|
+
|
|
278
|
+
For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib].
|
|
279
|
+
|
|
280
|
+
#### Community
|
|
281
|
+
|
|
282
|
+
[![Chat][chat-image]][chat-url]
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## License
|
|
287
|
+
|
|
288
|
+
See [LICENSE][stdlib-license].
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
## Copyright
|
|
292
|
+
|
|
293
|
+
Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors].
|
|
294
|
+
|
|
295
|
+
</section>
|
|
296
|
+
|
|
297
|
+
<!-- /.stdlib -->
|
|
298
|
+
|
|
299
|
+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
|
|
300
|
+
|
|
301
|
+
<section class="links">
|
|
302
|
+
|
|
303
|
+
[npm-image]: http://img.shields.io/npm/v/@stdlib/string-format.svg
|
|
304
|
+
[npm-url]: https://npmjs.org/package/@stdlib/string-format
|
|
305
|
+
|
|
306
|
+
[test-image]: https://github.com/stdlib-js/string-format/actions/workflows/test.yml/badge.svg?branch=v0.2.3
|
|
307
|
+
[test-url]: https://github.com/stdlib-js/string-format/actions/workflows/test.yml?query=branch:v0.2.3
|
|
308
|
+
|
|
309
|
+
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/string-format/main.svg
|
|
310
|
+
[coverage-url]: https://codecov.io/github/stdlib-js/string-format?branch=main
|
|
311
|
+
|
|
312
|
+
<!--
|
|
313
|
+
|
|
314
|
+
[dependencies-image]: https://img.shields.io/david/stdlib-js/string-format.svg
|
|
315
|
+
[dependencies-url]: https://david-dm.org/stdlib-js/string-format/main
|
|
316
|
+
|
|
317
|
+
-->
|
|
318
|
+
|
|
319
|
+
[chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
|
|
320
|
+
[chat-url]: https://stdlib.zulipchat.com
|
|
321
|
+
|
|
322
|
+
[stdlib]: https://github.com/stdlib-js/stdlib
|
|
323
|
+
|
|
324
|
+
[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
|
|
325
|
+
|
|
326
|
+
[umd]: https://github.com/umdjs/umd
|
|
327
|
+
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
|
|
328
|
+
|
|
329
|
+
[deno-url]: https://github.com/stdlib-js/string-format/tree/deno
|
|
330
|
+
[deno-readme]: https://github.com/stdlib-js/string-format/blob/deno/README.md
|
|
331
|
+
[umd-url]: https://github.com/stdlib-js/string-format/tree/umd
|
|
332
|
+
[umd-readme]: https://github.com/stdlib-js/string-format/blob/umd/README.md
|
|
333
|
+
[esm-url]: https://github.com/stdlib-js/string-format/tree/esm
|
|
334
|
+
[esm-readme]: https://github.com/stdlib-js/string-format/blob/esm/README.md
|
|
335
|
+
[branches-url]: https://github.com/stdlib-js/string-format/blob/main/branches.md
|
|
336
|
+
|
|
337
|
+
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/string-format/main/LICENSE
|
|
338
|
+
|
|
339
|
+
</section>
|
|
340
|
+
|
|
341
|
+
<!-- /.links -->
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";var i=function(e,r){return function(){return r||e((r={exports:{}}).exports,r),r.exports}};var u=i(function(c,n){
|
|
2
|
+
function g(e){return typeof e=="string"}n.exports=g
|
|
3
|
+
});var o=i(function(q,s){
|
|
4
|
+
var p=require('@stdlib/string-base-format-interpolate/dist'),l=require('@stdlib/string-base-format-tokenize/dist'),m=u();function a(e){var r,t;if(!m(e))throw new TypeError(a('1Of3F',e));for(r=[l(e)],t=1;t<arguments.length;t++)r.push(arguments[t]);return p.apply(null,r)}s.exports=a
|
|
5
|
+
});var v=o();module.exports=v;
|
|
6
|
+
/** @license Apache-2.0 */
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../lib/is_string.js", "../lib/main.js", "../lib/index.js"],
|
|
4
|
+
"sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nmodule.exports = isString;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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 interpolate = require( '@stdlib/string-base-format-interpolate' );\nvar tokenize = require( '@stdlib/string-base-format-tokenize' );\nvar isString = require( './is_string.js' );\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\targs = [ tokenize( str ) ];\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nmodule.exports = format;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* Insert supplied variable values into a format string.\n*\n* @module @stdlib/string-format\n*\n* @example\n* var format = require( '@stdlib/string-format' );\n*\n* var out = format( '%s %s!', 'Hello', 'World' );\n* // returns 'Hello World!'\n*\n* out = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"],
|
|
5
|
+
"mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAkCA,SAASC,EAAUC,EAAQ,CAC1B,OAAS,OAAOA,GAAU,QAC3B,CAKAF,EAAO,QAAUC,ICzCjB,IAAAE,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAc,QAAS,wCAAyC,EAChEC,EAAW,QAAS,qCAAsC,EAC1DC,EAAW,IAsBf,SAASC,EAAQC,EAAM,CACtB,IAAIC,EACAC,EAEJ,GAAK,CAACJ,EAAUE,CAAI,EACnB,MAAM,IAAI,UAAWD,EAAQ,kEAAmEC,CAAI,CAAE,EAGvG,IADAC,EAAO,CAAEJ,EAAUG,CAAI,CAAE,EACnBE,EAAI,EAAGA,EAAI,UAAU,OAAQA,IAClCD,EAAK,KAAM,UAAWC,CAAE,CAAE,EAE3B,OAAON,EAAY,MAAO,KAAMK,CAAK,CACtC,CAKAN,EAAO,QAAUI,IC1BjB,IAAII,EAAO,IAKX,OAAO,QAAUA",
|
|
6
|
+
"names": ["require_is_string", "__commonJSMin", "exports", "module", "isString", "value", "require_main", "__commonJSMin", "exports", "module", "interpolate", "tokenize", "isString", "format", "str", "args", "i", "main"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @license Apache-2.0
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2022 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
|
+
// TypeScript Version: 4.1
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Inserts supplied variable values into a format string.
|
|
23
|
+
*
|
|
24
|
+
* @param str - input string
|
|
25
|
+
* @param args - variable values
|
|
26
|
+
* @throws invalid flags
|
|
27
|
+
* @returns formatted string
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* var str = format( 'Hello %s!', 'world' );
|
|
31
|
+
* // returns 'Hello world!'
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* var str = format( 'Pi: ~%.2f', 3.141592653589793 );
|
|
35
|
+
* // returns 'Pi: ~3.14'
|
|
36
|
+
*/
|
|
37
|
+
declare function format( str: string, ...args: Array<any> ): string;
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
// EXPORTS //
|
|
41
|
+
|
|
42
|
+
export = format;
|