Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@yued/activities

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yued/activities - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

2

dist/index.js

@@ -1,1 +0,1 @@

"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var getServerTime=_interopDefault(require("@yunke/server-time"));function mitt(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map(function(e){e(n)}),(e["*"]||[]).slice().map(function(e){e(t,n)})}}}var classCallCheck=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),get=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},inherits=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},possibleConstructorReturn=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},slicedToArray=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),set$1=function(e){var t=e.key,n=e.value,r=e.expires;return window.localStorage.setItem(t,JSON.stringify({value:n,expires:r}))},get$1=function(e,t){var n=JSON.parse(window.localStorage.getItem(e));if(n){var r=n.value,i=n.expires;return i&&new Date(i)<t?(window.localStorage.removeItem(e),null):r}return null},getDaysDiffBetweenDates=function(e){return function(t){return(t-e)/864e5}},paddingLeft=function(e,t,n){var r=t-e.length;if(r<=0)return e;for(var i="",o=0;o<r;o++)i+=n;return i+e},Active=function(){function e(t){var n=this;classCallCheck(this,e),this.opts=t,this.emitter=mitt(),this.emitTo=function(e){return function(t){return n.emitter(e,t)}},this.on=this.emitter.on,this.off=this.emitter.off,this.emit=this.emitter.emit}return createClass(e,[{key:"serialization",value:function(){var e=this.opts,t=e.title,n=e.id,r=e.end_date;return set$1({key:""+t+n,value:e,expires:r})}},{key:"isActive",value:function(){var e=this.opts;return!e.end_date||new Date(e.end_date)>=new Date}}]),e}(),PopupActive=function(e){function t(e,n){classCallCheck(this,t);var r=possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.meta=n,r.activeURL=e.activeURL,r.popupDom=r.makePopupDom(e),r.popupDom.querySelector(".js_pop_close.js_pop_close_btn").addEventListener("click",function(e){r.popupDom.remove(),r.emit("popClose",e)}),r.popupDom.querySelector(".js_pop_mask").addEventListener("click",function(e){r.popupDom.remove(),r.emit("maskClose",e)}),r.popupDom.querySelector(".content-inner").addEventListener("click",function(t){var n=e.urls,i=(n.length,n[Math.floor(Math.random()*n.length)]);window.location=i,r.emit("content-inner",t)}),r}return inherits(t,Active),createClass(t,[{key:"init",value:function(){(this.meta.dom||document.body).appendChild(this.popupDom)}},{key:"inRange",value:function(){var e=this.opts,t=e.start_date,n=e.end_date,r=e.time_start,i=e.time_end,o=(e.serverTime,new Date(e.serverTime));if(t&&o<t)return!1;if(n&&o>n)return!1;var a=paddingLeft(o.getHours(),2,"0")+":"+paddingLeft(o.getMinutes(),2,"0")+":"+paddingLeft(o.getSeconds(),2,"0");return!(r&&a<r)&&!(i&&a>i)}},{key:"isActive",value:function(){var e=this.opts;if(!get(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"isActive",this).call(this))return!1;if(!this.inRange())return!1;if("1"===e.is_first_show){e.meta=e.meta||{},e.meta.visitCb=e.meta.visitCb||[];var n=new Date(e.serverTime),r=getDaysDiffBetweenDates(n);return e.meta.visitCb.every(function(e){return r(new Date(e.time))<-1})}return!0}},{key:"makePopupDom",value:function(e){var t=e.imageUrl,n='<div class="js_pop_1ad1_wrapper">\n <div class="js_pop_mask"></div>\n <div class="js_pop_1ad1">\n <div class="content">\n <div class="content-inner" style="max-height: '+(window.innerHeight-40)+'px;">\n <div style="text-align: center">\n <img style="max-height: 100%;max-width: 100%;" src="'+t+'">\n </div>\n </div>\n <div class="js_pop_close js_pop_close_btn" />\n </div>\n </div>\n </div>',r=document.createElement("div");return r.innerHTML=n,r}},{key:"updateStatus",value:function(e){var t=this.opts;t.meta=t.meta||{},t.meta.visitCb=t.meta.visitCb||[],t.meta.visitCb.push({type:e,time:new Date(t.serverTime)}),this.serialization()}}]),t}(),Manager=function(){function e(t){classCallCheck(this,e),this.opts=t||{}}return createClass(e,[{key:"setActiveOrigin",value:function(e){var t=this;return Promise.all([getServerTime(),e]).then(function(e){var t=slicedToArray(e,2),n=t[0],r=t[1].data.data,i=r.id,o=r.title,a=r.end_date,s=r.start_date,u=r.time_end,c=r.time_start,l=r.urls,p=r.image.data.url,f=r.is_first_show;a=a&&new Date(a),s=s&&new Date(s);var v,d={id:i,urls:l.data.map(function(e){return e.text}),title:o,serverTime:n,end_date:a,start_date:s,time_end:u,time_start:c,imageUrl:p,is_first_show:f},m=""+o+i,h=get$1(m,n);return h?((v=h).start_date=v.start_date&&new Date(v.start_date),v.end_date=v.end_date&&new Date(v.end_date),v):(set$1({key:m,value:d,expires:a}),d)}).then(function(e){var n=new PopupActive(e,{meta:t.opts.dom});n.isActive()&&(n.on("popClose",function(e){return n.updateStatus("popClose")}),n.on("maskClose",function(e){return n.updateStatus("maskClose")}),n.init(),t.active=n)})}}]),e}();exports.PopupActive=PopupActive,exports.Manager=Manager;
var manage_pack=function(t){"use strict";var e,n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};const r=(function(t,e){t.exports=function(){function t(t){return"function"==typeof t}var e=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},r=0,i=void 0,o=void 0,s=function(t,e){v[r]=t,v[r+1]=e,2===(r+=2)&&(o?o(d):w())},a="undefined"!=typeof window?window:void 0,u=a||{},c=u.MutationObserver||u.WebKitMutationObserver,l="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),f="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var t=setTimeout;return function(){return t(d,1)}}var v=new Array(1e3);function d(){for(var t=0;t<r;t+=2){var e=v[t],n=v[t+1];e(n),v[t]=void 0,v[t+1]=void 0}r=0}var h,m,_,y,w=void 0;function b(t,e){var n=this,r=new this.constructor(A);void 0===r[j]&&X(r);var i=n._state;if(i){var o=arguments[i-1];s(function(){return q(i,r,o,n._result)})}else L(n,r,t,e);return r}function g(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(A);return x(e,t),e}l?w=function(){return process.nextTick(d)}:c?(m=0,_=new c(d),y=document.createTextNode(""),_.observe(y,{characterData:!0}),w=function(){y.data=m=++m%2}):f?((h=new MessageChannel).port1.onmessage=d,w=function(){return h.port2.postMessage(0)}):w=void 0===a?function(){try{var t=Function("return this")().require("vertx");return void 0!==(i=t.runOnLoop||t.runOnContext)?function(){i(d)}:p()}catch(t){return p()}}():p();var j=Math.random().toString(36).substring(2);function A(){}var O=void 0,D=1,S=2,T={error:null};function E(t){try{return t.then}catch(t){return T.error=t,T}}function k(e,n,r){n.constructor===e.constructor&&r===b&&n.constructor.resolve===g?function(t,e){e._state===D?M(t,e._result):e._state===S?P(t,e._result):L(e,void 0,function(e){return x(t,e)},function(e){return P(t,e)})}(e,n):r===T?(P(e,T.error),T.error=null):void 0===r?M(e,n):t(r)?function(t,e,n){s(function(t){var r=!1,i=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(n,e,function(n){r||(r=!0,e!==n?x(t,n):M(t,n))},function(e){r||(r=!0,P(t,e))},t._label);!r&&i&&(r=!0,P(t,i))},t)}(e,n,r):M(e,n)}function x(t,e){var n,r;t===e?P(t,new TypeError("You cannot resolve a promise with itself")):(r=typeof(n=e),null===n||"object"!==r&&"function"!==r?M(t,e):k(t,e,E(e)))}function C(t){t._onerror&&t._onerror(t._result),R(t)}function M(t,e){t._state===O&&(t._result=e,t._state=D,0!==t._subscribers.length&&s(R,t))}function P(t,e){t._state===O&&(t._state=S,t._result=e,s(C,t))}function L(t,e,n,r){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+D]=n,i[o+S]=r,0===o&&t._state&&s(R,t)}function R(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,i=void 0,o=t._result,s=0;s<e.length;s+=3)r=e[s],i=e[s+n],r?q(n,r,i,o):i(o);t._subscribers.length=0}}function q(e,n,r,i){var o=t(r),s=void 0,a=void 0,u=void 0,c=void 0;if(o){if((s=function(t,e){try{return t(e)}catch(t){return T.error=t,T}}(r,i))===T?(c=!0,a=s.error,s.error=null):u=!0,n===s)return void P(n,new TypeError("A promises callback cannot return that same promise."))}else s=i,u=!0;n._state!==O||(o&&u?x(n,s):c?P(n,a):e===D?M(n,s):e===S&&P(n,s))}var H=0;function X(t){t[j]=H++,t._state=void 0,t._result=void 0,t._subscribers=[]}var I=function(){function t(t,n){this._instanceConstructor=t,this.promise=new t(A),this.promise[j]||X(this.promise),e(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?M(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&M(this.promise,this._result))):P(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===O&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===g){var i=E(t);if(i===b&&t._state!==O)this._settledAt(t._state,e,t._result);else if("function"!=typeof i)this._remaining--,this._result[e]=t;else if(n===N){var o=new n(A);k(o,t,i),this._willSettleAt(o,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===O&&(this._remaining--,t===S?P(r,n):this._result[e]=n),0===this._remaining&&M(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;L(t,void 0,function(t){return n._settledAt(D,e,t)},function(t){return n._settledAt(S,e,t)})},t}(),N=function(){function t(e){this[j]=H++,this._result=this._state=void 0,this._subscribers=[],A!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(t,e){try{e(function(e){x(t,e)},function(e){P(t,e)})}catch(e){P(t,e)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(t){return this.then(null,t)},t.prototype.finally=function(t){var e=this.constructor;return this.then(function(n){return e.resolve(t()).then(function(){return n})},function(n){return e.resolve(t()).then(function(){throw n})})},t}();return N.prototype.then=b,N.all=function(t){return new I(this,t).promise},N.race=function(t){var n=this;return e(t)?new n(function(e,r){for(var i=t.length,o=0;o<i;o++)n.resolve(t[o]).then(e,r)}):new n(function(t,e){return e(new TypeError("You must pass an array to race."))})},N.resolve=g,N.reject=function(t){var e=new this(A);return P(e,t),e},N._setScheduler=function(t){o=t},N._setAsap=function(t){s=t},N._asap=s,N.polyfill=function(){var t=void 0;if(void 0!==n)t=n;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===r&&!e.cast)return}t.Promise=N},N.Promise=N,N}()}(e={exports:{}},e.exports),e.exports).Promise;let i;function o(){return new r((t,e)=>{window.GET_SERVER_TIME?t(window.GET_SERVER_TIME()):void 0===i?function(t,e){var n;try{n=new XMLHttpRequest}catch(t){try{n=new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{n=new ActiveXObject("Microsoft.XMLHTTP")}catch(t){return console.error("AJAX not supported"),void(e&&e())}}}n.onreadystatechange=function(){if(n.readyState===XMLHttpRequest.DONE)if(200===n.status)try{var r=JSON.parse(n.responseText);t&&t(r.data)}catch(t){console.error("parse json error"),e&&e()}else console.error("There was a problem with the request."),e&&e()},n.open("GET","https://app.myscrm.cn/njs/time",!0),n.send()}(function(e){i=e-Date.now(),t(Date.now()+i)},function(){i=0,console.error("get time fail, using local time"),t(Date.now())}):t(Date.now()+i)})}var s=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},c=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(t){var e=t.key,n=t.value,r=t.expires;return window.localStorage.setItem(e,JSON.stringify({value:n,expires:r}))},f=function(t,e,n){var r=e-t.length;if(r<=0)return t;for(var i="",o=0;o<r;o++)i+=n;return i+t},p=function(){function t(e){var n,r=this;s(this,t),this.opts=e,this.emitter=(n=n||Object.create(null),{on:function(t,e){(n[t]||(n[t]=[])).push(e)},off:function(t,e){n[t]&&n[t].splice(n[t].indexOf(e)>>>0,1)},emit:function(t,e){(n[t]||[]).slice().map(function(t){t(e)}),(n["*"]||[]).slice().map(function(n){n(t,e)})}}),this.emitTo=function(t){return function(e){return r.emitter(t,e)}},this.on=this.emitter.on,this.off=this.emitter.off,this.emit=this.emitter.emit}return a(t,[{key:"serialization",value:function(){var t=this.opts,e=t.title,n=t.id,r=t.end_date;return l({key:""+e+n,value:t,expires:r})}},{key:"isActive",value:function(){var t=this.opts;return!t.end_date||new Date(t.end_date)>=new Date}}]),t}(),v=function(t){function e(t,n){s(this,e);var r=u(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.meta=n,r.activeURL=t.activeURL,r.popupDom=r.makePopupDom(t),r.popupDom.querySelector(".js_pop_close.js_pop_close_btn").addEventListener("click",function(t){r.popupDom.remove(),r.emit("popClose",t)}),r.popupDom.querySelector(".js_pop_mask").addEventListener("click",function(t){r.popupDom.remove(),r.emit("maskClose",t)}),r.popupDom.querySelector(".content-inner").addEventListener("click",function(e){var n=t.urls,i=(n.length,n[Math.floor(Math.random()*n.length)]);window.location=i,r.emit("content-inner",e)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,p),a(e,[{key:"init",value:function(){(this.meta.dom||document.body).appendChild(this.popupDom)}},{key:"inRange",value:function(){var t=this.opts,e=t.start_date,n=t.end_date,r=t.time_start,i=t.time_end,o=(t.serverTime,new Date(t.serverTime));if(e&&o<e)return!1;if(n&&o>n)return!1;var s=f(o.getHours(),2,"0")+":"+f(o.getMinutes(),2,"0")+":"+f(o.getSeconds(),2,"0");return!(r&&s<r)&&!(i&&s>i)}},{key:"isActive",value:function(){var t,n=this.opts;if(!function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"isActive",this).call(this))return!1;if(!this.inRange())return!1;if("1"===n.is_first_show){n.meta=n.meta||{},n.meta.visitCb=n.meta.visitCb||[];var r=new Date(n.serverTime),i=(t=r,function(e){return(e-t)/864e5});return n.meta.visitCb.every(function(t){return i(new Date(t.time))<-1})}return!0}},{key:"makePopupDom",value:function(t){var e=t.imageUrl,n='<div class="js_pop_1ad1_wrapper">\n <div class="js_pop_mask"></div>\n <div class="js_pop_1ad1">\n <div class="content">\n <div class="content-inner" style="max-height: '+(window.innerHeight-40)+'px;">\n <div style="text-align: center">\n <img style="max-height: 100%;max-width: 100%;" src="'+e+'">\n </div>\n </div>\n <div class="js_pop_close js_pop_close_btn" />\n </div>\n </div>\n </div>',r=document.createElement("div");return r.innerHTML=n,r}},{key:"updateStatus",value:function(t){var e=this.opts;e.meta=e.meta||{},e.meta.visitCb=e.meta.visitCb||[],e.meta.visitCb.push({type:t,time:new Date(e.serverTime)}),this.serialization()}}]),e}(),d=function(){function t(e){s(this,t),this.opts=e||{}}return a(t,[{key:"setActiveOrigin",value:function(t){var e=this;return Promise.all([o(),t]).then(function(t){var e=c(t,2),n=e[0],r=e[1].data.data,i=r.id,o=r.title,s=r.end_date,a=r.start_date,u=r.date_modified,f=r.time_end,p=r.time_start,v=r.urls,d=r.image.data.url,h=r.is_first_show;s=s&&new Date(s),a=a&&new Date(a);var m,_={id:i,date_modified:u,urls:v.data.map(function(t){return t.text}),title:o,serverTime:n,end_date:s,start_date:a,time_end:f,time_start:p,imageUrl:d,is_first_show:h},y=""+o+i,w=function(t,e){var n=JSON.parse(window.localStorage.getItem(t));if(n){var r=n.value,i=n.expires;return i&&new Date(i)<e?(window.localStorage.removeItem(t),null):r}return null}(y,n);return w&&new Date(w.date_modified)>=new Date(_.date_modified)?((m=w).start_date=m.start_date&&new Date(m.start_date),m.end_date=m.end_date&&new Date(m.end_date),m):(l({key:y,value:_,expires:s}),_)}).then(function(t){var n=new v(t,{meta:e.opts.dom});n.isActive()&&(n.on("popClose",function(t){return n.updateStatus("popClose")}),n.on("maskClose",function(t){return n.updateStatus("maskClose")}),n.init(),e.active=n)})}}]),t}();return t.PopupActive=v,t.Manager=d,t}({});
{
"name": "@yued/activities",
"version": "1.0.1",
"version": "1.1.0",
"description": "",
"main": "dist/index.js",
"browser": "src/index.js",
"module": "src/index.js",
"es6": "src/index.js",
"jsnext: main": "src/index.js",
"scripts": {

@@ -10,3 +14,3 @@ "start": "rollup -c --environment BUILD:development -w",

"test": "echo \"Error: no test specified\" && exit 1",
"prepublish": "npm run build"
"prepublishOnly": "npm run build"
},

@@ -26,3 +30,3 @@ "keywords": [],

"dependencies": {
"@yunke/server-time": "^1.0.1",
"@yunke/server-time": "^1.0.2",
"mitt": "^1.1.3"

@@ -29,0 +33,0 @@ },

@@ -157,2 +157,3 @@ import mitt from 'mitt'

start_date,
date_modified,
time_end,

@@ -166,10 +167,11 @@ time_start,

start_date = start_date && new Date(start_date);
const value = { id, urls: urls.data.map(item => item.text), title, serverTime, end_date, start_date, time_end, time_start, imageUrl, is_first_show };
const value = { id, date_modified, urls: urls.data.map(item => item.text), title, serverTime, end_date, start_date, time_end, time_start, imageUrl, is_first_show };
const key = `${title}${id}`;
const local = get(key, serverTime);
if (!local) {
if (local && new Date(local.date_modified) >= new Date(value.date_modified)) {
return transform(local);
} else {
set({ key, value, expires: end_date })
return value;
}
return transform(local);
})

@@ -176,0 +178,0 @@ .then(v => {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc