This package has been deprecated

Author message:

please use https://github.com/sheetbase/core-server

@sheetbase/utils-server
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

Sheetbase Module: @sheetbase/utils-server

Useful utilities for Sheetbase backend app.

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

Install

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

import * as Utils from "@sheetbase/utils-server";

As a library: 1DvgE7s0BRsgiI8uVvnx3OaIVHVYskgA0CaF0ykKPDa-IVl6csneLQQxT

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

declare const UtilsModule: { Utils: any };
const Utils = UtilsModule.Utils;

Usage

Examples

import * as Utils from "./public_api";

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

export function example2(): void {
  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 example3(): void {
  Logger.log(Utils.uniqueId());
  Logger.log(Utils.uniqueId(32));
  Logger.log(Utils.uniqueId(12, "1"));
}

export function example4(): void {
  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/utils-server is released under the MIT license.

Package Sidebar

Install

npm i @sheetbase/utils-server

Weekly Downloads

0

Version

0.0.7

License

MIT

Unpacked Size

338 kB

Total Files

31

Last publish

Collaborators

  • lamnhan