🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

extra-number.web

Package Overview
Dependencies
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extra-number.web - npm Package Compare versions

Comparing version
2.3.25
to
2.3.26
+1
-1
index.js

@@ -1,1 +0,1 @@

!function(r){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).extra_number=r()}}((function(){return function r(n,t,e){function o(a,i){if(!t[a]){if(!n[a]){var f="function"==typeof require&&require;if(!i&&f)return f(a,!0);if(u)return u(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var h=t[a]={exports:{}};n[a][0].call(h.exports,(function(r){return o(n[a][1][r]||r)}),h,h.exports,r,n,t,e)}return t[a].exports}for(var u="function"==typeof require&&require,a=0;a<e.length;a++)o(e[a]);return o}({1:[function(r,n,t){"use strict";function e(r,n,t){return Math.min(Math.max(r,n),t)}function o(r,n,t){return(r-n)/(t-n)}function u(r,n,t,e,o){return e+(r-n)/(t-n)*(o-e)}function a(r,n){return 0==(1&n)?Math.pow(r,1/n):Math.sign(r)*Math.pow(Math.abs(r),1/n)}function i(r,n=Math.E){return Math.log(r)/Math.log(n)}function f(r){r=Math.abs(r);for(var n=[],t=1;t<r;t++)r%t==0&&n.push(t);return n}function c(r){if((r=Math.abs(r))<=1)return 0;if(r<=3)return r;if(r%2==0)return 2;if(r%3==0)return 3;for(var n=6,t=Math.sqrt(r)+1;n<=t;n+=6){if(r%(n-1)==0)return n-1;if(r%(n+1)==0)return n+1}return r}function h(r){var n=0;if((r=Math.abs(r))<=1)return 0;if(r<=3)return r;for(;r%2==0;n=2)r/=2;for(;r%3==0;n=3)r/=3;for(var t=6,e=Math.sqrt(r)+1;r>1&&t<=e;t+=6){for(;r%(t-1)==0;n=t-1)r/=t-1;for(;r%(t+1)==0;n=t+1)r/=t+1}return r<=1?n:r}function l(r,n,t){if(n%t!=0)return n;do{n/=t}while(n%t==0);return r.push(t),n}function s(r,n,t){if(n%t!=0)return n;var e=0;do{n/=t,++e}while(n%t==0);return r.push([t,e]),n}function M(...r){for(var n=r[0]||1,t=1,e=r.length;t<e;t++)n=m(n,r[t]);return n}function m(r,n){for(;0!==n;){var t=n;n=r%n,r=t}return r}function v(...r){var n=0;for(var t of r)n+=t;return n}function p(...r){var n=1;for(var t of r)n*=t;return n}function g(...r){return 0===r.length?0:v(...r)/r.length}function d(...r){var n=r.length,t=0;for(var e of r)t+=e*e;return Math.sqrt(t/n)}const b=["I","IV","V","IX","X","XL","L","XC","C","CD","D","CM","M"],w=[1,4,5,9,10,40,50,90,100,400,500,900,1e3];function x(r){for(var n=b.length-1,t=r.search(/^\s*-/)>=0,e=0,o=0,u=(r=r.replace(/\W/g,"").toUpperCase()).length;o<u;o+=b[n].length){for(;n>=0&&r.substring(o,o+b[n].length)!==b[n];)--n;if(n<0)break;e+=w[n]}return t?-e:e}function q(r){for(var n=r<0?"-":"",t=(r=Math.abs(r),b.length-1);t>=0;--t)for(;r>=w[t];)r-=w[t],n+=b[t];return n}t.aliquotParts=f,t.aliquotSum=function(r){r=Math.abs(r);for(var n=0,t=0;t<r;t++)r%t==0&&(n+=t);return n},t.arithmeticMean=g,t.binomial=function r(n,t){if(t<0||t>Math.abs(n))return 0;if(n<0)return Math.pow(-1,t)*r(-n,t);t=t>n-t?n-t:t;for(var e=1,o=1;o<=t;o++,n--)e*=n/o;return e},t.ceil=function(r,n=1){return Math.ceil(r/n)*n},t.ceilDiv=function(r,n){return Math.ceil(r/n)},t.clamp=e,t.compare=function(r,n){return r-n},t.constrain=e,t.cubicMean=function(...r){var n=r.length,t=0;for(var e of r)t+=e**3;return Math.cbrt(t/n)},t.degrees=function(r){return r*(180/Math.PI)},t.factorial=function(r,n=0){if(r<0)return 0;for(var t=n+1,e=1;t<=r;t++)e*=t;return e},t.floor=function(r,n=1){return Math.floor(r/n)*n},t.floorDiv=function(r,n){return Math.floor(r/n)},t.fromRoman=x,t.fromRomanNumerals=x,t.gcd=M,t.geometricMean=function(...r){var n=r.length;return a(p(...r),n)},t.greatestPrimeFactor=h,t.harmonicMean=function(...r){var n=r.length,t=p(...r),e=0;for(var o of r)e+=t/o;return n*t/e},t.hcf=M,t.is=function(r){return"number"==typeof r},t.isPow=function(r,n){if(0===n)return 0===r;var t=i(Math.abs(r),Math.abs(n));return t===Math.floor(t)&&(r<0?n<0&&1==(1&t):n>0||0==(1&t))},t.isPrime=function(r){return 0!==r&&c(r)===Math.abs(r)},t.lcm=function(...r){for(var n=r[0]||1,t=1,e=r.length;t<e;t++)n=n*r[t]/m(n,r[t]);return n},t.leastPrimeFactor=c,t.lerp=function(r,n,t){return r+t*(n-r)},t.log=i,t.map=u,t.maxPrimeFactor=h,t.mean=g,t.median=function(...r){if(0===r.length)return 0;r.sort(((r,n)=>r-n));var n=r.length>>1;return 1==(1&r.length)?r[n]:(r[n-1]+r[n])/2},t.minPrimeFactor=c,t.mod=function(r,n){return r-n*Math.floor(r/n)},t.modes=function(...r){r.sort(((r,n)=>r-n));var n=function(r){for(var n=Math.min(r.length,1),t=n,e=1,o=r.length;e<o;e++)r[e-1]===r[e]?n++:(t=Math.max(t,n),n=1);return Math.max(t,n)}(r);return function(r,n){var t=[];n--;for(var e=0,o=r.length-n;e<o;e++)r[e]===r[e+n]&&t.push(r[e+=n]);return t}(r,n)},t.modp=function(r,n){return r-Math.abs(n)*Math.floor(r/Math.abs(n))},t.multinomial=function(...r){for(var n=v(...r),t=1,e=0,o=0,u=r.length;e<u;)o<=0?o=r[e++]:t*=n--/o--;return t},t.nextPow=function(r,n){if(r<=0)return 1;var t=Math.ceil(Math.log(r)/Math.log(n));return Math.pow(n,t)},t.norm=o,t.normalize=o,t.prevPow=function(r,n){if(r<=1)return 0;var t=Math.floor(Math.log(r)/Math.log(n));return Math.pow(n,t)},t.primeExponentials=function(r){var n=[];if((r=Math.abs(r))<=1)return[];if(r<=3)return[[r,1]];r=s(n,r,2),r=s(n,r,3);for(var t=6,e=Math.sqrt(r)+1;r>1&&t<=e;t+=6)r=s(n,r,t-1),r=s(n,r,t+1);return r>1&&n.push([r,1]),n},t.primeFactors=function(r){var n=[];if((r=Math.abs(r))<=1)return[];if(r<=3)return[r];r=l(n,r,2),r=l(n,r,3);for(var t=6,e=Math.sqrt(r)+1;r>1&&t<=e;t+=6)r=l(n,r,t-1),r=l(n,r,t+1);return r>1&&n.push(r),n},t.product=p,t.properDivisors=f,t.quadriaticMean=d,t.radians=function(r){return r*(Math.PI/180)},t.range=function(...r){return[Math.min(...r),Math.max(...r)]},t.rem=function(r,n){return r%n},t.remap=u,t.root=a,t.rootMeanSquare=d,t.round=function(r,n=1){return Math.round(r/n)*n},t.roundDiv=function(r,n){return Math.round(r/n)},t.significantDigits=function(r){return r.toExponential().replace(/e[\+\-0-9]*$/,"").replace(/^0\.?0*|\./,"").length},t.sum=v,t.toRoman=q,t.toRomanNumerals=q,t.variance=function(...r){if(0===r.length)return 0;var n=g(...r),t=0;for(var e of r)t+=(e-n)**2;return t/r.length}},{}]},{},[1])(1)}));
!function(r){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).extra_number=r()}}((function(){return function r(n,t,e){function o(a,i){if(!t[a]){if(!n[a]){var f="function"==typeof require&&require;if(!i&&f)return f(a,!0);if(u)return u(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var h=t[a]={exports:{}};n[a][0].call(h.exports,(function(r){return o(n[a][1][r]||r)}),h,h.exports,r,n,t,e)}return t[a].exports}for(var u="function"==typeof require&&require,a=0;a<e.length;a++)o(e[a]);return o}({1:[function(r,n,t){"use strict";function e(r,n,t){return Math.min(Math.max(r,n),t)}function o(r,n,t){return(r-n)/(t-n)}function u(r,n,t,e,o){return e+(r-n)/(t-n)*(o-e)}function a(r,n){return 1&n?Math.sign(r)*Math.pow(Math.abs(r),1/n):Math.pow(r,1/n)}function i(r,n=Math.E){return Math.log(r)/Math.log(n)}function f(r){r=Math.abs(r);for(var n=[],t=1;t<r;t++)r%t==0&&n.push(t);return n}function c(r){if((r=Math.abs(r))<=1)return 0;if(r<=3)return r;if(r%2==0)return 2;if(r%3==0)return 3;for(var n=6,t=Math.sqrt(r)+1;n<=t;n+=6){if(r%(n-1)==0)return n-1;if(r%(n+1)==0)return n+1}return r}function h(r){var n=0;if((r=Math.abs(r))<=1)return 0;if(r<=3)return r;for(;r%2==0;n=2)r/=2;for(;r%3==0;n=3)r/=3;for(var t=6,e=Math.sqrt(r)+1;r>1&&t<=e;t+=6){for(;r%(t-1)==0;n=t-1)r/=t-1;for(;r%(t+1)==0;n=t+1)r/=t+1}return r<=1?n:r}function l(r,n,t){if(n%t!=0)return n;do{n/=t}while(n%t==0);return r.push(t),n}function s(r,n,t){if(n%t!=0)return n;var e=0;do{n/=t,++e}while(n%t==0);return r.push([t,e]),n}function M(...r){for(var n=r[0]||1,t=1,e=r.length;t<e;t++)n=m(n,r[t]);return n}function m(r,n){for(;0!==n;){var t=n;n=r%n,r=t}return r}function v(...r){var n=0;for(var t of r)n+=t;return n}function p(...r){var n=1;for(var t of r)n*=t;return n}function g(...r){return 0===r.length?0:v(...r)/r.length}function d(...r){var n=r.length,t=0;for(var e of r)t+=e*e;return Math.sqrt(t/n)}const b=["I","IV","V","IX","X","XL","L","XC","C","CD","D","CM","M"],w=[1,4,5,9,10,40,50,90,100,400,500,900,1e3];function x(r){for(var n=b.length-1,t=r.search(/^\s*-/)>=0,e=0,o=0,u=(r=r.replace(/\W/g,"").toUpperCase()).length;o<u;o+=b[n].length){for(;n>=0&&r.substring(o,o+b[n].length)!==b[n];)--n;if(n<0)break;e+=w[n]}return t?-e:e}function q(r){for(var n=r<0?"-":"",t=(r=Math.abs(r),b.length-1);t>=0;--t)for(;r>=w[t];)r-=w[t],n+=b[t];return n}t.aliquotParts=f,t.aliquotSum=function(r){r=Math.abs(r);for(var n=0,t=0;t<r;t++)r%t==0&&(n+=t);return n},t.arithmeticMean=g,t.binomial=function r(n,t){if(t<0||t>Math.abs(n))return 0;if(n<0)return Math.pow(-1,t)*r(-n,t);t=t>n-t?n-t:t;for(var e=1,o=1;o<=t;o++,n--)e*=n/o;return e},t.ceil=function(r,n=1){return Math.ceil(r/n)*n},t.ceilDiv=function(r,n){return Math.ceil(r/n)},t.clamp=e,t.compare=function(r,n){return r-n},t.constrain=e,t.cubicMean=function(...r){var n=r.length,t=0;for(var e of r)t+=e**3;return Math.cbrt(t/n)},t.degrees=function(r){return r*(180/Math.PI)},t.factorial=function(r,n=0){if(r<0)return 0;for(var t=n+1,e=1;t<=r;t++)e*=t;return e},t.floor=function(r,n=1){return Math.floor(r/n)*n},t.floorDiv=function(r,n){return Math.floor(r/n)},t.fromRoman=x,t.fromRomanNumerals=x,t.gcd=M,t.geometricMean=function(...r){var n=r.length;return a(p(...r),n)},t.greatestPrimeFactor=h,t.harmonicMean=function(...r){var n=r.length,t=p(...r),e=0;for(var o of r)e+=t/o;return n*t/e},t.hcf=M,t.is=function(r){return"number"==typeof r},t.isPow=function(r,n){if(0===n)return 0===r;var t=i(Math.abs(r),Math.abs(n));return t===Math.floor(t)&&(r<0?n<0&&!(1&~t):n>0||!(1&t))},t.isPrime=function(r){return 0!==r&&c(r)===Math.abs(r)},t.lcm=function(...r){for(var n=r[0]||1,t=1,e=r.length;t<e;t++)n=n*r[t]/m(n,r[t]);return n},t.leastPrimeFactor=c,t.lerp=function(r,n,t){return r+t*(n-r)},t.log=i,t.map=u,t.maxPrimeFactor=h,t.mean=g,t.median=function(...r){if(0===r.length)return 0;r.sort(((r,n)=>r-n));var n=r.length>>1;return 1&~r.length?(r[n-1]+r[n])/2:r[n]},t.minPrimeFactor=c,t.mod=function(r,n){return r-n*Math.floor(r/n)},t.modes=function(...r){r.sort(((r,n)=>r-n));var n=function(r){for(var n=Math.min(r.length,1),t=n,e=1,o=r.length;e<o;e++)r[e-1]===r[e]?n++:(t=Math.max(t,n),n=1);return Math.max(t,n)}(r);return function(r,n){var t=[];n--;for(var e=0,o=r.length-n;e<o;e++)r[e]===r[e+n]&&t.push(r[e+=n]);return t}(r,n)},t.modp=function(r,n){return r-Math.abs(n)*Math.floor(r/Math.abs(n))},t.multinomial=function(...r){for(var n=v(...r),t=1,e=0,o=0,u=r.length;e<u;)o<=0?o=r[e++]:t*=n--/o--;return t},t.nextPow=function(r,n){if(r<=0)return 1;var t=Math.ceil(Math.log(r)/Math.log(n));return Math.pow(n,t)},t.norm=o,t.normalize=o,t.prevPow=function(r,n){if(r<=1)return 0;var t=Math.floor(Math.log(r)/Math.log(n));return Math.pow(n,t)},t.primeExponentials=function(r){var n=[];if((r=Math.abs(r))<=1)return[];if(r<=3)return[[r,1]];r=s(n,r,2),r=s(n,r,3);for(var t=6,e=Math.sqrt(r)+1;r>1&&t<=e;t+=6)r=s(n,r,t-1),r=s(n,r,t+1);return r>1&&n.push([r,1]),n},t.primeFactors=function(r){var n=[];if((r=Math.abs(r))<=1)return[];if(r<=3)return[r];r=l(n,r,2),r=l(n,r,3);for(var t=6,e=Math.sqrt(r)+1;r>1&&t<=e;t+=6)r=l(n,r,t-1),r=l(n,r,t+1);return r>1&&n.push(r),n},t.product=p,t.properDivisors=f,t.quadriaticMean=d,t.radians=function(r){return r*(Math.PI/180)},t.range=function(...r){return[Math.min(...r),Math.max(...r)]},t.rem=function(r,n){return r%n},t.remap=u,t.root=a,t.rootMeanSquare=d,t.round=function(r,n=1){return Math.round(r/n)*n},t.roundDiv=function(r,n){return Math.round(r/n)},t.significantDigits=function(r){return r.toExponential().replace(/e[\+\-0-9]*$/,"").replace(/^0\.?0*|\./,"").length},t.sum=v,t.toRoman=q,t.toRomanNumerals=q,t.variance=function(...r){if(0===r.length)return 0;var n=g(...r),t=0;for(var e of r)t+=(e-n)**2;return t/r.length}},{}]},{},[1])(1)}));

@@ -1,1 +0,1 @@

function is(r){return"number"==typeof r}function significantDigits(r){return r.toExponential().replace(/e[\+\-0-9]*$/,"").replace(/^0\.?0*|\./,"").length}function compare(r,t){return r-t}function floor(r,t=1){return Math.floor(r/t)*t}function ceil(r,t=1){return Math.ceil(r/t)*t}function round(r,t=1){return Math.round(r/t)*t}function floorDiv(r,t){return Math.floor(r/t)}function ceilDiv(r,t){return Math.ceil(r/t)}function roundDiv(r,t){return Math.round(r/t)}function rem(r,t){return r%t}function mod(r,t){return r-t*Math.floor(r/t)}function modp(r,t){return r-Math.abs(t)*Math.floor(r/Math.abs(t))}function constrain(r,t,n){return Math.min(Math.max(r,t),n)}function normalize(r,t,n){return(r-t)/(n-t)}function remap(r,t,n,a,o){return a+(r-t)/(n-t)*(o-a)}function lerp(r,t,n){return r+n*(t-r)}function isPow(r,t){if(0===t)return 0===r;var n=log(Math.abs(r),Math.abs(t));return n===Math.floor(n)&&(r<0?t<0&&1==(1&n):t>0||0==(1&n))}function prevPow(r,t){if(r<=1)return 0;var n=Math.floor(Math.log(r)/Math.log(t));return Math.pow(t,n)}function nextPow(r,t){if(r<=0)return 1;var n=Math.ceil(Math.log(r)/Math.log(t));return Math.pow(t,n)}function root(r,t){return 0==(1&t)?Math.pow(r,1/t):Math.sign(r)*Math.pow(Math.abs(r),1/t)}function log(r,t=Math.E){return Math.log(r)/Math.log(t)}function properDivisors(r){r=Math.abs(r);for(var t=[],n=1;n<r;n++)r%n==0&&t.push(n);return t}function aliquotSum(r){r=Math.abs(r);for(var t=0,n=0;n<r;n++)r%n==0&&(t+=n);return t}function minPrimeFactor(r){if((r=Math.abs(r))<=1)return 0;if(r<=3)return r;if(r%2==0)return 2;if(r%3==0)return 3;for(var t=6,n=Math.sqrt(r)+1;t<=n;t+=6){if(r%(t-1)==0)return t-1;if(r%(t+1)==0)return t+1}return r}function maxPrimeFactor(r){var t=0;if((r=Math.abs(r))<=1)return 0;if(r<=3)return r;for(;r%2==0;t=2)r/=2;for(;r%3==0;t=3)r/=3;for(var n=6,a=Math.sqrt(r)+1;r>1&&n<=a;n+=6){for(;r%(n-1)==0;t=n-1)r/=n-1;for(;r%(n+1)==0;t=n+1)r/=n+1}return r<=1?t:r}function primeFactors(r){var t=[];if((r=Math.abs(r))<=1)return[];if(r<=3)return[r];r=pushPrimeFactorTo$(t,r,2),r=pushPrimeFactorTo$(t,r,3);for(var n=6,a=Math.sqrt(r)+1;r>1&&n<=a;n+=6)r=pushPrimeFactorTo$(t,r,n-1),r=pushPrimeFactorTo$(t,r,n+1);return r>1&&t.push(r),t}function pushPrimeFactorTo$(r,t,n){if(t%n!=0)return t;do{t/=n}while(t%n==0);return r.push(n),t}function primeExponentials(r){var t=[];if((r=Math.abs(r))<=1)return[];if(r<=3)return[[r,1]];r=pushPrimeExponentialTo$(t,r,2),r=pushPrimeExponentialTo$(t,r,3);for(var n=6,a=Math.sqrt(r)+1;r>1&&n<=a;n+=6)r=pushPrimeExponentialTo$(t,r,n-1),r=pushPrimeExponentialTo$(t,r,n+1);return r>1&&t.push([r,1]),t}function pushPrimeExponentialTo$(r,t,n){if(t%n!=0)return t;var a=0;do{t/=n,++a}while(t%n==0);return r.push([n,a]),t}function isPrime(r){return 0!==r&&minPrimeFactor(r)===Math.abs(r)}function gcd(...r){for(var t=r[0]||1,n=1,a=r.length;n<a;n++)t=gcdPair(t,r[n]);return t}function gcdPair(r,t){for(;0!==t;){var n=t;t=r%t,r=n}return r}function lcm(...r){for(var t=r[0]||1,n=1,a=r.length;n<a;n++)t=t*r[n]/gcdPair(t,r[n]);return t}function factorial(r,t=0){if(r<0)return 0;for(var n=t+1,a=1;n<=r;n++)a*=n;return a}function binomial(r,t){if(t<0||t>Math.abs(r))return 0;if(r<0)return Math.pow(-1,t)*binomial(-r,t);t=t>r-t?r-t:t;for(var n=1,a=1;a<=t;a++,r--)n*=r/a;return n}function multinomial(...r){for(var t=sum(...r),n=1,a=0,o=0,e=r.length;a<e;)o<=0?o=r[a++]:n*=t--/o--;return n}function degrees(r){return r*(180/Math.PI)}function radians(r){return r*(Math.PI/180)}function sum(...r){var t=0;for(var n of r)t+=n;return t}function product(...r){var t=1;for(var n of r)t*=n;return t}function median(...r){if(0===r.length)return 0;r.sort(((r,t)=>r-t));var t=r.length>>1;return 1==(1&r.length)?r[t]:(r[t-1]+r[t])/2}function modes(...r){return r.sort(((r,t)=>r-t)),getRepeats(r,maxRepeat(r))}function maxRepeat(r){for(var t=Math.min(r.length,1),n=t,a=1,o=r.length;a<o;a++)r[a-1]===r[a]?t++:(n=Math.max(n,t),t=1);return Math.max(n,t)}function getRepeats(r,t){var n=[];t--;for(var a=0,o=r.length-t;a<o;a++)r[a]===r[a+t]&&n.push(r[a+=t]);return n}function range(...r){return[Math.min(...r),Math.max(...r)]}function variance(...r){if(0===r.length)return 0;var t=arithmeticMean(...r),n=0;for(var a of r)n+=(a-t)**2;return n/r.length}function arithmeticMean(...r){return 0===r.length?0:sum(...r)/r.length}function geometricMean(...r){var t=r.length;return root(product(...r),t)}function harmonicMean(...r){var t=r.length,n=product(...r),a=0;for(var o of r)a+=n/o;return t*n/a}function quadriaticMean(...r){var t=r.length,n=0;for(var a of r)n+=a*a;return Math.sqrt(n/t)}function cubicMean(...r){var t=r.length,n=0;for(var a of r)n+=a**3;return Math.cbrt(n/t)}const ROMAN_SYMBOLS=["I","IV","V","IX","X","XL","L","XC","C","CD","D","CM","M"],ROMAN_VALUES=[1,4,5,9,10,40,50,90,100,400,500,900,1e3];function fromRomanNumerals(r){for(var t=ROMAN_SYMBOLS.length-1,n=r.search(/^\s*-/)>=0,a=0,o=0,e=(r=r.replace(/\W/g,"").toUpperCase()).length;o<e;o+=ROMAN_SYMBOLS[t].length){for(;t>=0&&r.substring(o,o+ROMAN_SYMBOLS[t].length)!==ROMAN_SYMBOLS[t];)--t;if(t<0)break;a+=ROMAN_VALUES[t]}return n?-a:a}function toRomanNumerals(r){for(var t=r<0?"-":"",n=(r=Math.abs(r),ROMAN_SYMBOLS.length-1);n>=0;--n)for(;r>=ROMAN_VALUES[n];)r-=ROMAN_VALUES[n],t+=ROMAN_SYMBOLS[n];return t}export{properDivisors as aliquotParts,aliquotSum,arithmeticMean,binomial,ceil,ceilDiv,constrain as clamp,compare,constrain,cubicMean,degrees,factorial,floor,floorDiv,fromRomanNumerals as fromRoman,fromRomanNumerals,gcd,geometricMean,maxPrimeFactor as greatestPrimeFactor,harmonicMean,gcd as hcf,is,isPow,isPrime,lcm,minPrimeFactor as leastPrimeFactor,lerp,log,remap as map,maxPrimeFactor,arithmeticMean as mean,median,minPrimeFactor,mod,modes,modp,multinomial,nextPow,normalize as norm,normalize,prevPow,primeExponentials,primeFactors,product,properDivisors,quadriaticMean,radians,range,rem,remap,root,quadriaticMean as rootMeanSquare,round,roundDiv,significantDigits,sum,toRomanNumerals as toRoman,toRomanNumerals,variance};
function is(r){return"number"==typeof r}function significantDigits(r){return r.toExponential().replace(/e[\+\-0-9]*$/,"").replace(/^0\.?0*|\./,"").length}function compare(r,t){return r-t}function floor(r,t=1){return Math.floor(r/t)*t}function ceil(r,t=1){return Math.ceil(r/t)*t}function round(r,t=1){return Math.round(r/t)*t}function floorDiv(r,t){return Math.floor(r/t)}function ceilDiv(r,t){return Math.ceil(r/t)}function roundDiv(r,t){return Math.round(r/t)}function rem(r,t){return r%t}function mod(r,t){return r-t*Math.floor(r/t)}function modp(r,t){return r-Math.abs(t)*Math.floor(r/Math.abs(t))}function constrain(r,t,n){return Math.min(Math.max(r,t),n)}function normalize(r,t,n){return(r-t)/(n-t)}function remap(r,t,n,a,o){return a+(r-t)/(n-t)*(o-a)}function lerp(r,t,n){return r+n*(t-r)}function isPow(r,t){if(0===t)return 0===r;var n=log(Math.abs(r),Math.abs(t));return n===Math.floor(n)&&(r<0?t<0&&!(1&~n):t>0||!(1&n))}function prevPow(r,t){if(r<=1)return 0;var n=Math.floor(Math.log(r)/Math.log(t));return Math.pow(t,n)}function nextPow(r,t){if(r<=0)return 1;var n=Math.ceil(Math.log(r)/Math.log(t));return Math.pow(t,n)}function root(r,t){return 1&t?Math.sign(r)*Math.pow(Math.abs(r),1/t):Math.pow(r,1/t)}function log(r,t=Math.E){return Math.log(r)/Math.log(t)}function properDivisors(r){r=Math.abs(r);for(var t=[],n=1;n<r;n++)r%n==0&&t.push(n);return t}function aliquotSum(r){r=Math.abs(r);for(var t=0,n=0;n<r;n++)r%n==0&&(t+=n);return t}function minPrimeFactor(r){if((r=Math.abs(r))<=1)return 0;if(r<=3)return r;if(r%2==0)return 2;if(r%3==0)return 3;for(var t=6,n=Math.sqrt(r)+1;t<=n;t+=6){if(r%(t-1)==0)return t-1;if(r%(t+1)==0)return t+1}return r}function maxPrimeFactor(r){var t=0;if((r=Math.abs(r))<=1)return 0;if(r<=3)return r;for(;r%2==0;t=2)r/=2;for(;r%3==0;t=3)r/=3;for(var n=6,a=Math.sqrt(r)+1;r>1&&n<=a;n+=6){for(;r%(n-1)==0;t=n-1)r/=n-1;for(;r%(n+1)==0;t=n+1)r/=n+1}return r<=1?t:r}function primeFactors(r){var t=[];if((r=Math.abs(r))<=1)return[];if(r<=3)return[r];r=pushPrimeFactorTo$(t,r,2),r=pushPrimeFactorTo$(t,r,3);for(var n=6,a=Math.sqrt(r)+1;r>1&&n<=a;n+=6)r=pushPrimeFactorTo$(t,r,n-1),r=pushPrimeFactorTo$(t,r,n+1);return r>1&&t.push(r),t}function pushPrimeFactorTo$(r,t,n){if(t%n!=0)return t;do{t/=n}while(t%n==0);return r.push(n),t}function primeExponentials(r){var t=[];if((r=Math.abs(r))<=1)return[];if(r<=3)return[[r,1]];r=pushPrimeExponentialTo$(t,r,2),r=pushPrimeExponentialTo$(t,r,3);for(var n=6,a=Math.sqrt(r)+1;r>1&&n<=a;n+=6)r=pushPrimeExponentialTo$(t,r,n-1),r=pushPrimeExponentialTo$(t,r,n+1);return r>1&&t.push([r,1]),t}function pushPrimeExponentialTo$(r,t,n){if(t%n!=0)return t;var a=0;do{t/=n,++a}while(t%n==0);return r.push([n,a]),t}function isPrime(r){return 0!==r&&minPrimeFactor(r)===Math.abs(r)}function gcd(...r){for(var t=r[0]||1,n=1,a=r.length;n<a;n++)t=gcdPair(t,r[n]);return t}function gcdPair(r,t){for(;0!==t;){var n=t;t=r%t,r=n}return r}function lcm(...r){for(var t=r[0]||1,n=1,a=r.length;n<a;n++)t=t*r[n]/gcdPair(t,r[n]);return t}function factorial(r,t=0){if(r<0)return 0;for(var n=t+1,a=1;n<=r;n++)a*=n;return a}function binomial(r,t){if(t<0||t>Math.abs(r))return 0;if(r<0)return Math.pow(-1,t)*binomial(-r,t);t=t>r-t?r-t:t;for(var n=1,a=1;a<=t;a++,r--)n*=r/a;return n}function multinomial(...r){for(var t=sum(...r),n=1,a=0,o=0,e=r.length;a<e;)o<=0?o=r[a++]:n*=t--/o--;return n}function degrees(r){return r*(180/Math.PI)}function radians(r){return r*(Math.PI/180)}function sum(...r){var t=0;for(var n of r)t+=n;return t}function product(...r){var t=1;for(var n of r)t*=n;return t}function median(...r){if(0===r.length)return 0;r.sort(((r,t)=>r-t));var t=r.length>>1;return 1&~r.length?(r[t-1]+r[t])/2:r[t]}function modes(...r){return r.sort(((r,t)=>r-t)),getRepeats(r,maxRepeat(r))}function maxRepeat(r){for(var t=Math.min(r.length,1),n=t,a=1,o=r.length;a<o;a++)r[a-1]===r[a]?t++:(n=Math.max(n,t),t=1);return Math.max(n,t)}function getRepeats(r,t){var n=[];t--;for(var a=0,o=r.length-t;a<o;a++)r[a]===r[a+t]&&n.push(r[a+=t]);return n}function range(...r){return[Math.min(...r),Math.max(...r)]}function variance(...r){if(0===r.length)return 0;var t=arithmeticMean(...r),n=0;for(var a of r)n+=(a-t)**2;return n/r.length}function arithmeticMean(...r){return 0===r.length?0:sum(...r)/r.length}function geometricMean(...r){var t=r.length;return root(product(...r),t)}function harmonicMean(...r){var t=r.length,n=product(...r),a=0;for(var o of r)a+=n/o;return t*n/a}function quadriaticMean(...r){var t=r.length,n=0;for(var a of r)n+=a*a;return Math.sqrt(n/t)}function cubicMean(...r){var t=r.length,n=0;for(var a of r)n+=a**3;return Math.cbrt(n/t)}const ROMAN_SYMBOLS=["I","IV","V","IX","X","XL","L","XC","C","CD","D","CM","M"],ROMAN_VALUES=[1,4,5,9,10,40,50,90,100,400,500,900,1e3];function fromRomanNumerals(r){for(var t=ROMAN_SYMBOLS.length-1,n=r.search(/^\s*-/)>=0,a=0,o=0,e=(r=r.replace(/\W/g,"").toUpperCase()).length;o<e;o+=ROMAN_SYMBOLS[t].length){for(;t>=0&&r.substring(o,o+ROMAN_SYMBOLS[t].length)!==ROMAN_SYMBOLS[t];)--t;if(t<0)break;a+=ROMAN_VALUES[t]}return n?-a:a}function toRomanNumerals(r){for(var t=r<0?"-":"",n=(r=Math.abs(r),ROMAN_SYMBOLS.length-1);n>=0;--n)for(;r>=ROMAN_VALUES[n];)r-=ROMAN_VALUES[n],t+=ROMAN_SYMBOLS[n];return t}export{properDivisors as aliquotParts,aliquotSum,arithmeticMean,binomial,ceil,ceilDiv,constrain as clamp,compare,constrain,cubicMean,degrees,factorial,floor,floorDiv,fromRomanNumerals as fromRoman,fromRomanNumerals,gcd,geometricMean,maxPrimeFactor as greatestPrimeFactor,harmonicMean,gcd as hcf,is,isPow,isPrime,lcm,minPrimeFactor as leastPrimeFactor,lerp,log,remap as map,maxPrimeFactor,arithmeticMean as mean,median,minPrimeFactor,mod,modes,modp,multinomial,nextPow,normalize as norm,normalize,prevPow,primeExponentials,primeFactors,product,properDivisors,quadriaticMean,radians,range,rem,remap,root,quadriaticMean as rootMeanSquare,round,roundDiv,significantDigits,sum,toRomanNumerals as toRoman,toRomanNumerals,variance};
MIT License
Copyright (c) 2018-23 Subhajit Sahu
Copyright (c) 2018-24 Subhajit Sahu

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

{
"name": "extra-number.web",
"version": "2.3.25",
"version": "2.3.26",
"description": "A number is a mathematical object used to count, measure, and label {web}.",

@@ -92,12 +92,12 @@ "sideEffects": false,

"devDependencies": {
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3",
"@types/jest": "^29.5.6",
"extra-build": "^2.2.43",
"extra-string": "^2.1.40",
"@rollup/plugin-commonjs": "^25.0.8",
"@rollup/plugin-node-resolve": "^15.3.0",
"@types/jest": "^29.5.13",
"extra-build": "^2.2.46",
"extra-string": "^2.1.42",
"jest": "^29.7.0",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-dts": "^6.1.0",
"ts-jest": "^29.1.1"
"rollup-plugin-dts": "^6.1.1",
"ts-jest": "^29.2.5"
}
}