gs-require
v1.0.1
Published
Use Node.js require in Googlescript.
Downloads
10
Readme
gs-require
Use Node.js require
in Googlescript.
Install
Paste at the top of your script (requires new runtime):
eval(UrlFetchApp.fetch("https://unpkg.com/[email protected]").getContentText());
Usage
eval(UrlFetchApp.fetch("https://unpkg.com/[email protected]").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.