dist/expired_storage.js
function(key) {

            // try to fetch expiration time for key
            var expireTime = parseInt(this._storage.getItem(this._expiration_key_prefix + key));

            // if got expiration time return how much left to live
            if (expireTime && !isNaN(expireTime)) {

                return expireTime - this.getTimestamp();
            }

            // if don't have expiration time return null
            return null;
        }
function(key) {

            // try to fetch expiration time for key
            var expireTime = parseInt(this._storage.getItem(this._expiration_key_prefix + key));

            // if got expiration time return how much left to live
            if (expireTime && !isNaN(expireTime)) {

                return expireTime - this.getTimestamp();
            }

            // if don't have expiration time return null
            return null;
        }
function ( key ) { // try to fetch expiration time for key var expireTime = parseInt ( this . _storage . getItem ( this . _expiration_key_prefix + key ) ) ; // if got expiration time return how much left to live if ( expireTime && ! isNaN ( expireTime ) ) { return expireTime - this . getTimestamp ( ) ; } // if don't have expiration time return null return null ; }
Get item time left to live.
@param key: Item key to get (string).
@return: Time left to expire (in seconds), or null if don't have expiration date.
Get item time left to live .