aboutsummaryrefslogtreecommitdiff
path: root/src/modules/finance
diff options
context:
space:
mode:
authorShinigami <[email protected]>2022-12-31 12:22:38 +0100
committerGitHub <[email protected]>2022-12-31 12:22:38 +0100
commit2d93e6f14a5ba976f87b71202bc4e011e38ee823 (patch)
tree09c569ac0aa920ba090667a938f67416134dca26 /src/modules/finance
parente296ff2d4f6f1aa56fe7c80722257bd0b316b30a (diff)
downloadfaker-2d93e6f14a5ba976f87b71202bc4e011e38ee823.tar.xz
faker-2d93e6f14a5ba976f87b71202bc4e011e38ee823.zip
chore: turn on padding-line-between-statements (#1691)
Diffstat (limited to 'src/modules/finance')
-rw-r--r--src/modules/finance/iban.ts1
-rw-r--r--src/modules/finance/index.ts8
2 files changed, 9 insertions, 0 deletions
diff --git a/src/modules/finance/iban.ts b/src/modules/finance/iban.ts
index 9b4780c5..2eb6fbba 100644
--- a/src/modules/finance/iban.ts
+++ b/src/modules/finance/iban.ts
@@ -1401,6 +1401,7 @@ const iban: Iban = {
for (let i = 0; i < digitStr.length; i++) {
m = (m * 10 + +digitStr[i]) % 97;
}
+
return m;
},
pattern10: ['01', '02', '03', '04', '05', '06', '07', '08', '09'],
diff --git a/src/modules/finance/index.ts b/src/modules/finance/index.ts
index 9c34faa2..bc540afc 100644
--- a/src/modules/finance/index.ts
+++ b/src/modules/finance/index.ts
@@ -12,6 +12,7 @@ export class FinanceModule {
if (name === 'constructor' || typeof this[name] !== 'function') {
continue;
}
+
this[name] = this[name].bind(this);
}
}
@@ -34,6 +35,7 @@ export class FinanceModule {
for (let i = 0; i < length; i++) {
template += '#';
}
+
length = null;
return this.faker.helpers.replaceSymbolWithNumber(template);
}
@@ -219,6 +221,7 @@ export class FinanceModule {
this.faker.definitions.finance.currency
)['symbol'];
}
+
return symbol;
}
@@ -292,6 +295,7 @@ export class FinanceModule {
const formats = this.faker.helpers.objectValue(localeFormat); // There could be multiple formats
format = this.faker.helpers.arrayElement(formats);
}
+
format = format.replace(/\//g, '');
return this.faker.helpers.replaceCreditCardSymbols(format);
}
@@ -338,6 +342,7 @@ export class FinanceModule {
if (length < 1) {
throw new FakerError('minimum length is 1');
}
+
return this.faker.string.numeric({ length, allowLeadingZeros: true });
}
@@ -409,10 +414,13 @@ export class FinanceModule {
s += this.faker.number.int(9);
}
}
+
c--;
}
+
s = s.substring(0, count);
}
+
let checksum: string | number =
98 - iban.mod97(iban.toDigitString(`${s}${ibanFormat.country}00`));