What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-03-27 07:35:02
compress string javascript
function en(c){var x='charCodeAt',b,e={},f=c.split(""),d=[],a=f[0],g=256;for(b=1;b<f.length;b++)c=f[b],null!=e[a+c]?a+=c:(d.push(1<a.length?e[a]:a[x](0)),e[a+c]=g,g++,a=c);d.push(1<a.length?e[a]:a[x](0));for(b=0;b<d.length;b++)d[b]=S... Add solution -
Javascript 2021-10-26 19:42:07
how i can add the constructor to the local storage using javascript
// Extending the Storage object: Storage.prototype.setObject = function(key, value) { this.setItem(key, JSON.stringify(value)); } Storage.prototype.getObject = function(key) { var value = this.getItem(key); return value && JSON.parse(... Add solution -