diff --git a/.editorconfig b/.editorconfig index 0fd4d6c..13e9c39 100644 --- a/.editorconfig +++ b/.editorconfig @@ -179,3 +179,8 @@ indent_size = 2 [*.gypi] indent_style = space indent_size = 2 + +# Set properties for citation files: +[*.{cff,cff.txt}] +indent_style = space +indent_size = 2 diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml index 3e8e2db..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: | @@ -349,7 +334,7 @@ jobs: # Send status to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} @@ -520,7 +505,7 @@ jobs: # Send status to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} @@ -697,7 +682,7 @@ jobs: # Send status to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f56d473..474004b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -197,7 +197,7 @@ jobs: # Publish package to npm: - name: 'Publish package to npm' - uses: JS-DevTools/npm-publish@v1 + uses: JS-DevTools/npm-publish@v2 with: token: ${{ secrets.NPM_TOKEN }} access: public @@ -209,7 +209,7 @@ jobs: # Send status to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 18b763d..d8487bb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -89,7 +89,7 @@ jobs: # Send status to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/.github/workflows/test_bundles.yml b/.github/workflows/test_bundles.yml index e9df6a0..172cb2d 100644 --- a/.github/workflows/test_bundles.yml +++ b/.github/workflows/test_bundles.yml @@ -88,7 +88,7 @@ jobs: # Send notification to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} @@ -130,7 +130,7 @@ jobs: # Send notification to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} @@ -172,7 +172,7 @@ jobs: # Send notification to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/.github/workflows/test_coverage.yml b/.github/workflows/test_coverage.yml index 6d8aa0b..a73c515 100644 --- a/.github/workflows/test_coverage.yml +++ b/.github/workflows/test_coverage.yml @@ -106,7 +106,7 @@ jobs: # Send Slack notification if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index 86930d3..c67ee6f 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -75,7 +75,7 @@ jobs: # Send Slack notification if job fails: - name: 'Send notification to Slack in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..2ec6fff --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,30 @@ +cff-version: 1.2.0 +title: stdlib +message: >- + If you use this software, please cite it using the + metadata from this file. + +type: software + +authors: + - name: The Stdlib Authors + url: https://github.com/stdlib-js/stdlib/graphs/contributors + +repository-code: https://github.com/stdlib-js/stdlib +url: https://stdlib.io + +abstract: | + Standard library for JavaScript and Node.js. + +keywords: + - JavaScript + - Node.js + - TypeScript + - standard library + - scientific computing + - numerical computing + - statistical computing + +license: Apache-2.0 AND BSL-1.0 + +date-released: 2016 diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 34dfa68..93c4bde 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -3,31 +3,37 @@ # Contributors listed in alphabetical order. Ali Salesi +Amit Jimiwal Athan Reines Brendan Graetz Bruno Fenzl Christopher Dambamuromo +Dan Rose Dominik Moritz +Dorrin Sotoudeh Frank Kovacs -Harshita Kalani <95532771+HarshitaKalani@users.noreply.github.com> -James +Harshita Kalani +James Gelok Jithin KS Joey Reed -Jordan-Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com> +Jordan Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com> Joris Labie Justin Dennison -Marcus +Marcus Fantham Matt Cochrane Milan Raj Momtchil Momtchev +Naresh Jagadeesan +Nithin Katta <88046362+nithinkatta@users.noreply.github.com> Ognjen Jevremović Philipp Burckhardt -Pranav <85227306+Pranavchiku@users.noreply.github.com> +Pranav Goswami Ricky Reusser +Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com> Ryan Seal Seyyed Parsa Neshaei Shraddheya Shendre Stephannie Jiménez Gacha -dorrin-sot <59933477+dorrin-sot@users.noreply.github.com> +Yernar Yergaziyev orimiles5 <97595296+orimiles5@users.noreply.github.com> -rei2hu +rei2hu diff --git a/README.md b/README.md index 7930ee1..ffa16c0 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,17 @@ limitations under the License. --> + +
+ + About stdlib... + +

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.

+

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.

+

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.

+

To join us in bringing numerical computing to the web, get started by checking us out on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!

