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

@guidb/google-sheets

v0.0.1

Published

Google Sheets Api (V4) library crud database

Downloads

2

Readme


❄Content-Library

  • 📰 0% Ads
  • 💸 0% Tracker
  • 📃 0% Logging

❄Docs

  1. Get All getAll(range_name) example

const { googleSheets } = require("@guidb/google-sheets")
async function test() {
  var db = new googleSheets("your_sheet_id", "credentials.json")
  var range_name = "Sheet1!A2:Z";
  var data = await db.getAll(range_name)
  console.log(JSON.stringify(data, null, 2))
}

test()
//--! Result log here !--\\
/*
[
  [
    "12345",
    "azkadev",
    "azka"
  ],
  [
    "123456",
    "devano",
    "devan",
    "alaska"
  ],
  [
    "1234567",
    "",
    "farel",
    "farel"
  ]
]
*/

  1. Get getRow db.getRow(range_name, user_data, get_row_num, return_row_number) example
const { googleSheets } = require("@guidb/google-sheets")
async function test() {
  var db = new googleSheets("your_sheet_id", "credentials.json")
  var range_name = "Sheet1!A2:Z"; //--! fil your range_name !--\\
  var user_data = "12345" //--! fill find data !--\\
  var get_row_num = 0 //--! the data is 0 because it is in range a, if b is 1 and next !!--\\
  var return_row_num = 1 //--! retur row b if you want c fill 2 next... !--\\
  var data = await db.getRow(range_name,user_data, get_row_num, return_row_num)
  console.log(JSON.stringify(data, null, 2))
}

test()
//--! Result log here !--\\
/*
"azkadev"
*/

  1. Get getRows getRows(range_name, user_data, get_row_num) example
const { googleSheets } = require("@guidb/google-sheets")
async function test() {
  var db = new googleSheets("your_sheet_id", "credentials.json")
  var range_name = "Sheet1!A2:Z";
  var user_data = "12345"
  var get_row_num = 0
  var data = await db.getRows(range_name,user_data, get_row_num)
  console.log(JSON.stringify(data, null, 2))
  console.log(JSON.stringify(data, null, 2))
}

test()
//--! Result log here !--\\
/*
{
  "0": "12345",
  "1": "azkadev",
  "2": "azka"
}
*/

Before

After

  1. save save(range_name, user_data, array_save, array_update, range_name_update) example
const { googleSheets } = require("@guidb/google-sheets")
async function test() {
  var db = new googleSheets("your_sheet_id", "credentials.json")
  var array_save = [ "data1", "data 2", "data 3" ]
  var array_update = [ "data1", "data 2 update", " data 3", "new data" ]
  var range_name = "Sheet1!A2:Z";
  var range_name_update = "Sheet1!A:Z"
  var data = await db.save(range_name, array_save[0], array_save, array_update, range_name_update)
  console.log(JSON.stringify(data, null, 2))
}

test()
//--! Result log here !--\\
/*
true
*/

Before

After

  1. saverow saveRow(range_name, user_data, get_row_num, new_data, range_name0) example
const { googleSheets } = require("@guidb/google-sheets")
async function test() {
  var db = new googleSheets("your_sheet_id", "credentials.json")
  var range_name = "Sheet1!A2:Z";
  var range_name_update = "Sheet1!A:Z"
  var data = await db.saveRow(range_name, 123456, 0, "gibran", "Sheet1!C")
  console.log(JSON.stringify(data, null, 2))
}

test()
//--! Result log here !--\\
/*


*/

Before

After

  1. saverows saveRows(range_name, user_data, get_row_num, new_data_array, range_name_update, range_name_update0) example
const { googleSheets } = require("@guidb/google-sheets")
async function test() {
  var db = new googleSheets("your_sheet_id", "credentials.json")
  var range_name = "Sheet1!A2:Z";
  var data = await db.getRow(range_name, user_data, get_row_num, return_row_number)
  console.log(JSON.stringify(data, null, 2))
}

test()
//--! Result log here !--\\
/*


*/

❄To-Do

A list that i should do more for this project...

  • ✔ crud
  • 🔜 clone
  • 🔜 diagram

🖥Requirements

  • Node v10+ (Node v14 Recommended)
  • Network connection