aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShinigami <[email protected]>2022-03-26 19:19:39 +0100
committerGitHub <[email protected]>2022-03-26 19:19:39 +0100
commit877ac76b2811c948c560fee4fa76908b142557d1 (patch)
tree977ec8f755f2b44f1a500dac8bbdd7c43d5d1bcf /src
parent81740ff1946d02587e7b72a81f9a5c7f015474c6 (diff)
downloadfaker-877ac76b2811c948c560fee4fa76908b142557d1.tar.xz
faker-877ac76b2811c948c560fee4fa76908b142557d1.zip
chore: replace substr with substring (#678)
Diffstat (limited to 'src')
-rw-r--r--src/fake.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fake.ts b/src/fake.ts
index 40f16aa7..d8cc6ff7 100644
--- a/src/fake.ts
+++ b/src/fake.ts
@@ -64,7 +64,7 @@ export class Fake {
// extract method name from between the {{ }} that we found
// for example: {{name.firstName}}
- const token = str.substr(start + 2, end - start - 2);
+ const token = str.substring(start + 2, end);
let method = token.replace('}}', '').replace('{{', '');
// console.log('method', method)