UNPKG

node-nlp

Version:

Library for NLU (Natural Language Understanding) done in Node.js

14 lines (13 loc) 323 B
export default function isObjectEmpty(obj) { if (Object.getOwnPropertyNames) { return (Object.getOwnPropertyNames(obj).length === 0); } else { var k; for (k in obj) { if (obj.hasOwnProperty(k)) { return false; } } return true; } }