src/store.js
function set(key, data, expiresAt) {
            try {
                if (expiresAt !== undefined && typeof expiresAt === 'number') {
                    STORE.setItem(storeName + key + EXPIRE_KEY, expiresAt.toString());
                }

                STORE.setItem(storeName + key, decodeObjectString(data));

                return true;
            } catch(error) {
                console.error(error);
                return false;
            }
        }
function set(key, data, expiresAt) {
            try {
                if (expiresAt !== undefined && typeof expiresAt === 'number') {
                    STORE.setItem(storeName + key + EXPIRE_KEY, expiresAt.toString());
                }

                STORE.setItem(storeName + key, decodeObjectString(data));

                return true;
            } catch(error) {
                console.error(error);
                return false;
            }
        }
function set ( key , data , expiresAt ) { try { if ( expiresAt !== undefined && typeof expiresAt === 'number' ) { STORE . setItem ( storeName + key + EXPIRE_KEY , expiresAt . toString ( ) ) ; } STORE . setItem ( storeName + key , decodeObjectString ( data ) ) ; return true ; } catch ( error ) { console . error ( error ) ; return false ; } }
Set a defined key with the given value
@param  {string} key          The name of the value
@param  {mixed}  data         The data to store, can be any datatype
@param  {int}    [expiresAt]  When should this value expire
@return {void}
Set a defined key with the given value