ui-formatter 0.0.7 → 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 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 "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-formatter",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "Format web UI",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./src/index.ts",
package/src/index.ts CHANGED
@@ -248,6 +248,9 @@ export function formatFax(fax?: string | null): string {
248
248
  return formatter.formatFax(fax)
249
249
  }
250
250
 
251
+ export function isNotEmpty(arr: any[] | string | null | undefined): boolean {
252
+ return arr ? arr.length > 0 : false
253
+ }
251
254
  export function isChecked(v: boolean | string | undefined | null, s: string[] | string | undefined): string {
252
255
  if (!v) {
253
256
  return ""