INNER CODE UNIT · JavaScript

Storage

jonasstrehle/supercookie · server/main.js:21

class Storage {
    constructor() {
        this._path = path.join(path.resolve(), "data.json");
        this._content = {};
        if (!this.existsPersistent())
            this.createPersistent();
        this.read();
    }
    get content() {
        return this._contentProxy;
    }
    set content(data) {
        this._content = data;
        const _this = this;
        const proxy = {
            get(target, key) {
                if (typeof target[key] === 'object' && target[key] !== null)
                    return new Proxy(target[key], proxy);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…