Closed palashmon closed 1 year ago
Package name:
just-is-empty
URL:
Issue Description:
isEmpty()
Steps to reproduce:
Create an object with a symbol property:
const isEmpty = require('just-is-empty'); const mySymbol = Symbol('mySymbol'); const myObject = { };
myObject
console.log(myObject); // {[Symbol("mySymbol")]: 7} isEmpty(myObject); // true
Expected output: false Actual output: true
false
true
Package name:
just-is-empty
URL:
Issue Description:
isEmpty()
function, as currently implemented, fails to correctly detect when an object has properties with symbols as keys. This can result in incorrect output when using the function to check if an object is empty.Steps to reproduce:
Create an object with a symbol property:
isEmpty()
function withmyObject
as the argument:Expected output:
false
Actual output:true