2.0.0 • Published 3 years ago

llt_is_null v2.0.0

Weekly downloads
84
License
ISC
Repository
-
Last release
3 years ago

更新描述

  • 添加过滤器功能

工具

判断数据是否为空

const {is_data_null} = require('llt_is_null')
	var opj1 = {
		a:'1',
		b:'[1,2]',
		c:[{sada:'1'}],
		a2:{"a":2},
		
  }
    var opj2 = {
		a:'1',
	
		c:{
      a:'',
      c:'1'
    }
  }
  /**
   *参数1  需要判断的字段 
   * 参数2 需要过滤的字段
   * 参数全部都是对象格式
   *  */

  	console.log(is_data_null(opj1));

校验前端传递参数是否是后端需要的字段名

 参数
 /**
  * value1 前端传递数据
  * value2 后端需要的数据字段名
  * */
 is_compare(value1,value2)
 方法
      const {is_compare} = require('./index')
      var opj1 = {
        a:'1',
        b:'[1,2]',
        c:[],
        a2:{"a":2,
            a12:[{a2:2}]},
        
    }
    var opj2 = {
        b:'[1,2]',
        c:[],
        a:'1',
        a2:{"a":2,
            a12:[{b2:2}]},
        
    }
  //打印查看就可以
  	console.log(is_compare(opj1,opj2));//true
2.0.0

3 years ago

1.1.0

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago