restart portfolio

This commit is contained in:
Tutur33
2023-12-05 18:45:50 +01:00
parent de25e0072a
commit 40db853637
1174 changed files with 21145 additions and 107608 deletions
+1 -1
View File
@@ -1 +1 @@
"use strict";var f=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var l=(i,e)=>{for(var r in e)f(i,r,{get:e[r],enumerable:!0})},x=(i,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of c(e))!h.call(i,t)&&t!==r&&f(i,t,{get:()=>e[t],enumerable:!(n=g(e,t))||n.enumerable});return i};var s=i=>x(f({},"__esModule",{value:!0}),i);var w={};l(w,{NumberModule:()=>d});module.exports=s(w);var u=require("../../errors/faker-error"),o=require("../../internal/bind-this-to-member-functions");class d{constructor(e){this.faker=e;(0,o.bindThisToMemberFunctions)(this)}int(e={}){typeof e=="number"&&(e={max:e});const{min:r=0,max:n=Number.MAX_SAFE_INTEGER}=e,t=Math.ceil(r),a=Math.floor(n);if(t===a)return t;if(a<t)throw n>=r?new u.FakerError(`No integer value between ${r} and ${n} found.`):new u.FakerError(`Max ${n} should be greater than min ${r}.`);const m=this.faker._randomizer.next();return Math.floor(m*(a+1-t)+t)}float(e={}){typeof e=="number"&&(e={max:e});const{min:r=0,max:n=1,precision:t}=e;if(n===r)return r;if(n<r)throw new u.FakerError(`Max ${n} should be greater than min ${r}.`);if(t!==void 0){if(t<=0)throw new u.FakerError("Precision should be greater than 0.");const m=1/t;return this.int({min:r*m,max:n*m})/m}return this.faker._randomizer.next()*(n-r)+r}binary(e={}){typeof e=="number"&&(e={max:e});const{min:r=0,max:n=1}=e;return this.int({max:n,min:r}).toString(2)}octal(e={}){typeof e=="number"&&(e={max:e});const{min:r=0,max:n=7}=e;return this.int({max:n,min:r}).toString(8)}hex(e={}){typeof e=="number"&&(e={max:e});const{min:r=0,max:n=15}=e;return this.int({max:n,min:r}).toString(16)}bigInt(e={}){var b,m;(typeof e=="bigint"||typeof e=="number"||typeof e=="string"||typeof e=="boolean")&&(e={max:e});const r=BigInt((b=e.min)!=null?b:0),n=BigInt((m=e.max)!=null?m:r+BigInt(999999999999999));if(n===r)return r;if(n<r)throw new u.FakerError(`Max ${n} should be larger then min ${r}.`);const t=n-r,a=BigInt(this.faker.string.numeric({length:t.toString(10).length,allowLeadingZeros:!0}))%(t+BigInt(1));return r+a}}0&&(module.exports={NumberModule});
"use strict";var f=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var l=(m,e)=>{for(var n in e)f(m,n,{get:e[n],enumerable:!0})},h=(m,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of x(e))!c.call(m,t)&&t!==n&&f(m,t,{get:()=>e[t],enumerable:!(r=g(e,t))||r.enumerable});return m};var s=m=>h(f({},"__esModule",{value:!0}),m);var w={};l(w,{NumberModule:()=>d});module.exports=s(w);var u=require("../../errors/faker-error"),o=require("../../internal/module-base");class d extends o.SimpleModuleBase{int(e={}){typeof e=="number"&&(e={max:e});const{min:n=0,max:r=Number.MAX_SAFE_INTEGER}=e,t=Math.ceil(n),a=Math.floor(r);if(t===a)return t;if(a<t)throw r>=n?new u.FakerError(`No integer value between ${n} and ${r} found.`):new u.FakerError(`Max ${r} should be greater than min ${n}.`);const i=this.faker._randomizer.next();return Math.floor(i*(a+1-t)+t)}float(e={}){typeof e=="number"&&(e={max:e});const{min:n=0,max:r=1,precision:t}=e;if(r===n)return n;if(r<n)throw new u.FakerError(`Max ${r} should be greater than min ${n}.`);if(t!==void 0){if(t<=0)throw new u.FakerError("Precision should be greater than 0.");const i=1/t;return this.int({min:n*i,max:r*i})/i}return this.faker._randomizer.next()*(r-n)+n}binary(e={}){typeof e=="number"&&(e={max:e});const{min:n=0,max:r=1}=e;return this.int({max:r,min:n}).toString(2)}octal(e={}){typeof e=="number"&&(e={max:e});const{min:n=0,max:r=7}=e;return this.int({max:r,min:n}).toString(8)}hex(e={}){typeof e=="number"&&(e={max:e});const{min:n=0,max:r=15}=e;return this.int({max:r,min:n}).toString(16)}bigInt(e={}){var b,i;(typeof e=="bigint"||typeof e=="number"||typeof e=="string"||typeof e=="boolean")&&(e={max:e});const n=BigInt((b=e.min)!=null?b:0),r=BigInt((i=e.max)!=null?i:n+BigInt(999999999999999));if(r===n)return n;if(r<n)throw new u.FakerError(`Max ${r} should be larger then min ${n}.`);const t=r-n,a=BigInt(this.faker.string.numeric({length:t.toString(10).length,allowLeadingZeros:!0}))%(t+BigInt(1));return n+a}}0&&(module.exports={NumberModule});