npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dadi/autodata

v1.0.0

Published

Generate test data fom API collection schemas

Downloads

6

Readme

DADI API Autodata

Generate test data based on DADI API collection schemas

npm (scoped) coverage JavaScript Style Guide

Overview

Install

$ npm install @dadi/autodata --save-dev

Usage

var autodata = require('@dadi/autodata')
autodata.loadCollections(path.join(__dirname, '../workspace/collections'))

return autodata.create('book').then((fixture) => {
  console.log(fixture)
})

return autodata.createListOf('people', 2).then((fixture) => {
  console.log(fixture)
})

Test Data Formatters

address

Type|Format|Example ---|---|--- zipCode|{{address.zipCode}}|77497-0357 city|{{address.city}}|West Osbornebury cityPrefix|{{address.cityPrefix}}|South citySuffix|{{address.citySuffix}}|stad streetName|{{address.streetName}}|Marquardt Run streetAddress|{{address.streetAddress}}|500 Wilkinson Trail streetSuffix|{{address.streetSuffix}}|Roads streetPrefix|{{address.streetPrefix}}|a secondaryAddress|{{address.secondaryAddress}}|Suite 883 county|{{address.county}}|Cambridgeshire country|{{address.country}}|Oman countryCode|{{address.countryCode}}|AL state|{{address.state}}|Arizona stateAbbr|{{address.stateAbbr}}|NH latitude|{{address.latitude}}|-48.3898 longitude|{{address.longitude}}|164.8184

commerce

Type|Format|Example ---|---|--- color|{{commerce.color}}|pink department|{{commerce.department}}|Toys productName|{{commerce.productName}}|Awesome Concrete Tuna price|{{commerce.price}}|768.00 productAdjective|{{commerce.productAdjective}}|Licensed productMaterial|{{commerce.productMaterial}}|Wooden product|{{commerce.product}}|Soap

company

Type|Format|Example ---|---|--- suffixes|{{company.suffixes}}|["Inc", "and Sons", "LLC", "Group"] companyName|{{company.companyName}}|Cole - Tremblay companySuffix|{{company.companySuffix}}|and Sons catchPhrase|{{company.catchPhrase}}|Profit-focused background Graphical User Interface bs|{{company.bs}}|customized grow channels catchPhraseAdjective|{{company.catchPhraseAdjective}}|Innovative catchPhraseDescriptor|{{company.catchPhraseDescriptor}}|analyzing catchPhraseNoun|{{company.catchPhraseNoun}}|core bsAdjective|{{company.bsAdjective}}|seamless bsBuzz|{{company.bsBuzz}}|embrace bsNoun|{{company.bsNoun}}|mindshare

date

Type|Format|Example ---|---|--- past|{{date.past}}|Tue Dec 08 2015 18:26:08 GMT+1100 (AEDT) future|{{date.future}}|Wed Jan 11 2017 13:43:40 GMT+1100 (AEDT) between|{{date.between}}|Invalid Date recent|{{date.recent}}|Thu Aug 18 2016 06:54:06 GMT+1000 (AEST) month|{{date.month}}|January weekday|{{date.weekday}}|Friday

finance

Type|Format|Example ---|---|--- account|{{finance.account}}|42448607 accountName|{{finance.accountName}}|Money Market Account mask|{{finance.mask}}|7674 amount|{{finance.amount}}|555.00 transactionType|{{finance.transactionType}}|payment currencyCode|{{finance.currencyCode}}|RSD currencyName|{{finance.currencyName}}|Moroccan Dirham currencySymbol|{{finance.currencySymbol}}|Php bitcoinAddress|{{finance.bitcoinAddress}}|1ZGMT2RNR85BN3AWJIET7QR6SFJGNLVS

hacker

Type|Format|Example ---|---|--- abbreviation|{{hacker.abbreviation}}|COM adjective|{{hacker.adjective}}|multi-byte noun|{{hacker.noun}}|sensor verb|{{hacker.verb}}|input ingverb|{{hacker.ingverb}}|navigating phrase|{{hacker.phrase}}|generating the port won't do anything, we need to transmit the haptic IB bandwidth!

image

Type|Format|Example ---|---|--- image|{{image.image}}|http://lorempixel.com/640/480/city avatar|{{image.avatar}}|https://s3.amazonaws.com/uifaces/faces/twitter/ceekaytweet/128.jpg imageUrl|{{image.imageUrl}}|http://lorempixel.com/640/480 abstract|{{image.abstract}}|http://lorempixel.com/640/480/abstract animals|{{image.animals}}|http://lorempixel.com/640/480/animals business|{{image.business}}|http://lorempixel.com/640/480/business cats|{{image.cats}}|http://lorempixel.com/640/480/cats city|{{image.city}}|http://lorempixel.com/640/480/city food|{{image.food}}|http://lorempixel.com/640/480/food nightlife|{{image.nightlife}}|http://lorempixel.com/640/480/nightlife fashion|{{image.fashion}}|http://lorempixel.com/640/480/fashion people|{{image.people}}|http://lorempixel.com/640/480/people nature|{{image.nature}}|http://lorempixel.com/640/480/nature sports|{{image.sports}}|http://lorempixel.com/640/480/sports technics|{{image.technics}}|http://lorempixel.com/640/480/technics transport|{{image.transport}}|http://lorempixel.com/640/480/transport

