Is there any caveat/problem in creating/accessing JS object keys (properties) using long text strings?
Example:
let obj={}
let key1="long time ago\nthere was a long text string\nto be used to index object's properties\n";
let value1=[7,13,10];
obj[key1] = value1;
PS: By long, I mean 300~1000 characters text string, that contain newlines.
My aim is to create a cache object, with input (object property) being the raw text and the output (stored as value) being some computations with this text. This could be better than hashing the string before using it as an object property?