_.isEmpty(): Matches undefined
, null
, false
& empty arrays
, obj
, strings
const _ = require('lodash');
console.log(
_.isEmpty(undefined),
_.isEmpty(null),
_.isEmpty(false)
_.isEmpty([]),
_.isEmpty({}),
_.isEmpty(""),
); // true x 6
Thanks for reading π
Follow @codedrops.tech for more.
Instagram β Twitter β Facebook
Micro-Learning β Web Development β Javascript β MERN stack
codedrops.tech
Projects
File Ops - A VS Code extension to easily tag/alias files & quick switch between files
Top comments (0)