gs-require

1.0.1 • Public • Published

gs-require Travis CI Build Status

Use Node.js require in Googlescript.

Install

Paste at the top of your script (requires new runtime):

eval(UrlFetchApp.fetch("https://unpkg.com/gs-require@1.0.1").getContentText());

Usage

eval(UrlFetchApp.fetch("https://unpkg.com/gs-require@1.0.1").getContentText());
 
const _ = require("lodash");
 
_.uniq([1, 1, 2])
//=> [1, 2]

API

require(file)

file

Type: string

The package to import. If a url is provided, it is treated as a js file; otherwise it is resolved through unpkg.

Readme

Keywords

none

Package Sidebar

Install

npm i gs-require

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

3.73 kB

Total Files

5

Last publish

Collaborators

  • richienb