Update ntropy.js

Simplified checkMobile() code.
Simplified cmpValues()

Simplified cmpValues() with ternary operator.
Added package.json