Update core.js

Fixed the `asFloat` and `asInt` methods.