Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gsheet-api

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gsheet-api - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

2

lib/GoogleSheetService.d.ts
export declare class GoogleSheetService {
addItem(spreadsheetID: string, sheetsTitle: string, clientEmail: string, privateKey: string, item: Array<any>, callback: () => void, error: (message: string) => void): Promise<void>;
addItem(spreadsheetID: string, sheetsTitle: string, clientEmail: string, privateKey: string, item: Array<any>, callback: () => void, error: (message: string) => void, headerRow?: number): Promise<void>;
}

@@ -49,3 +49,3 @@ "use strict";

}
GoogleSheetService.prototype.addItem = function (spreadsheetID, sheetsTitle, clientEmail, privateKey, item, callback, error) {
GoogleSheetService.prototype.addItem = function (spreadsheetID, sheetsTitle, clientEmail, privateKey, item, callback, error, headerRow) {
return __awaiter(this, void 0, void 0, function () {

@@ -70,3 +70,3 @@ var doc, sheet, rows_1, newRows_1, e_1;

sheet = doc.sheetsByTitle[sheetsTitle];
return [4 /*yield*/, sheet.loadHeaderRow(1)
return [4 /*yield*/, sheet.loadHeaderRow(headerRow !== null && headerRow !== void 0 ? headerRow : 1)
// console.log("====== DOC TITLE : ", doc.title);

@@ -73,0 +73,0 @@ // console.log("====== SHEET TITLE : ", sheet.title);

{
"name": "gsheet-api",
"version": "0.2.3",
"version": "0.2.4",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -39,3 +39,3 @@ const { GoogleSpreadsheet } = require('google-spreadsheet');

export class GoogleSheetService {
async addItem(spreadsheetID: string, sheetsTitle: string, clientEmail: string, privateKey: string, item: Array<any>, callback: () => void, error: (message: string) => void) {
async addItem(spreadsheetID: string, sheetsTitle: string, clientEmail: string, privateKey: string, item: Array<any>, callback: () => void, error: (message: string) => void, headerRow?: number) {
const doc = new GoogleSpreadsheet(spreadsheetID);

@@ -51,3 +51,3 @@

const sheet = doc.sheetsByTitle[sheetsTitle]; // or use doc.sheetsById[id] or doc.sheetsByTitle[title]
await sheet.loadHeaderRow(1)
await sheet.loadHeaderRow(headerRow ?? 1)

@@ -54,0 +54,0 @@ // console.log("====== DOC TITLE : ", doc.title);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc