Proper version of when library in package.json