bibekluitel / JMON

Javascript Mutable Object Notation
GNU General Public License v3.0
4 stars 5 forks source link

should return undefined if constructor argument is not a object. #41

Closed krishnashum closed 5 years ago

krishnashum commented 5 years ago

Describe the bug

if (!isObject(data)){

   // If data provided is not a JSON, The JMON will not be Initialized.
   // This library will not handle data other than a JSON Object.
   console.error(`${data} is not a JSON`);
   return false;
 };

Expected behavior the constructor should return undefined if the argument is other than JSON Object

krishnashum commented 5 years ago

Implemented in #43