Update core.js

Added isSpace utility function.