Coder Social home page Coder Social logo

bunlong / next-faker Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 148 KB

React hook for generating fake data for testing and development.

Home Page: https://next-faker.github.io

License: MIT License

JavaScript 45.00% TypeScript 10.61% CSS 27.87% HTML 16.52%
faker faker-generator fakerjs next nextjs react reactjs react-faker

next-faker's Introduction

next-faker

React hook for generating fake data for testing and development.

NPM JavaScript Style Guide

๐Ÿ”ง Install

next-faker is available on npm. It can be installed with the following command:

npm install next-faker --save-dev

next-faker is available on yarn as well. It can be installed with the following command:

yarn add next-faker --dev

๐ŸŽ Features

  • ๐Ÿ’Œ Addresses - Generate valid looking Addresses, Zip Codes, Street Names, States, and Countries.

๐Ÿ’ก Usage

import { useFaker } from 'next-faker';

const Home = () => {
  const { address } = useFaker();

  return (
    <>
      {address.buildingNumber()}
    </>
  );
}

export default Home;

๐Ÿ’Ž Modules

An in-depth overview of the API methods is available in the documentation. The API covers the following modules:

Module Example Output
Address address.city() Lake Raoulfort
Animal animal.cat() Norwegian Forest Cat
Color color.rgb() #cdfcdc
Commerce commerce.product() Polo t-shirt
Company company.companyName() Zboncak and Sons
Database database.engine() MyISAM
Datatype datatype.uuid() 7b16dd12-935e-4acc-8381-b1e457bf0176

๐Ÿ“œ Changelog

Latest version 0.1.0 (2022-06-28):

  • API
    • Datatype: module to generate various primitive values and data types.

Details changes for each release are documented in the CHANGELOG.md.

โ— Issues

If you think any of the next-faker can be improved, please do open a PR with any updates and submit any issues. Also, I will continue to improve this, so you might want to watch/star this repository to revisit.

๐Ÿ’ช Contribution

We'd love to have your helping hand on contributions to next-faker by forking and sending a pull request!

Your contributions are heartily โ™ก welcome, recognized and appreciated. (โœฟโ— โ€ฟโ— )

How to contribute:

  • Open pull request with improvements
  • Discuss ideas in issues
  • Spread the word
  • Reach out with any feedback

๐Ÿ† Contributors

Bunlong
Bunlong

โš–๏ธ License

The MIT License License: MIT

next-faker's People

Contributors

bunlong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

next-faker's Issues

Animal API

Animal API

  • Bear
  • Bird
  • Cat
  • Cetacean
  • Cow
  • Crocodilia
  • Dog
  • Fish
  • Horse
  • Insect
  • Lion
  • Rabbit
  • Snake
  • Type

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.