google-spreadsheet-kvs
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

google-spreadsheet-kvs

Install

yarn add google-spreadsheet-kvs

Usage

import { GoogleSpreadsheetStorage } from "google-spreadsheet-kvs";
import credentials from "./path/to/google/serviceAccount/credentials.json";

const storage = new GoogleSpreadsheetStorage("SHEET_ID", credentials);
await storage.configure();

await storage.set("My key", "Example value");
console.log(await storage.get("My key")); // "Example value"

await storage.delete("My key");
console.log(await storage.get("My key")); // null

Limitations

This library uses CRC16 hashing algorithm to convert Key to sheet row index.
This means different key maps to same row index, so accidentally override value with different key.

/google-spreadsheet-kvs/

    Package Sidebar

    Install

    npm i google-spreadsheet-kvs

    Weekly Downloads

    0

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    11.7 kB

    Total Files

    8

    Last publish

    Collaborators

    • airtoxin