Is cypher.js secure for sensitive data?
No. It is not secure. This is very simple substitution algorithm. It shows patterns clearly. If the encrypted message is long enough or if you have many short encrypted messages, you can crack it using simple frequency analysis. You don't need any complex technique to crack it.
Example:
let data = &quot;AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&quot;;
let key = &quot;12345&quot;;
console.log(data.encrypt(key));
console.log(data.encrypt(key));
console.log(data.encrypt(key));

Result:
dopqrsopqrsopqrsopqrsopqrso~1}11pqrsopqrsopqrsopqrsopqrsb
dopqrsopqrsopq}33rsopqrsopqrso~3pqrsopqrsopqrsopqrsopqrsq
Nqrsopqrs}38opqrsopqrsopqrsopqrsopqrsopqrsopqrsopqrs~0opv

You see patterns clearly.