Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _.mixin(
- isBlank: (obj) ->
- if _.isString(obj)
- !obj.match(/\S/)?
- else if _.isBoolean(obj)
- if obj then false else true
- else if _.isNumber(obj)
- false
- else
- # fall through to `isEmpty` which will
- # handle objects, arrays, null & undefined
- _.isEmpty(obj)
- )
Add Comment
Please, Sign In to add comment