javascript - What is this function used for?
PHP中文网
PHP中文网 2017-06-16 09:19:23
0
1
853

Looking at the official website of underscore, it seems that the usage is different

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
大家讲道理

_.omit()Receives attribute names or functions as rules to filter out attributes in objects.

The literal meaning here is to filter out the attributes whose property values ​​are inverted to be true, that is: 0, undefined, null, etc.

For example:

_.omit({foo:0,bar:null,baz:1},function(v){return !v})
// {bar:1}
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template