angus-c / just

A library of dependency-free JavaScript utilities that do just one thing.
https://anguscroll.com/just
MIT License
6.06k stars 209 forks source link

`just-is-empty` function fails to detect symbol properties in objects #554

Closed palashmon closed 1 year ago

palashmon commented 1 year ago

Package name:

URL:

Issue Description:

Steps to reproduce:

  1. Create an object with a symbol property:

    const isEmpty = require('just-is-empty');
    
    const mySymbol = Symbol('mySymbol');
    const myObject = {
    };
  2. Call the isEmpty() function with myObject as the argument:
    console.log(myObject);  // {[Symbol("mySymbol")]: 7}
    isEmpty(myObject);      // true

Expected output: false Actual output: true