JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 31
  • Score
    100M100P100Q53729F
  • License MIT

Sheetbase core module for backend app.

Package Exports

  • @sheetbase/core-server

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@sheetbase/core-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Sheetbase Module: @sheetbase/core-server

Sheetbase core module for backend app.

Build Status Coverage Status NPM License clasp Support me on Patreon PayPal Ask me anything

Install

Using npm: npm install --save @sheetbase/core-server

import * as Sheetbase from "@sheetbase/core-server";

As a library: 1bhE_YkXnzZLr9hZk_5NXgCY6bAe73UHIGjM4dvyRJLLTyccpu5vS6jeJ

Set the Indentifier to SheetbaseModule and select the lastest version, view code.

declare const SheetbaseModule: { Sheetbase: any };
const Sheetbase = SheetbaseModule.Sheetbase;

Scopes

https://www.googleapis.com/auth/script.scriptapp

Usage

Examples

import * as Sheetbase from "./public_api";

function app() {
  return Sheetbase.sheetbase({ views: "views" });
}

export function example1() {
  const { Option } = app();

  const views = Option.get("views");
  Logger.log(views);
}

export function example2(): void {
  const { Utils } = app();

  const o = {
    a: 1,
    b: 2,
    c: {
      c1: 1,
      c2: 2
    }
  };
  const a = Utils.o2a(o);
  Logger.log(a);
}

export function example3(): void {
  const { Utils } = app();

  const a = [1, 2, { a: 1, b: 2, c: 3 }, { key: "d", d1: 2, d2: 2 }];
  const o = Utils.a2o(a);
  Logger.log(o);
}

export function example4(): void {
  const { Utils } = app();

  Logger.log(Utils.uniqueId());
  Logger.log(Utils.uniqueId(32));
  Logger.log(Utils.uniqueId(12, "1"));
}

export function example5(): void {
  const { Utils } = app();

  const o = {
    a: 1,
    a1: "1",
    b: true,
    b1: "TRUE",
    c: { c1: 1, c2: 2 },
    c1: '{ "c1": 1, "c2": 2 }',
    d: null
  };
  const output = Utils.honorData(o);
  Logger.log(output);
}

License

@sheetbase/core-server is released under the MIT license.