ui-formatter 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +5 -0
- package/package.json +1 -1
- package/src/index.ts +4 -1
package/lib/index.js
CHANGED
|
@@ -269,6 +269,10 @@ function formatFax(fax) {
|
|
|
269
269
|
return formatter.formatFax(fax);
|
|
270
270
|
}
|
|
271
271
|
exports.formatFax = formatFax;
|
|
272
|
+
function isNotEmpty(arr) {
|
|
273
|
+
return arr ? arr.length > 0 : false;
|
|
274
|
+
}
|
|
275
|
+
exports.isNotEmpty = isNotEmpty;
|
|
272
276
|
function isChecked(v, s) {
|
|
273
277
|
if (!v) {
|
|
274
278
|
return "";
|
|
@@ -286,3 +290,4 @@ function isChecked(v, s) {
|
|
|
286
290
|
}
|
|
287
291
|
return "";
|
|
288
292
|
}
|
|
293
|
+
exports.isChecked = isChecked;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -248,7 +248,10 @@ export function formatFax(fax?: string | null): string {
|
|
|
248
248
|
return formatter.formatFax(fax)
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
-
function
|
|
251
|
+
export function isNotEmpty(arr: any[] | string | null | undefined): boolean {
|
|
252
|
+
return arr ? arr.length > 0 : false
|
|
253
|
+
}
|
|
254
|
+
export function isChecked(v: boolean | string | undefined | null, s: string[] | string | undefined): string {
|
|
252
255
|
if (!v) {
|
|
253
256
|
return ""
|
|
254
257
|
}
|