From 72f772b9f1ddef2e2253403c18eb4bc6fe8db148 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 20 Aug 2023 01:28:01 +0000 Subject: [PATCH] Auto-generated commit --- .github/workflows/productionize.yml | 15 --------------- README.md | 4 ++-- dist/index.d.ts | 3 +++ dist/index.js | 9 +++++++++ dist/index.js.map | 7 +++++++ docs/types/index.d.ts | 2 +- 6 files changed, 22 insertions(+), 18 deletions(-) create mode 100644 dist/index.d.ts create mode 100644 dist/index.js create mode 100644 dist/index.js.map diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml index 334eb59..91f2b93 100644 --- a/.github/workflows/productionize.yml +++ b/.github/workflows/productionize.yml @@ -82,21 +82,6 @@ jobs: id: transform-error-messages uses: stdlib-js/transform-errors-action@main - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - name: 'Update dependencies in package.json' run: | diff --git a/README.md b/README.md index 226b9d0..7fa93e4 100644 --- a/README.md +++ b/README.md @@ -394,8 +394,8 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. [npm-image]: http://img.shields.io/npm/v/@stdlib/random-array-discrete-uniform.svg [npm-url]: https://npmjs.org/package/@stdlib/random-array-discrete-uniform -[test-image]: https://github.com/stdlib-js/random-array-discrete-uniform/actions/workflows/test.yml/badge.svg?branch=v0.0.1 -[test-url]: https://github.com/stdlib-js/random-array-discrete-uniform/actions/workflows/test.yml?query=branch:v0.0.1 +[test-image]: https://github.com/stdlib-js/random-array-discrete-uniform/actions/workflows/test.yml/badge.svg?branch=main +[test-url]: https://github.com/stdlib-js/random-array-discrete-uniform/actions/workflows/test.yml?query=branch:main [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/random-array-discrete-uniform/main.svg [coverage-url]: https://codecov.io/github/stdlib-js/random-array-discrete-uniform?branch=main diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..f9a3304 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,3 @@ +/// +import discreteUniform from '../docs/types/index'; +export = discreteUniform; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..a3bffcb --- /dev/null +++ b/dist/index.js @@ -0,0 +1,9 @@ +"use strict";var y=function(t,r){return function(){return r||t((r={exports:{}}).exports,r),r.exports}};var b=y(function(ue,C){C.exports={dtype:"float64"}});var O=y(function(se,G){ +var H=require('@stdlib/array-typed-real-dtypes/dist'),J=require('@stdlib/assert-is-plain-object/dist'),K=require('@stdlib/assert-has-own-property/dist'),N=require('@stdlib/error-tools-fmtprodmsg/dist'),w=H();w.push("generic");function M(t,r){return J(r)?K(r,"dtype")&&(t.dtype=r.dtype,w.indexOf(t.dtype)<0)?new TypeError(N('1e34S',"dtype",w.join('", "'),t.dtype)):null:new TypeError(N('1e32V',r));}G.exports=M +});var R=y(function(oe,F){ +var S=require('@stdlib/assert-is-nonnegative-integer/dist').isPrimitive,d=require('@stdlib/utils-define-nonenumerable-read-only-property/dist'),l=require('@stdlib/utils-define-nonenumerable-read-only-accessor/dist'),x=require('@stdlib/utils-define-nonenumerable-read-write-accessor/dist'),Q=require('@stdlib/utils-constant-function/dist'),X=require('@stdlib/utils-noop/dist'),p=require('@stdlib/random-base-discrete-uniform/dist'),E=require('@stdlib/array-typed-real-ctors/dist'),T=require('@stdlib/array-base-filled-by/dist'),Z=require('@stdlib/strided-base-nullary/dist'),_=require('@stdlib/strided-base-binary/dist'),j=require('@stdlib/error-tools-fmtprodmsg/dist'),$=b(),m=O();function ee(){var t,r,v,e,a,s;if(v={dtype:$.dtype},r=arguments.length,r===0)a=p,e=P;else if(r===1){if(t=arguments[0],a=p.factory(t),s=m(v,t),s)throw s;e=P}else if(r===2)a=p.factory(arguments[0],arguments[1]),e=L;else if(r===3){if(t=arguments[2],a=p.factory(arguments[0],arguments[1],t),s=m(v,t),s)throw s;e=L}return t&&t.prng?(d(e,"seed",null),d(e,"seedLength",null),x(e,"state",Q(null),X),d(e,"stateLength",null),d(e,"byteLength",null)):(l(e,"seed",B),l(e,"seedLength",D),x(e,"state",W,Y),l(e,"stateLength",I),l(e,"byteLength",U)),d(e,"PRNG",a.PRNG),e;function L(n,c){var f,g,o,i,u;if(!S(n))throw new TypeError(j('1e32d',n));if(u={},arguments.length>1&&(o=m(u,c),o))throw o;return i=u.dtype||v.dtype,i==="generic"?T(n,a):(f=E(i),g=new f(n),Z([g],[n],[1],a),g)}function P(n,c,f,g){var o,i,u,h,q;if(!S(n))throw new TypeError(j('1e32d',n));if(q={},arguments.length>3&&(u=m(q,g),u))throw u;if(h=q.dtype||v.dtype,h==="generic")return T(n,k);return o=E(h),i=new o(n),_([[c],[f],i],[n],[0,0,1],a),i;function k(){return a(c,f)}}function B(){return e.PRNG.seed}function D(){return e.PRNG.seedLength}function I(){return e.PRNG.stateLength}function U(){return e.PRNG.byteLength}function W(){return e.PRNG.state}function Y(n){e.PRNG.state=n}}F.exports=ee +});var A=y(function(ve,V){ +var re=R(),te=re();V.exports=te +});var ne=require('@stdlib/utils-define-nonenumerable-read-only-property/dist'),z=A(),ae=R();ne(z,"factory",ae);module.exports=z; +/** @license Apache-2.0 */ +//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map new file mode 100644 index 0000000..6f1d5b1 --- /dev/null +++ b/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../lib/defaults.json", "../lib/validate.js", "../lib/factory.js", "../lib/main.js", "../lib/index.js"], + "sourcesContent": ["{\n\t\"dtype\": \"float64\"\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar dtypes = require( '@stdlib/array-typed-real-dtypes' );\nvar isObject = require( '@stdlib/assert-is-plain-object' );\nvar hasOwnProp = require( '@stdlib/assert-has-own-property' );\nvar format = require( '@stdlib/string-format' );\n\n\n// VARIABLES //\n\nvar DTYPES = dtypes();\nDTYPES.push( 'generic' );\n\n\n// MAIN //\n\n/**\n* Validates function options.\n*\n* @private\n* @param {Object} opts - destination object\n* @param {Options} options - function options\n* @param {string} [options.dtype] - output array data type\n* @returns {(Error|null)} null or an error object\n*\n* @example\n* var opts = {};\n* var options = {\n* 'dtype': 'float64'\n* };\n* var err = validate( opts, options );\n* if ( err ) {\n* throw err;\n* }\n*/\nfunction validate( opts, options ) {\n\tif ( !isObject( options ) ) {\n\t\treturn new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t}\n\tif ( hasOwnProp( options, 'dtype' ) ) {\n\t\topts.dtype = options.dtype;\n\t\tif ( DTYPES.indexOf( opts.dtype ) < 0 ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be one of the following: \"%s\". Option: `%s`.', 'dtype', DTYPES.join( '\", \"' ), opts.dtype ) );\n\t\t}\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = validate;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNonNegativeInteger = require( '@stdlib/assert-is-nonnegative-integer' ).isPrimitive;\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar setReadOnlyAccessor = require( '@stdlib/utils-define-nonenumerable-read-only-accessor' );\nvar setReadWriteAccessor = require( '@stdlib/utils-define-nonenumerable-read-write-accessor' );\nvar constantFunction = require( '@stdlib/utils-constant-function' );\nvar noop = require( '@stdlib/utils-noop' );\nvar base = require( '@stdlib/random-base-discrete-uniform' );\nvar ctors = require( '@stdlib/array-typed-real-ctors' );\nvar filledBy = require( '@stdlib/array-base-filled-by' );\nvar nullary = require( '@stdlib/strided-base-nullary' );\nvar binary = require( '@stdlib/strided-base-binary' );\nvar format = require( '@stdlib/string-format' );\nvar defaults = require( './defaults.json' );\nvar validate = require( './validate.js' );\n\n\n// MAIN //\n\n/**\n* Returns a function for creating arrays containing pseudorandom numbers drawn from a discrete uniform distribution.\n*\n* @param {integer} [a] - minimum support\n* @param {integer} [b] - maximum support\n* @param {Options} [options] - function options\n* @param {PRNG} [options.prng] - pseudorandom number generator which generates uniformly distributed pseudorandom numbers\n* @param {PRNGSeedMT19937} [options.seed] - pseudorandom number generator seed\n* @param {PRNGStateMT19937} [options.state] - pseudorandom number generator state\n* @param {boolean} [options.copy=true] - boolean indicating whether to copy a provided pseudorandom number generator state\n* @param {string} [options.dtype=\"float64\"] - default data type\n* @throws {TypeError} `a` must be an integer\n* @throws {TypeError} `b` must be an integer\n* @throws {RangeError} `a` must be less than or equal to `b`\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {Error} must provide a valid state\n* @returns {Function} function for creating arrays\n*\n* @example\n* var uniform = factory( -10, 10 );\n* // returns \n*\n* var arr = uniform( 10 );\n* // returns \n*\n* @example\n* var uniform = factory( -10, 10 );\n* // returns \n*\n* var arr = uniform( 10, {\n* 'dtype': 'generic'\n* });\n* // returns [...]\n*/\nfunction factory() {\n\tvar options;\n\tvar nargs;\n\tvar opts;\n\tvar rand;\n\tvar prng;\n\tvar err;\n\n\topts = {\n\t\t'dtype': defaults.dtype\n\t};\n\n\tnargs = arguments.length;\n\tif ( nargs === 0 ) {\n\t\tprng = base;\n\t\trand = uniform2;\n\t} else if ( nargs === 1 ) {\n\t\toptions = arguments[ 0 ];\n\t\tprng = base.factory( options );\n\t\terr = validate( opts, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t\trand = uniform2;\n\t} else if ( nargs === 2 ) {\n\t\tprng = base.factory( arguments[ 0 ], arguments[ 1 ] );\n\t\trand = uniform1;\n\t} else if ( nargs === 3 ) {\n\t\toptions = arguments[ 2 ];\n\t\tprng = base.factory( arguments[ 0 ], arguments[ 1 ], options );\n\t\terr = validate( opts, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t\trand = uniform1;\n\t}\n\tif ( options && options.prng ) {\n\t\tsetReadOnly( rand, 'seed', null );\n\t\tsetReadOnly( rand, 'seedLength', null );\n\t\tsetReadWriteAccessor( rand, 'state', constantFunction( null ), noop );\n\t\tsetReadOnly( rand, 'stateLength', null );\n\t\tsetReadOnly( rand, 'byteLength', null );\n\t} else {\n\t\tsetReadOnlyAccessor( rand, 'seed', getSeed );\n\t\tsetReadOnlyAccessor( rand, 'seedLength', getSeedLength );\n\t\tsetReadWriteAccessor( rand, 'state', getState, setState );\n\t\tsetReadOnlyAccessor( rand, 'stateLength', getStateLength );\n\t\tsetReadOnlyAccessor( rand, 'byteLength', getStateSize );\n\t}\n\tsetReadOnly( rand, 'PRNG', prng.PRNG );\n\treturn rand;\n\n\t/**\n\t* Returns an array containing pseudorandom numbers drawn from a discrete uniform distribution with minimum support `a` and maximum support `b`.\n\t*\n\t* @private\n\t* @param {NonNegativeInteger} len - array length\n\t* @param {Options} [options] - function options\n\t* @param {string} [options.dtype] - output array data type\n\t* @throws {TypeError} first argument must be a nonnegative integer\n\t* @throws {TypeError} options argument must be an object\n\t* @throws {TypeError} must provide valid options\n\t* @returns {(Array|TypedArray)} output array\n\t*/\n\tfunction uniform1( len, options ) {\n\t\tvar ctor;\n\t\tvar out;\n\t\tvar err;\n\t\tvar dt;\n\t\tvar o;\n\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t}\n\t\to = {};\n\t\tif ( arguments.length > 1 ) {\n\t\t\terr = validate( o, options );\n\t\t\tif ( err ) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t}\n\t\tdt = o.dtype || opts.dtype;\n\t\tif ( dt === 'generic' ) {\n\t\t\treturn filledBy( len, prng );\n\t\t}\n\t\tctor = ctors( dt );\n\t\tout = new ctor( len );\n\t\tnullary( [ out ], [ len ], [ 1 ], prng );\n\t\treturn out;\n\t}\n\n\t/**\n\t* Returns an array containing pseudorandom numbers drawn from a discrete uniform distribution with minimum support `a` and maximum support `b`.\n\t*\n\t* @private\n\t* @param {NonNegativeInteger} len - array length\n\t* @param {number} a - minimum support\n\t* @param {number} b - maximum support\n\t* @param {Options} [options] - function options\n\t* @param {string} [options.dtype] - output array data type\n\t* @throws {TypeError} first argument must be a nonnegative integer\n\t* @throws {TypeError} options argument must be an object\n\t* @throws {TypeError} must provide valid options\n\t* @returns {(Array|TypedArray)} output array\n\t*/\n\tfunction uniform2( len, a, b, options ) {\n\t\tvar ctor;\n\t\tvar out;\n\t\tvar err;\n\t\tvar dt;\n\t\tvar o;\n\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t}\n\t\to = {};\n\t\tif ( arguments.length > 3 ) {\n\t\t\terr = validate( o, options );\n\t\t\tif ( err ) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t}\n\t\t// NOTE: we could alternatively use the PRNG factory function to create a PRNG function which applies parameters for each invocation; however, this would impose a one-time cost which is likely to be rather expensive when generating small arrays. Decision made here to avoid this cost, despite a small cost due to repeatedly validating parameters for each generated pseudorandom number. Additionally, the current implementation has the added benefit that it mirrors the underlying PRNG where invalid parameters result in a return value of `NaN`.\n\t\tdt = o.dtype || opts.dtype;\n\t\tif ( dt === 'generic' ) {\n\t\t\treturn filledBy( len, wrapper );\n\t\t}\n\t\tctor = ctors( dt );\n\t\tout = new ctor( len );\n\t\tbinary( [ [ a ], [ b ], out ], [ len ], [ 0, 0, 1 ], prng );\n\t\treturn out;\n\n\t\t/**\n\t\t* Applies parameters to a pseudorandom number generator function.\n\t\t*\n\t\t* @private\n\t\t* @returns {number} pseudorandom number\n\t\t*/\n\t\tfunction wrapper() {\n\t\t\treturn prng( a, b );\n\t\t}\n\t}\n\n\t/**\n\t* Returns the PRNG seed.\n\t*\n\t* @private\n\t* @returns {PRNGSeedMT19937} seed\n\t*/\n\tfunction getSeed() {\n\t\treturn rand.PRNG.seed;\n\t}\n\n\t/**\n\t* Returns the PRNG seed length.\n\t*\n\t* @private\n\t* @returns {PositiveInteger} seed length\n\t*/\n\tfunction getSeedLength() {\n\t\treturn rand.PRNG.seedLength;\n\t}\n\n\t/**\n\t* Returns the PRNG state length.\n\t*\n\t* @private\n\t* @returns {PositiveInteger} state length\n\t*/\n\tfunction getStateLength() {\n\t\treturn rand.PRNG.stateLength;\n\t}\n\n\t/**\n\t* Returns the PRNG state size (in bytes).\n\t*\n\t* @private\n\t* @returns {PositiveInteger} state size (in bytes)\n\t*/\n\tfunction getStateSize() {\n\t\treturn rand.PRNG.byteLength;\n\t}\n\n\t/**\n\t* Returns the current pseudorandom number generator state.\n\t*\n\t* @private\n\t* @returns {PRNGStateMT19937} current state\n\t*/\n\tfunction getState() {\n\t\treturn rand.PRNG.state;\n\t}\n\n\t/**\n\t* Sets the pseudorandom number generator state.\n\t*\n\t* @private\n\t* @param {PRNGStateMT19937} s - generator state\n\t* @throws {Error} must provide a valid state\n\t*/\n\tfunction setState( s ) {\n\t\trand.PRNG.state = s;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = factory;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar factory = require( './factory.js' );\n\n\n// MAIN //\n\n/**\n* Returns an array containing pseudorandom numbers drawn from a discrete uniform distribution with minimum support `a` and maximum support `b`.\n*\n* @name discreteUniform\n* @type {Function}\n* @param {NonNegativeInteger} len - array length\n* @param {integer} a - minimum support\n* @param {integer} b - maximum support\n* @param {Options} [options] - options\n* @param {string} [options.dtype=\"float64\"] - output array data type\n* @throws {TypeError} first argument must be a nonnegative integer\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @returns {(Array|TypedArray)} output array\n*\n* @example\n* var arr = discreteUniform( 10, -10, 10 );\n* // returns \n*\n* @example\n* var arr = discreteUniform( 10, -10, 10, {\n* 'dtype': 'generic'\n* });\n* // returns [...]\n*/\nvar discreteUniform = factory();\n\n\n// EXPORTS //\n\nmodule.exports = discreteUniform;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an array containing pseudorandom numbers drawn from a discrete uniform distribution with minimum support `a` and maximum support `b`.\n*\n* @module @stdlib/random-array-discrete-uniform\n*\n* @example\n* var discreteUniform = require( '@stdlib/random-array-discrete-uniform' );\n*\n* var arr = discreteUniform( 10, -10, 10 );\n* // returns \n*\n* @example\n* var discreteUniform = require( '@stdlib/random-array-discrete-uniform' );\n*\n* var arr = discreteUniform( 10, -10, 10, {\n* 'dtype': 'generic'\n* });\n* // returns [...]\n*\n* @example\n* var discreteUniform = require( '@stdlib/random-array-discrete-uniform' );\n*\n* var rand = discreteUniform.factory( -10, 10 );\n* // returns \n*\n* var arr = rand( 10 );\n* // returns \n*\n* @example\n* var discreteUniform = require( '@stdlib/random-array-discrete-uniform' );\n*\n* var rand = discreteUniform.factory( -10, 10 );\n* // returns \n*\n* var arr = rand( 10, {\n* 'dtype': 'generic'\n* });\n* // returns [...]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar factory = require( './factory.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'factory', factory );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n\n// exports: { \"factory\": \"main.factory\" }\n"], + "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,GAAAC,EAAA,CAAAA,EAAA,SACC,MAAS,SACV,ICFA,IAAAC,EAAAC,EAAA,SAAAC,GAAA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,EAKtC,OAAO,QAAUD", + "names": ["require_defaults", "__commonJSMin", "exports", "module", "require_validate", "__commonJSMin", "exports", "module", "dtypes", "isObject", "hasOwnProp", "format", "DTYPES", "validate", "opts", "options", "require_factory", "__commonJSMin", "exports", "module", "isNonNegativeInteger", "setReadOnly", "setReadOnlyAccessor", "setReadWriteAccessor", "constantFunction", "noop", "base", "ctors", "filledBy", "nullary", "binary", "format", "defaults", "validate", "factory", "options", "nargs", "opts", "rand", "prng", "err", "uniform2", "uniform1", "getSeed", "getSeedLength", "getState", "setState", "getStateLength", "getStateSize", "len", "ctor", "out", "dt", "o", "a", "b", "wrapper", "s", "require_main", "__commonJSMin", "exports", "module", "factory", "discreteUniform", "setReadOnly", "main", "factory"] +} diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts index fe8f0a9..d9059c4 100644 --- a/docs/types/index.d.ts +++ b/docs/types/index.d.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -// TypeScript Version: 2.0 +// TypeScript Version: 4.1 ///