It could (or perhaps should) delegate to fantasy-land/empty to work out if a given value is its type's empty value.
Use case:
I have a css rules object which contains css rules to apply to a string if there's any. Otherwise the string is returned as is. Problem is that the object may actually be "empty" i.e. it is an object but has no properties.
I was wondering if it would make sense to have this new static method?
It could (or perhaps should) delegate to
fantasy-land/empty
to work out if a given value is its type's empty value.Use case:
I have a
css
rules object which contains css rules to apply to a string if there's any. Otherwise the string is returned as is. Problem is that the object may actually be "empty" i.e. it is an object but has no properties.Any thoughts?