https://github.com/mbanq/dupe
Fake banking data for your front- or backend
https://github.com/mbanq/dupe
backend data datagenerator fake faker frontend javascript nodejs npm npm-package
Last synced: 8 months ago
JSON representation
Fake banking data for your front- or backend
- Host: GitHub
- URL: https://github.com/mbanq/dupe
- Owner: Mbanq
- Created: 2019-02-16T04:18:53.000Z (almost 7 years ago)
- Default Branch: develop
- Last Pushed: 2019-04-02T15:16:01.000Z (almost 7 years ago)
- Last Synced: 2025-05-01T11:39:57.880Z (9 months ago)
- Topics: backend, data, datagenerator, fake, faker, frontend, javascript, nodejs, npm, npm-package
- Language: JavaScript
- Size: 205 KB
- Stars: 3
- Watchers: 5
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `dupe` your front- or backend
[](https://app.codeship.com/projects/327760) [](https://badge.fury.io/js/%40mbanq%2Fdupe)
Mbanq uses `dupe` to create fake data that can be used during software
development or for running the tests.
## Usage
### Node.js
```js
const dupe = require('@mbanq/dupe');
const randomName = dupe.name.full() // pkha romdol
const randomEmail = dupe.name.email() // pkha@romdol.com
const randomText = dupe.text.sentence()
```
## Methods
- text
- `sentence(n)` - creates a random sentence with `n` words in it. Default
value of `n` is 5
- name
- `first()` - returns a random first name
- `last()` - returns a random last name
- `full()` - returns a random full name in the format `first(), last()`
- `email()` - returns a random email addres. Uses `first()`, `last()` and
a random domain extension
- location
- `country()` - returns a random country from the list of countries
- `city()` - returns a random city from the list of cities
- finance
- `amount(max, precision)` - returns a random amount <= `max` with the
provided `precision`. Default `max = 999999`, `precision = 2`. Returns
a `String`
- `transactionType()` - returns a random transaction type from the list
- `accountNumber(size)` - returns an 8 digit account number per default. Can return up to 16 digit long number.
- `accountType()` - returns a random account type from the list.
- `randomInt()`- returns a random Integer between a `min` and a `max`
- `cardNumber()` - returns a credit card number
## Test
```bash
npm i
npm test
```