0.0.2 • Published 7 years ago

@andre_garvin/is v0.0.2

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

is: instead of writting tyepof so much and less code in gerenal

I created this package becasue someone has to

NOT ON GITHUB YET

const is = require('@andre_garvin/is')

const empytObj = {}
is().stillTrue([
    is(emptyObj).Object(),
    is(emptyObj).notUndefined(),
    !is(emptyObj).empty()
]).then(resp => {
    if (resp) {
        console.log('YUUUUUSSS!!!')
    } else {
        console.log('Is was lied to, why :(')
    }
})


// versuses how you would originally do this
if ( Object.keys(emptyObj).length !== 0 && emptyObj !== undefined && typeof emptyObj === 'object' ) {
   console.log('YUUUUUSSS!!!')
} else {
   console.log('Is was lied to, why :(')
}