Nevertheless, I soon realized it was a pretty ambitious project for several reasons, not only in functional terms, but also in developing all the necessary support that a fully developed code library needs: a carefully designed API, unit tests, minification, documentation, etc… And since it was to be my first attempt at trying to make other people’s lives easier, I thought I may ease mine as well by warming up with a reduced scope enterprise.
During the development of
Object.prototype.toString.call(myObj) === '[object Object]'
I couldn’t help wander if this process could be optimized and wrapped into a cleaner form, easier to remember and leaner to express.
is(myObj).type('object'); // true or false