1.0.1 • Published 4 years ago
gs-require v1.0.1
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/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.