internet

Type|Format|Example ---|---|--- avatar|{{internet.avatar}}|https://s3.amazonaws.com/uifaces/faces/twitter/brunodesign1206/128.jpg email|{{internet.email}}|[email protected] exampleEmail|{{internet.exampleEmail}}|[email protected] userName|{{internet.userName}}|Carmine_Gerhold46 protocol|{{internet.protocol}}|https url|{{internet.url}}|http://dewayne.name domainName|{{internet.domainName}}|marlee.com domainSuffix|{{internet.domainSuffix}}|org domainWord|{{internet.domainWord}}|jimmie ip|{{internet.ip}}|181.124.202.82 userAgent|{{internet.userAgent}}|"Mozilla/5.0 (Windows; U; Windows NT 6.2) AppleWebKit/538.2.0 (KHTML, like Gecko) Chrome/19.0.810.0 Safari/538.2.0" color|{{internet.color}}|#3e6c6e mac|{{internet.mac}}|9d:26:a6:ae:da:91 password|{{internet.password}}|2Dv2UnQECH7cRye

lorem

Type|Format|Example ---|---|--- word|{{lorem.word}}|maxime words|{{lorem.words}}|vitae quia provident sentence|{{lorem.sentence}}|Odio eos delectus velit non ut nihil molestiae nisi aut. sentences|{{lorem.sentences}}|Molestiae quis iure eligendi incidunt ad ipsum. Neque at dolore. Voluptatibus consequatur perspiciatis et aliquid laudantium. Adipisci eius odit. paragraph|{{lorem.paragraph}}|Ut corrupti aut illo eos similique modi tempore ea. Dolores eaque quas exercitationem tempore numquam et. Porro qui et adipisci magnam tenetur voluptatem dolorum. Assumenda dolor minima animi inventore facilis minima. Vel debitis dolore molestias quos vel eos omnis. Labore et explicabo quaerat. paragraphs|{{lorem.paragraphs}}|Vel veritatis perspiciatis vel in. Ad provident fugit velit cupiditate ut. Numquam qui error neque odio asperiores illum occaecati. Voluptas aut nisi quod maxime fuga a ad fugit facere. Eaque magnam minus mollitia mollitia et excepturi amet.\n \rVeritatis error quo repellat et. Error est eius rerum neque aliquid optio qui pariatur recusandae. Adipisci et vitae voluptatum pariatur enim error.\n \rExplicabo quidem laborum. Quod voluptas perspiciatis aliquid. Explicabo error sunt at illum perspiciatis veritatis totam consequatur nam. text|{{lorem.text}}|sit lines|{{lorem.lines}}|Suscipit aliquam sit nemo commodi incidunt.\nEum excepturi aliquid nisi et.\nDistinctio quaerat ut ea fuga eius rerum cum alias ut.\nAutem possimus a eum officia.

name

Type|Format|Example ---|---|--- firstName|{{name.firstName}}|Ernestina lastName|{{name.lastName}}|McCullough findName|{{name.findName}}|Adah Blanda jobTitle|{{name.jobTitle}}|Corporate Usability Designer prefix|{{name.prefix}}|Dr. suffix|{{name.suffix}}|I title|{{name.title}}|International Configuration Manager jobDescriptor|{{name.jobDescriptor}}|Human jobArea|{{name.jobArea}}|Operations jobType|{{name.jobType}}|Executive

phone

Type|Format|Example ---|---|--- phoneNumber|{{phone.phoneNumber}}|(808) 286-5628 phoneNumberFormat|{{phone.phoneNumberFormat}}|040-026-8581 phoneFormats|{{phone.phoneFormats}}|(####) ####-#####

random

Type|Format|Example ---|---|--- number|{{random.number}}|94343 arrayElement|{{random.arrayElement}}|a objectElement|{{random.objectElement}}|bar uuid|{{random.uuid}}|b7231381-ab1b-4704-81d8-c8a0763544af boolean|{{random.boolean}}|TRUE word|{{random.word}}|Concrete words|{{random.words}}|web-enabled Central image|{{random.image}}|http://lorempixel.com/640/480/technics locale|{{random.locale}}|it alphaNumeric|{{random.alphaNumeric}}|2

system

Type|Format|Example ---|---|--- fileName|{{system.fileName}}|multi_state.nml commonFileName|{{system.commonFileName}}|matrix_human.mp2 mimeType|{{system.mimeType}}|application/vnd.dm.delegation+xml commonFileType|{{system.commonFileType}}|image commonFileExt|{{system.commonFileExt}}|mp4 fileType|{{system.fileType}}|message fileExt|{{system.fileExt}}|wmz directoryPath|{{system.directoryPath}}|undefined filePath|{{system.filePath}}|undefined semver|{{system.semver}}|4.0.1