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

usefakedata

v0.0.9

Published

It allows you to generate random data for the types you specify, just like reading data from an API 🤘.

Downloads

4

Readme

useFakeData

It allows you to generate random data for the types you specify, just like reading data from an API 🤘.

const employeeList = useFakeData({
    fieldTypes: [
        {
            fieldName: 'id',
            dataType: dataTypes.id,
        },
        {
            fieldName: 'uuid',
            dataType: dataTypes.uuid,
        },
        {
            fieldName: 'firstName',
            dataType: dataTypes.firstName,
        },
        {
            fieldName: 'lastName',
            dataType: dataTypes.lastName,
        },
        {
            fieldName: 'birthDate',
            dataType: dataTypes.date,
            dataMinYear: 1980,
            dataMaxYear: 2000
        },
        {
            fieldName: 'ccardInfo',
            dataType: dataTypes.object,
            children: [
                {
                    fieldName: 'no',
                    dataType: dataTypes.ccardNo,
                }
            ]
        }
    ],
    dataLimit: 5
});

/*
Output:
[
   {
      "id":1,
      "uuid":"50dd5362-a347-4c0d-8e0a-3e7fb787f79b",
      "firstName":"Nairn",
      "lastName":"KING",
      "birthDate":"Thu Jun 23 1983 03:51:36 GMT+0300 (GMT+03:00)",
      "ccardInfo":{
         "no":"6565 4343 4343 34344"
      }
   },
   {
      "id":2,
      "uuid":"409aa470-410f-4b29-b116-93c85a32e1ed",
      "firstName":"T-Jay",
      "lastName":"GARDNER",
      "birthDate":"Tue Jan 31 1984 09:01:11 GMT+0300 (GMT+03:00)",
      "ccardInfo":{
         "no":"4853 4343 4343 34344"
      }
   },
   {
      "id":3,
      "uuid":"7443703b-a2ed-4f49-869c-b4b8f10c4f0f",
      "firstName":"Manson",
      "lastName":"PARKER",
      "birthDate":"Thu Feb 23 1995 11:21:12 GMT+0200 (GMT+03:00)",
      "ccardInfo":{
         "no":"4853 4343 4343 34344"
      }
   },
   {
      "id":4,
      "uuid":"6f7cff69-88a8-49c9-8826-82094f44dff0",
      "firstName":"Nate",
      "lastName":"ARMSTRONG",
      "birthDate":"Sat Dec 02 1995 04:55:15 GMT+0200 (GMT+03:00)",
      "ccardInfo":{
         "no":"6565 4343 4343 34344"
      }
   },
   {
      "id":5,
      "uuid":"fcc9bc0d-0bf8-425b-9171-7d66a4246aa6",
      "firstName":"Isa",
      "lastName":"WYNN",
      "birthDate":"Fri Oct 12 1984 12:00:03 GMT+0300 (GMT+03:00)",
      "ccardInfo":{
         "no":"4853 4343 4343 34344"
      }
   }
]
*/

#Field Types

| Field Type | Description | |------------|-------------| | id | | | uuid | | | firstName | | | lastName | |