cempty

1.0.1 • Public • Published

一个判空函数

使用方法:

import ifEmpty from 'cxf-if-empty';

ifEmpty([],'arr');

传递参数与判空类型

    /**
    * @param    {Any}       val         判空数据
    * @param    {String}    type        判空类型
    * @param    {String}    ifEmptyData 判空key值
    * @type     {arr}       判空数组
    * @type     {json}      JSON数组判空
    * @type     {obj}       对象判空
    * @type     {objData}   对象值判空
    * @type     {str}       字符串判空
    * @type     {num}       数组判空
    */

Readme

Keywords

Package Sidebar

Install

npm i cempty

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

6.79 kB

Total Files

5

Last publish

Collaborators

  • chenxiangfu