All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scripts.node_modules.moment.src.lib.utils.is-object-empty.js Maven / Gradle / Ivy

The newest version!
import hasOwnProp from './has-own-prop';

export default function isObjectEmpty(obj) {
    if (Object.getOwnPropertyNames) {
        return Object.getOwnPropertyNames(obj).length === 0;
    } else {
        var k;
        for (k in obj) {
            if (hasOwnProp(obj, k)) {
                return false;
            }
        }
        return true;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy