getItem: function()

in platform/core/common/services/fds-storage.service.js [138:156]


    getItem: function (key) {
        const entry = getEntry(key);
        if (entry === null) {
            return null;
        }

        // if the entry is expired, drop it and return null
        if (checkExpiration(entry)) {
            this.removeItem(key);
            return null;
        }

        // if the entry has the specified field return its value
        if (isDefinedAndNotNull(entry['item'])) {
            return entry['item'];
        }

        return null;
    },