1.1.0 • Published 10 months ago

swe-mock v1.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

mock-data-generator

Generate mock data in Swedish

Test

npm run test

Generate docs

npm run docs

Modules

Functions

address

address.city() ⇒ string

The name of a random city

Kind: static method of address

address.streetAddress() ⇒ string

A random street address

Kind: static method of address

address.zipCode() ⇒ string

A random five digit zip code

Kind: static method of address

date

date~randomDate(start, end) ⇒ Date

Random date

Kind: inner method of date

ParamTypeDefaultDescription
startDate | String | Number0Start date
endDate | String | NumberDate.now()End date

name

name~firstName() ⇒ string

A random first name

Kind: inner method of name

name~lastName() ⇒ string

A random last name

Kind: inner method of name

name~name() ⇒ string

A first name and a last name

Kind: inner method of name

boolean() ⇒ boolean

True or false

Kind: global function

email(options) ⇒ string

A random lower case email address

Kind: global function

ParamTypeDefaultDescription
optionsObject{}Your preferred email details
options.prefixstringCustomize the left side of the @-sign
options.domainstringCustomize the right side of the @-sign

lorem(n) ⇒ String

Lorem ipsum sentences

Kind: global function

ParamTypeDefaultDescription
nnumber1Number of sentences

number(min, max) ⇒ number

Generates a random number

Kind: global function

ParamTypeDefault
minnumber0
maxnumbermin+10

phone() ⇒ string

A random phone number

Kind: global function

1.1.0

10 months ago

1.0.0

2 years ago