Write protected, enumerable datatypes in pure JavaScript