Test whether you're a component in browser or a package in npm