Logo
Explore Help
Sign In
Archives/gristlabs_grist-core
1
0
Fork 0
You've already forked gristlabs_grist-core
mirror of https://github.com/gristlabs/grist-core.git synced 2026-03-02 04:09:24 +00:00
Code Issues Projects Releases Wiki Activity
Files
alex/skip-fstrings-3.9
gristlabs_grist-core/app/plugin/gutil.ts

10 lines
269 B
TypeScript
Raw Permalink Normal View History

(core) add grist.selectedTable.create/update/destroy/upsert to custom widget api Summary: This makes an equivalent of the /records REST endpoint available within custom widgets. For simple operations, it is compatible with https://github.com/airtable/airtable.js/. About half of the diff is refactoring code from DocApi that implements /records using applyUserActions, to make that code available in the plugin api. Test Plan: added tests Reviewers: alexmojaki Reviewed By: alexmojaki Differential Revision: https://phab.getgrist.com/D3320
2022-03-15 10:35:15 -04:00
import constant = require('lodash/constant');
import times = require('lodash/times');
/**
* Returns a new array of length count, filled with the given value.
*/
export function arrayRepeat<T>(count: number, value: T): T[] {
return times(count, constant(value));
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.4 Page: 876ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API