README
Sheetbase Module: @sheetbase/lodash-server
Lodash for Google apps script.
Install
Using npm:
npm install --save @sheetbase/lodash-server
As a library:
1P8qfUHEUdQPB0Pc8S7Vb_7MvUnxU8Mt7GtLNd7QMuqup4KamkavaN5YT
Set the Indentifier to Lodash and select the lastest version, view code.
Examples
function example1(): void {
const chunk = _.chunk(["a", "b", "c", "d"], 2);
// => [['a', 'b'], ['c', 'd']]
Logger.log(chunk);
}
function example2(): void {
const object = { a: [{ b: { c: 3 } }] };
const value: number = _.get(object, "a[0].b.c");
// => 3
Logger.log(value);
}
function example3(): void {
const object = { a: [{ b: { c: 3 } }] };
_.set(object, "a[0].b.c", 4);
_.set(object, "a[0].b.d", "Hello");
// { 'a': [{ 'b': { 'c': 4, 'd': 'Hello' } }] }
Logger.log(object);
}
Documentation
Homepage: https://lodash.com/
License
@sheetbase/lodash-server is released under the MIT license.