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

gabo

v0.0.2

Published

Alguns modulos nativos do PHP transcristos para o NODEJS para uso exclusivo em ES6

Downloads

4

Readme

Alguns modulos nativos do PHP transcristos para o NODEJS para uso exclusivo em ES6

Install

$ npm i gabo -s
    or
$ yarn add gabo -s

Usage

IMPORT ALL FUNCTIONS

import { curl, GetStr, cpf, dados, rand, randomizador, gift, sleep } from "gabo";

FUNÇÕES

  • curl: Função async/await Curl (para solicitação na web ou aplicativos)
  • dados: Função para Gerar dados BR
  • cpf: Função para Gerar um CPF valido
  • GetStr: Função para puxar dados de respostas
  • gift: Função para gerar um GIFT
  • rand: Função para gerar numeros aleatorios
  • randomizador: Função para escolher um elemento de um array aleatoriamente
  • sleep: Função async/await para deixar lento seu aplicativo por algum tempo

CURL

import { curl } from "gabo"

const _ = async function(){

    let first_req = await curl({
        url: '', // url do site
        method: '', // metodos: GET, PUT, POST, OPTION
        headers: {
            '':''
        },
        proxy: '', // para uso de proxy, `http://${username}:${password}@${url}:${port}` or `http://${url}:${port}`
        body: '' // se usar o método POST
    })

    console.log(first_req) // imprime o resultado obtido

    let second_req = await curl({
        url: '', // url do site
        method: '', // metodos: GET, PUT, POST, OPTION
        headers: {
            '':''
        },
        proxy: '', // para o uso proxy, `http://${username}:${password}@${url}:${port}` or `http://${url}:${port}`
        body: '' // se usar o método POST ou PUT
    }, true)

    console.log(second_req) // imprima o resultado da requisição no console, com corpo e cabeçalhos req

}()

DADOS

import { dados } from "gabo"

let Person = dados()

console.log(Person)
/**
 * Devolva um objeto com:
 * nome
 * email
 * usuario
 */

GerarCpf

import { cpf } from "gabo"

// Para gerar um CPF sem pontos e traços
let cpf = cpf()
// Para gerar um CPF com pontos e traços
let cpf_formatado = cpf({ formatado: true })
// imprime o resultado no CONSOLE
console.log(cpf, cpf_with_punctuation)

GetStr

import { GetStr } from "gabo"

let string = 'Estou usando o package, Gabo'

let capture = GetStr(string, ', ', '-') // print 'Gabo'

console.log(string, capture)

Gift

import { gift } from "gabo"

console.log(gift('xxxx-xxxx-xxxx-xxxx'))

RAND

import { rand } from "gabo"

let number = rand(0, 999) // Imprime número entre 0 - 999

console.log(number)

RANDOMIZADOR

import { randomizador } from "gabo"

let keys = ['Gabo', 'Packge', 'NodeJS', 'Module']

let randomize = randomizador(keys) // Imprime um valor aleatório do array

console.log(randomize)

SLEEP

import { sleep } from "gabo"

const _ = async function() {
    console.log(1)
    await sleep(1000) // tempo declarado em ms
    console.log(2)
}()

Author

👤 YORKANDA

📝 License

Copyright © 2020 Yorkanda. This project is MIT licensed.