Versions of Javascript builtins functions that do not modify state