_.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
Markdown supported · ⌘↵ to post
No responses yet.