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

databitjs

v1.1.2

Published

dataBit js is a false data generation library to facilitate day-to-day development easily and simply

Downloads

2

Readme

🎲 | databit js

🇺🇲 Inglês

🇧🇷 Português

Inicio

Uma maneira simplificada de gerar dados fictícios massivos com base em um esquema no objeto json criado 🎲


Instalação

Instale as dependências com os seguintes comandos:

npm i databitjs

Tipos de dados

  • username - Cria nomes aleatórios
  • text - Texto pequeno
  • shortText - Texto curto
  • longText - Texto longo
  • boolean - Valor verdadeiro ou falso
  • int - Numero inteiro
  • float - Numero em ponto flutuante
  • date - Data atual
  • color - Gera uma cor em RGB
  • email - Gera um e-mail aleatório
  • telephone - Numero de telefone

Exemplos de como utilizar

A função dataBit() recebe dois parâmetros

Primeiro parâmetros é o modelo que você deseja e o segundo parâmetro é de quantos objetos/json vai criar como no exemplo abaixo vai gerar dois objetos

const dataBit = require('databitjs')

let dados = dataBit({
    nome: "username",
    solteiro: "boolean",
    cor: "color",
    numero: "float",
    email: "email",
    filho: {
        nome: "username",
        email: "email",
        telefone: "telephone"
    }
}, 2) // <-- O número dois seria a quantidade de objetos que vai gerar

console.log(dados)

// Output 

[
  {
    nome: 'eripik',
    solteiro: false,
    cor: '#C190EE',
    numero: 9.700662658760152,
    email: '[email protected]',
    filho: {
      nome: 'oxuf',
      email: '[email protected]',
      email2: '[email protected]'
    }
  },
  {
    nome: 'ubeses',
    solteiro: false,
    cor: '#DE9991',
    numero: 4.488406920840892,
    email: '[email protected]',
    filho: {
      nome: 'isanom',
      email: '[email protected]',
      email2: '[email protected]'
    }
  }
]

Licença

Software Livre, claro que sim!

🇺🇲

Beginning

A simplified way to generate massive dummy data based on a schema in the created json object 🎲


Installation

Install dependencies with the following commands:

npm i databitjs

Types of data

  • username - Create random names
  • text - Small text
  • shortText - Short text
  • longText - long text
  • boolean - True or false value
  • int - Integer
  • float - floating point number
  • date - current date
  • color - Generates a color in RGB
  • email - Generates a random email
  • telephone - Telephone number

Examples of how to use

The dataBit() function takes two parameters

First parameter is the model you want and the second parameter is how many objects/json will create as in the example below will generate two objects

const dataBit = require('databitjs')

let data = dataBit({
    name: "username",
    single: "boolean",
    color: "color",
    number: "float",
    email: "email",
    son: {
        name: "username",
        email: "email",
        telephone: "telephone"
    }
}, 2) // <-- Number two would be the number of objects it will generate

console.log(data)

// Output 

[
  {
    name: 'eripik',
    single: false,
    color: '#C190EE',
    number: 9.700662658760152,
    email: '[email protected]',
    son: {
      name: 'oxuf',
      email: '[email protected]',
      email2: '[email protected]'
    }
  },
  {
    name: 'ubeses',
    single: false,
    color: '#DE9991',
    number: 4.488406920840892,
    email: '[email protected]',
    son: {
      name: 'isanom',
      email: '[email protected]',
      email2: '[email protected]'
    }
  }
]

License

Free Software, Hell Yeah!