+
+ # Probability Mass Function [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] @@ -219,8 +230,8 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors]. [npm-image]: http://img.shields.io/npm/v/@stdlib/stats-base-dists-binomial-pmf.svg [npm-url]: https://npmjs.org/package/@stdlib/stats-base-dists-binomial-pmf -[test-image]: https://github.com/stdlib-js/stats-base-dists-binomial-pmf/actions/workflows/test.yml/badge.svg?branch=main -[test-url]: https://github.com/stdlib-js/stats-base-dists-binomial-pmf/actions/workflows/test.yml?query=branch:main +[test-image]: https://github.com/stdlib-js/stats-base-dists-binomial-pmf/actions/workflows/test.yml/badge.svg?branch=v0.1.0 +[test-url]: https://github.com/stdlib-js/stats-base-dists-binomial-pmf/actions/workflows/test.yml?query=branch:v0.1.0 [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/stats-base-dists-binomial-pmf/main.svg [coverage-url]: https://codecov.io/github/stdlib-js/stats-base-dists-binomial-pmf?branch=main diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..e091413 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,3 @@ +/// +import pmf from '../docs/types/index'; +export = pmf; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..33ee7d5 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,7 @@ +"use strict";var v=function(e,r){return function(){return r||e((r={exports:{}}).exports,r),r.exports}};var q=v(function(C,o){ +var f=require('@stdlib/math-base-assert-is-nonnegative-integer/dist'),m=require('@stdlib/math-base-special-binomcoefln/dist'),a=require('@stdlib/math-base-assert-is-nan/dist'),y=require('@stdlib/math-base-special-log1p/dist'),I=require('@stdlib/math-base-special-exp/dist'),F=require('@stdlib/math-base-special-ln/dist'),b=require('@stdlib/constants-float64-pinf/dist');function d(e,r,u){var i;return a(e)||a(r)||a(u)||u<0||u>1||!f(r)||r===b?NaN:f(e)?e>r?0:u===0?e===0?1:0:u===1?e===r?1:0:(i=m(r,e),i+=e*F(u)+(r-e)*y(-u),I(i)):0}o.exports=d +});var l=v(function(D,N){ +var s=require('@stdlib/math-base-assert-is-nonnegative-integer/dist'),P=require('@stdlib/utils-constant-function/dist'),O=require('@stdlib/math-base-special-binomcoefln/dist'),c=require('@stdlib/stats-base-dists-degenerate-pmf/dist').factory,n=require('@stdlib/math-base-assert-is-nan/dist'),R=require('@stdlib/math-base-special-log1p/dist'),h=require('@stdlib/math-base-special-exp/dist'),j=require('@stdlib/math-base-special-ln/dist'),k=require('@stdlib/constants-float64-pinf/dist');function w(e,r){if(n(e)||n(r)||!s(e)||e===k||r<0||r>1)return P(NaN);if(r===0||e===0)return c(0);if(r===1)return c(e);return u;function u(i){var t;return n(i)?NaN:s(i)?i>e?0:(t=O(e,i),t+=i*j(r)+(e-i)*R(-r),h(t)):0}}N.exports=w +});var z=require('@stdlib/utils-define-nonenumerable-read-only-property/dist'),g=q(),A=l();z(g,"factory",A);module.exports=g; +/** @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..1fac8b8 --- /dev/null +++ b/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../lib/main.js", "../lib/factory.js", "../lib/index.js"], + "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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/math-base-assert-is-nonnegative-integer' );\nvar binomcoefln = require( '@stdlib/math-base-special-binomcoefln' );\nvar isnan = require( '@stdlib/math-base-assert-is-nan' );\nvar log1p = require( '@stdlib/math-base-special-log1p' );\nvar exp = require( '@stdlib/math-base-special-exp' );\nvar ln = require( '@stdlib/math-base-special-ln' );\nvar PINF = require( '@stdlib/constants-float64-pinf' );\n\n\n// MAIN //\n\n/**\n* Evaluates the probability mass function (PMF) for a binomial distribution with number of trials `n` and success probability `p` at a value `x`.\n*\n* @param {number} x - input value\n* @param {NonNegativeInteger} n - number of trials\n* @param {Probability} p - success probability\n* @returns {Probability} evaluated PMF\n*\n* @example\n* var y = pmf( 3.0, 20, 0.2 );\n* // returns ~0.205\n*\n* @example\n* var y = pmf( 21.0, 20, 0.2 );\n* // returns 0.0\n*\n* @example\n* var y = pmf( 5.0, 10, 0.4 );\n* // returns ~0.201\n*\n* @example\n* var y = pmf( 0.0, 10, 0.4 );\n* // returns ~0.006\n*\n* @example\n* var y = pmf( NaN, 20, 0.5 );\n* // returns NaN\n*\n* @example\n* var y = pmf( 0.0, NaN, 0.5 );\n* // returns NaN\n*\n* @example\n* var y = pmf( 0.0, 20, NaN );\n* // returns NaN\n*\n* @example\n* var y = pmf( 2.0, 1.5, 0.5 );\n* // returns NaN\n*\n* @example\n* var y = pmf( 2.0, -2.0, 0.5 );\n* // returns NaN\n*\n* @example\n* var y = pmf( 2.0, 20, -1.0 );\n* // returns NaN\n*\n* @example\n* var y = pmf( 2.0, 20, 1.5 );\n* // returns NaN\n*/\nfunction pmf( x, n, p ) {\n\tvar lnl;\n\tif (\n\t\tisnan( x ) ||\n\t\tisnan( n ) ||\n\t\tisnan( p ) ||\n\t\tp < 0.0 ||\n\t\tp > 1.0 ||\n\t\t!isNonNegativeInteger( n ) ||\n\t\tn === PINF\n\t) {\n\t\treturn NaN;\n\t}\n\tif ( isNonNegativeInteger( x ) ) {\n\t\tif ( x > n ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\tif ( p === 0.0 ) {\n\t\t\treturn ( x === 0 ) ? 1.0 : 0.0;\n\t\t}\n\t\tif ( p === 1.0 ) {\n\t\t\treturn ( x === n ) ? 1.0 : 0.0;\n\t\t}\n\t\tlnl = binomcoefln( n, x );\n\t\tlnl += (x * ln( p )) + (( n - x ) * log1p( -p ));\n\t\treturn exp( lnl );\n\t}\n\treturn 0.0;\n}\n\n\n// EXPORTS //\n\nmodule.exports = pmf;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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/math-base-assert-is-nonnegative-integer' );\nvar constantFunction = require( '@stdlib/utils-constant-function' );\nvar binomcoefln = require( '@stdlib/math-base-special-binomcoefln' );\nvar degenerate = require( '@stdlib/stats-base-dists-degenerate-pmf' ).factory;\nvar isnan = require( '@stdlib/math-base-assert-is-nan' );\nvar log1p = require( '@stdlib/math-base-special-log1p' );\nvar exp = require( '@stdlib/math-base-special-exp' );\nvar ln = require( '@stdlib/math-base-special-ln' );\nvar PINF = require( '@stdlib/constants-float64-pinf' );\n\n\n// MAIN //\n\n/**\n* Returns a function for evaluating the probability mass function (PMF) for a binomial distribution with number of trials `n` and success probability `p`.\n*\n* @param {NonNegativeInteger} n - number of trials\n* @param {Probability} p - success probability\n* @returns {Function} PMF\n*\n* @example\n* var pmf = factory( 10, 0.5 );\n* var y = pmf( 3.0 );\n* // returns ~0.117\n*\n* y = pmf( 5.0 );\n* // returns ~0.246\n*/\nfunction factory( n, p ) {\n\tif (\n\t\tisnan( n ) ||\n\t\tisnan( p ) ||\n\t\t!isNonNegativeInteger( n ) ||\n\t\tn === PINF ||\n\t\tp < 0.0 ||\n\t\tp > 1.0\n\t) {\n\t\treturn constantFunction( NaN );\n\t}\n\tif ( p === 0.0 || n === 0 ) {\n\t\treturn degenerate( 0.0 );\n\t}\n\tif ( p === 1.0 ) {\n\t\treturn degenerate( n );\n\t}\n\treturn pmf;\n\n\t/**\n\t* Evaluates the probability mass function (PMF) for a binomial distribution.\n\t*\n\t* @private\n\t* @param {number} x - input value\n\t* @returns {Probability} evaluated PMF\n\t*\n\t* @example\n\t* var y = pmf( 2.0 );\n\t* // returns \n\t*/\n\tfunction pmf( x ) {\n\t\tvar lnl;\n\t\tif ( isnan( x ) ) {\n\t\t\treturn NaN;\n\t\t}\n\t\tif ( isNonNegativeInteger( x ) ) {\n\t\t\tif ( x > n ) {\n\t\t\t\treturn 0.0;\n\t\t\t}\n\t\t\tlnl = binomcoefln( n, x );\n\t\t\tlnl += (x * ln( p )) + ((n - x) * log1p( -p ));\n\t\t\treturn exp( lnl );\n\t\t}\n\t\treturn 0.0;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = factory;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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* Binomial distribution probability mass function (PMF).\n*\n* @module @stdlib/stats-base-dists-binomial-pmf\n*\n* @example\n* var pmf = require( '@stdlib/stats-base-dists-binomial-pmf' );\n*\n* var y = pmf( 3.0, 20, 0.2 );\n* // returns ~0.205\n*\n* y = pmf( 21.0, 20, 0.2 );\n* // returns 0.0\n*\n* y = pmf( 5.0, 10, 0.4 );\n* // returns ~0.201\n*\n* y = pmf( 0.0, 10, 0.4 );\n* // returns ~0.06\n*\n* @example\n* var factory = require( '@stdlib/stats-base-dists-binomial-pmf' ).factory;\n*\n* var pmf = factory( 10, 0.5 );\n*\n* var y = pmf( 3.0 );\n* // returns ~0.117\n*\n* y = pmf( 5.0 );\n* // returns ~0.246\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"], + "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAuB,QAAS,iDAAkD,EAClFC,EAAc,QAAS,uCAAwC,EAC/DC,EAAQ,QAAS,iCAAkC,EACnDC,EAAQ,QAAS,iCAAkC,EACnDC,EAAM,QAAS,+BAAgC,EAC/CC,EAAK,QAAS,8BAA+B,EAC7CC,EAAO,QAAS,gCAAiC,EAyDrD,SAASC,EAAKC,EAAGC,EAAGC,EAAI,CACvB,IAAIC,EACJ,OACCT,EAAOM,CAAE,GACTN,EAAOO,CAAE,GACTP,EAAOQ,CAAE,GACTA,EAAI,GACJA,EAAI,GACJ,CAACV,EAAsBS,CAAE,GACzBA,IAAMH,EAEC,IAEHN,EAAsBQ,CAAE,EACvBA,EAAIC,EACD,EAEHC,IAAM,EACDF,IAAM,EAAM,EAAM,EAEvBE,IAAM,EACDF,IAAMC,EAAM,EAAM,GAE5BE,EAAMV,EAAaQ,EAAGD,CAAE,EACxBG,GAAQH,EAAIH,EAAIK,CAAE,GAAQD,EAAID,GAAML,EAAO,CAACO,CAAE,EACvCN,EAAKO,CAAI,GAEV,CACR,CAKAZ,EAAO,QAAUQ,ICtHjB,IAAAK,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAuB,QAAS,iDAAkD,EAClFC,EAAmB,QAAS,iCAAkC,EAC9DC,EAAc,QAAS,uCAAwC,EAC/DC,EAAa,QAAS,yCAA0C,EAAE,QAClEC,EAAQ,QAAS,iCAAkC,EACnDC,EAAQ,QAAS,iCAAkC,EACnDC,EAAM,QAAS,+BAAgC,EAC/CC,EAAK,QAAS,8BAA+B,EAC7CC,EAAO,QAAS,gCAAiC,EAoBrD,SAASC,EAASC,EAAGC,EAAI,CACxB,GACCP,EAAOM,CAAE,GACTN,EAAOO,CAAE,GACT,CAACX,EAAsBU,CAAE,GACzBA,IAAMF,GACNG,EAAI,GACJA,EAAI,EAEJ,OAAOV,EAAkB,GAAI,EAE9B,GAAKU,IAAM,GAAOD,IAAM,EACvB,OAAOP,EAAY,CAAI,EAExB,GAAKQ,IAAM,EACV,OAAOR,EAAYO,CAAE,EAEtB,OAAOE,EAaP,SAASA,EAAKC,EAAI,CACjB,IAAIC,EACJ,OAAKV,EAAOS,CAAE,EACN,IAEHb,EAAsBa,CAAE,EACvBA,EAAIH,EACD,GAERI,EAAMZ,EAAaQ,EAAGG,CAAE,EACxBC,GAAQD,EAAIN,EAAII,CAAE,GAAOD,EAAIG,GAAKR,EAAO,CAACM,CAAE,EACrCL,EAAKQ,CAAI,GAEV,CACR,CACD,CAKAf,EAAO,QAAUU,IC9CjB,IAAIM,EAAc,QAAS,uDAAwD,EAC/EC,EAAO,IACPC,EAAU,IAKdF,EAAaC,EAAM,UAAWC,CAAQ,EAKtC,OAAO,QAAUD", + "names": ["require_main", "__commonJSMin", "exports", "module", "isNonNegativeInteger", "binomcoefln", "isnan", "log1p", "exp", "ln", "PINF", "pmf", "x", "n", "p", "lnl", "require_factory", "__commonJSMin", "exports", "module", "isNonNegativeInteger", "constantFunction", "binomcoefln", "degenerate", "isnan", "log1p", "exp", "ln", "PINF", "factory", "n", "p", "pmf", "x", "lnl", "setReadOnly", "main", "factory"] +} diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts index 82ebd24..0c98d85 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 /** * Evaluates the probability mass function (PMF) for a binomial distribution. diff --git a/package.json b/package.json index cbe5f7c..ab44a3c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stdlib/stats-base-dists-binomial-pmf", - "version": "0.0.7", + "version": "0.1.0", "description": "Binomial distribution probability mass function (PMF).", "license": "Apache-2.0", "author": { @@ -37,24 +37,24 @@ "url": "https://github.com/stdlib-js/stdlib/issues" }, "dependencies": { - "@stdlib/constants-float64-pinf": "^0.0.8", - "@stdlib/math-base-assert-is-nan": "^0.0.8", - "@stdlib/math-base-assert-is-nonnegative-integer": "^0.0.7", - "@stdlib/math-base-special-binomcoefln": "^0.0.7", - "@stdlib/math-base-special-exp": "^0.0.6", - "@stdlib/math-base-special-ln": "^0.0.6", - "@stdlib/math-base-special-log1p": "^0.0.6", - "@stdlib/stats-base-dists-degenerate-pmf": "^0.0.8", - "@stdlib/utils-constant-function": "^0.0.8", - "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.7" + "@stdlib/constants-float64-pinf": "^0.1.0", + "@stdlib/math-base-assert-is-nan": "^0.1.0", + "@stdlib/math-base-assert-is-nonnegative-integer": "^0.1.0", + "@stdlib/math-base-special-binomcoefln": "^0.1.0", + "@stdlib/math-base-special-exp": "^0.1.0", + "@stdlib/math-base-special-ln": "^0.1.0", + "@stdlib/math-base-special-log1p": "^0.1.0", + "@stdlib/stats-base-dists-degenerate-pmf": "^0.1.0", + "@stdlib/utils-constant-function": "^0.1.0", + "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.0" }, "devDependencies": { - "@stdlib/bench": "^0.0.12", - "@stdlib/constants-float64-eps": "^0.0.8", - "@stdlib/constants-float64-ninf": "^0.0.8", - "@stdlib/math-base-special-abs": "^0.0.6", - "@stdlib/math-base-special-ceil": "^0.0.8", - "@stdlib/math-base-special-round": "^0.0.7", + "@stdlib/bench": "^0.1.0", + "@stdlib/constants-float64-eps": "^0.1.0", + "@stdlib/constants-float64-ninf": "^0.1.0", + "@stdlib/math-base-special-abs": "^0.1.0", + "@stdlib/math-base-special-ceil": "^0.1.0", + "@stdlib/math-base-special-round": "^0.1.0", "@stdlib/random-base-randu": "^0.0.8", "tape": "git+https://github.com/kgryte/tape.git#fix/globby", "istanbul": "^0.4.1", diff --git a/test/test.factory.js b/test/test.factory.js index 9c3a936..94fdcb1 100644 --- a/test/test.factory.js +++ b/test/test.factory.js @@ -41,7 +41,7 @@ var highHigh = require( './fixtures/julia/high_high.json' ); tape( 'main export is a function', function test( t ) { t.ok( true, __filename ); - t.equal( typeof factory, 'function', 'main export is a function' ); + t.strictEqual( typeof factory, 'function', 'main export is a function' ); t.end(); }); diff --git a/test/test.js b/test/test.js index de2d2e1..686bb53 100644 --- a/test/test.js +++ b/test/test.js @@ -28,7 +28,7 @@ var pmf = require( './../lib' ); tape( 'main export is a function', function test( t ) { t.ok( true, __filename ); - t.equal( typeof pmf, 'function', 'main export is a function' ); + t.strictEqual( typeof pmf, 'function', 'main export is a function' ); t.end(); }); diff --git a/test/test.pmf.js b/test/test.pmf.js index 7ea9ada..29dd24d 100644 --- a/test/test.pmf.js +++ b/test/test.pmf.js @@ -41,7 +41,7 @@ var highHigh = require( './fixtures/julia/high_high.json' ); tape( 'main export is a function', function test( t ) { t.ok( true, __filename ); - t.equal( typeof pmf, 'function', 'main export is a function' ); + t.strictEqual( typeof pmf, 'function', 'main export is a function' ); t.end(); });