JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 490
  • Score
    100M100P100Q80509F
  • License MIT

Randomly generate vehicle and user data for testing purposes

Package Exports

  • testing-data
  • testing-data/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (testing-data) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

This module generates basic user and vehicle data. The data can be used for testing purposes.

Installing

Using npm:

$ npm install testing-data --save-dev

Using yarn:

$ yarn add testing-data -D

Example

import { getVehicles, getPeople } from 'testing-data';

const vehicles = getVehicles()

/// getVehicles will return an array of vehicle objects. See example below.
  [
      {
        brand: 'Jaguar',
        model: 'F-TYPE',
        vin: 'SAJWA0HP2DM522159',
        engine: 'autogas',
        numberPlate: 'XE5607'
      }
    ]
*/

const people = getPeople()

/// getPeople will return an array of person object. See example below.
  [
      {
        firstName: 'Vinnie',
        lastName: 'Thomas',
        fullName: 'Vinnie Thomas',
        email: 'VinnieThomas@test.com',
        gender: male
        birthdate: '1981/09/28'
        age: 40,
        address: '1961 Bivve Circle',
        street: 'Kezu Boulevard',
        streetNumber: 23
        country: 'Italy',
        city: 'milan',
        zip: '42376'
      }
    ]
    
const company = getCompany()

/// getCompany will return a company object. See example below.
    {
      name: 'Equitable Resources Inc. 5862',
      address: '1636 Berwe Avenue',
      streetNumber: 76
      street: 'Kepi Mill',
      city: 'Munich',
      country: 'Germany',
      zip: '67957'
    }
    

Available Functions

People:

getFirstName({gender: 'male'}): arguments::gender 'male'|'female'|optional

getLastName() : arguments:: optional

getFullName({gender: 'male'}) : arguments::gender 'male'|'female'|optional

createEmail({firstName: 'female', lastName: 'test.com', domain: 'test.com' }) : arguments:: firstName optional, lastName optional, domain optional

createRandomEmail() : arguments:: optional

getMultipleEmails({quantity: 1, domain: 'test.com'}) : arguments:: quantity Number domain optional

getPerson({gender: 'male', domain: 'test.com', country: 'Germany'}) : arguments:: gender 'male'|'female'|optional , domain optional, country optional

getPeople({quantity: 1}) : arguments:: quantity Number

Vehicles:

getRandomVin() : arguments:: optional

getVehicle({brand: 'Honda'}) : arguments:: brand optional

getVehicles({quantity: 1}) : arguments:: quantity Number

Company:

getCompany() : arguments:: country optional