maintain (helper): reorganise some functions in client

This commit is contained in:
Mickael Kerjean
2022-11-10 00:17:22 +11:00
parent c828b22f7a
commit cf0ca5c261
2 changed files with 3 additions and 2 deletions

View File

@ -1,3 +1,5 @@
export function nop() {}
export function leftPad(str, length, pad = "0") { export function leftPad(str, length, pad = "0") {
if (typeof str !== "string" || typeof pad !== "string" || str.length >= length || if (typeof str !== "string" || typeof pad !== "string" || str.length >= length ||
!pad.length > 0) { !pad.length > 0) {

View File

@ -16,9 +16,8 @@ export { invalidate, http_get, http_post, http_delete, http_options } from "./aj
export { prompt, alert, confirm } from "./popup"; export { prompt, alert, confirm } from "./popup";
export { notify } from "./notify"; export { notify } from "./notify";
export { gid, randomString } from "./random"; export { gid, randomString } from "./random";
export { leftPad, format, copyToClipboard, objectGet } from "./common"; export { leftPad, format, copyToClipboard, objectGet, nop } from "./common";
export { getMimeType } from "./mimetype"; export { getMimeType } from "./mimetype";
export { settings_get, settings_put } from "./settings"; export { settings_get, settings_put } from "./settings";
export { FormObjToJSON, createFormBackend, autocomplete } from "./form"; export { FormObjToJSON, createFormBackend, autocomplete } from "./form";
export { upload } from "./upload"; export { upload } from "./upload";
export function nop() {}