UNPKG

@mobx-json/mui-form

Version:

create material-ui forms by json & mobx

40 lines (39 loc) 1.31 kB
/// <reference types="ts-toolbelt" /> /** * ('a', [{ a: 1, b: 2}, { a: 3, b: 4} ]) => [ 1, 3 ] */ declare const propAll: import("Function/Curry").Curry<(key: string, objArr: any[]) => any[]>; /** * [ 1, 2, 3 ] => [ '1', '2', '3' ] */ declare const valsToString: (valArr: string[] | number[] | boolean[]) => string[]; /** * (true, ['a', 'b', 'c']) => {a: true, b: true, c: true} */ declare const zipObjArrWithVal: import("Function/Curry").Curry<(val: any, arr: string[]) => { [index: string]: any; }>; /** * [], '', null, undefined -> true */ declare const isNilOrEmpty: import("ramda").SafePred<any>; /** * '2020-01-28' -> true * 'abc' -> false * '' -> false */ declare const isDateStr: (dtStr: string) => boolean; /** * line1\nline2\r\nline3 -> line1<br />line2<br />line3 */ declare const nl2br: (str: string | number | boolean | undefined, br?: string) => string; /** * line1\nline2\r\nline3 -> ['line1', 'line2', 'line3'] * line1 -> ['line1'] */ declare const nl2Arr: (str?: string | number | boolean | undefined) => string[]; /** * { a: undefined, b: null, c: 1, d: '2'} -> { c: 1, d: '2'} */ declare const rmNilProps: <T, U>(obj: T) => U; export { propAll, valsToString, zipObjArrWithVal, isNilOrEmpty, isDateStr, nl2br, nl2Arr, rmNilProps, };