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

@objectiv/queue-local-storage

Package Overview
Dependencies
Maintainers
2
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@objectiv/queue-local-storage - npm Package Compare versions

Comparing version 0.0.25-next.0 to 0.0.26-experimental.0

2

dist/esm/index.js

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

var r={name:"@objectiv/queue-local-storage",version:"0.0.25-next.0",description:"A TrackerQueueStore based on localStorage API",license:"Apache-2.0",homepage:"https://objectiv.io",keywords:["objectiv","tracking","analytics","events","taxonomy","queue","localstorage"],repository:{type:"git",url:"https://github.com/objectiv/objectiv-analytics.git",directory:"tracker/queue/local-storage"},bugs:"https://github.com/objectiv/objectiv-analytics/issues",contributors:[{name:"Surai Di Rosa",email:"surai.dirosa@gmail.com",url:"https://github.com/sdirosa"}],main:"./dist/index.js",module:"./dist/esm/index.js",types:"./dist/index.d.ts",files:["dist"],exports:{".":{require:"./dist/index.js",import:"./dist/esm/index.js",types:"./dist/index.d.ts"}},scripts:{build:"tsup src/index.ts --format cjs,esm --legacy-output --minify --dts --sourcemap --clean","deploy:verdaccio":"npm publish",prettify:"prettier --write .",tsc:"tsc --noEmit",test:"jest --silent","test:ci":"jest --silent --ci","test:coverage":"jest --silent --coverage",depcheck:"npx depcheck"},devDependencies:{"@objectiv/developer-tools":"^0.0.25-next.0","@objectiv/testing-tools":"^0.0.25-next.0",jest:"^28.1.3",prettier:"^2.7.1","ts-jest":"^28.0.7",tsup:"^6.2.1",typescript:"^4.7.4"},dependencies:{"@objectiv/tracker-core":"~0.0.25-next.0"}};var s=class{constructor(t){this.queueStoreName="LocalStorageQueueStore";var e;if(typeof localStorage>"u")throw new Error(`${this.queueStoreName}: failed to initialize: localStorage is not available.`);this.localStorageKey=`objectiv-events-queue-${t.trackerId}`,(e=globalThis.objectiv.devTools)==null||e.TrackerConsole.log(`%c\uFF62objectiv:${this.queueStoreName}\uFF63 Initialized`,"font-weight: bold")}getEventsFromLocalStorage(){var t;try{return JSON.parse(localStorage.getItem(this.localStorageKey)??"[]")}catch(e){(t=globalThis.objectiv.devTools)==null||t.TrackerConsole.error(`%c\uFF62objectiv:${this.queueStoreName}\uFF63 Failed to parse Events from localStorage: ${e}`,"font-weight: bold")}return[]}writeEventsToLocalStorage(t){var e;try{localStorage.setItem(this.localStorageKey,JSON.stringify(t))}catch(o){(e=globalThis.objectiv.devTools)==null||e.TrackerConsole.error(`%c\uFF62objectiv:${this.queueStoreName}\uFF63 Failed to write Events to localStorage: ${o}`,"font-weight: bold")}}get length(){return this.getEventsFromLocalStorage().length}async read(t,e){let o=this.getEventsFromLocalStorage();return e&&(o=o.filter(e)),o.slice(0,t)}async write(...t){let e=this.getEventsFromLocalStorage();e.push(...t),this.writeEventsToLocalStorage(e)}async delete(t){let e=this.getEventsFromLocalStorage();e=e.filter(o=>!t.includes(o.id)),this.writeEventsToLocalStorage(e)}async clear(){this.writeEventsToLocalStorage([])}};globalThis.objectiv=globalThis.objectiv??{};globalThis.objectiv.versions=globalThis.objectiv.versions??new Map;globalThis.objectiv.versions.set(r.name,r.version);export{s as LocalStorageQueueStore};
var r={name:"@objectiv/queue-local-storage",version:"0.0.26-experimental.0",description:"A TrackerQueueStore based on localStorage API",license:"Apache-2.0",homepage:"https://objectiv.io",keywords:["objectiv","tracking","analytics","events","taxonomy","queue","localstorage"],repository:{type:"git",url:"https://github.com/objectiv/objectiv-analytics.git",directory:"tracker/queue/local-storage"},bugs:"https://github.com/objectiv/objectiv-analytics/issues",contributors:[{name:"Surai Di Rosa",email:"surai.dirosa@gmail.com",url:"https://github.com/sdirosa"}],main:"./dist/index.js",module:"./dist/esm/index.js",types:"./dist/index.d.ts",files:["dist"],exports:{".":{require:"./dist/index.js",import:"./dist/esm/index.js",types:"./dist/index.d.ts"}},scripts:{build:"tsup src/index.ts --format cjs,esm --legacy-output --minify --dts --sourcemap --clean","deploy:verdaccio":"npm publish",prettify:"prettier --write .",tsc:"tsc --noEmit",test:"jest --silent","test:ci":"jest --silent --ci","test:coverage":"jest --silent --coverage",depcheck:"npx depcheck"},devDependencies:{"@objectiv/developer-tools":"^0.0.26-experimental.0","@objectiv/testing-tools":"^0.0.26-experimental.0",jest:"^28.1.3",prettier:"^2.7.1","ts-jest":"^28.0.7",tsup:"^6.2.1",typescript:"^4.7.4"},dependencies:{"@objectiv/tracker-core":"~0.0.26-experimental.0"}};var i=class{constructor(t){this.queueStoreName="LocalStorageQueueStore";var e;if(typeof localStorage>"u")throw new Error(`${this.queueStoreName}: failed to initialize: localStorage is not available.`);this.localStorageKey=`objectiv-events-queue-${t.trackerId}`,(e=globalThis.objectiv.devTools)==null||e.TrackerConsole.log(`%c\uFF62objectiv:${this.queueStoreName}\uFF63 Initialized`,"font-weight: bold")}getEventsFromLocalStorage(){var t;try{return JSON.parse(localStorage.getItem(this.localStorageKey)??"[]")}catch(e){(t=globalThis.objectiv.devTools)==null||t.TrackerConsole.error(`%c\uFF62objectiv:${this.queueStoreName}\uFF63 Failed to parse Events from localStorage: ${e}`,"font-weight: bold")}return[]}writeEventsToLocalStorage(t){var e;try{localStorage.setItem(this.localStorageKey,JSON.stringify(t))}catch(o){(e=globalThis.objectiv.devTools)==null||e.TrackerConsole.error(`%c\uFF62objectiv:${this.queueStoreName}\uFF63 Failed to write Events to localStorage: ${o}`,"font-weight: bold")}}get length(){return this.getEventsFromLocalStorage().length}async read(t,e){let o=this.getEventsFromLocalStorage();return e&&(o=o.filter(e)),o.slice(0,t)}async write(...t){let e=this.getEventsFromLocalStorage();e.push(...t),this.writeEventsToLocalStorage(e)}async delete(t){let e=this.getEventsFromLocalStorage();e=e.filter(o=>!t.includes(o.id)),this.writeEventsToLocalStorage(e)}async clear(){this.writeEventsToLocalStorage([])}};globalThis.objectiv=globalThis.objectiv??{};globalThis.objectiv.versions=globalThis.objectiv.versions??new Map;globalThis.objectiv.versions.set(r.name,r.version);export{i as LocalStorageQueueStore};
//# sourceMappingURL=index.js.map

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

"use strict";var i=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var v=(r,e)=>{for(var t in e)i(r,t,{get:e[t],enumerable:!0})},u=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of l(e))!g.call(r,s)&&s!==t&&i(r,s,{get:()=>e[s],enumerable:!(o=n(e,s))||o.enumerable});return r};var d=r=>u(i({},"__esModule",{value:!0}),r);var p={};v(p,{LocalStorageQueueStore:()=>c});module.exports=d(p);var a={name:"@objectiv/queue-local-storage",version:"0.0.25-next.0",description:"A TrackerQueueStore based on localStorage API",license:"Apache-2.0",homepage:"https://objectiv.io",keywords:["objectiv","tracking","analytics","events","taxonomy","queue","localstorage"],repository:{type:"git",url:"https://github.com/objectiv/objectiv-analytics.git",directory:"tracker/queue/local-storage"},bugs:"https://github.com/objectiv/objectiv-analytics/issues",contributors:[{name:"Surai Di Rosa",email:"surai.dirosa@gmail.com",url:"https://github.com/sdirosa"}],main:"./dist/index.js",module:"./dist/esm/index.js",types:"./dist/index.d.ts",files:["dist"],exports:{".":{require:"./dist/index.js",import:"./dist/esm/index.js",types:"./dist/index.d.ts"}},scripts:{build:"tsup src/index.ts --format cjs,esm --legacy-output --minify --dts --sourcemap --clean","deploy:verdaccio":"npm publish",prettify:"prettier --write .",tsc:"tsc --noEmit",test:"jest --silent","test:ci":"jest --silent --ci","test:coverage":"jest --silent --coverage",depcheck:"npx depcheck"},devDependencies:{"@objectiv/developer-tools":"^0.0.25-next.0","@objectiv/testing-tools":"^0.0.25-next.0",jest:"^28.1.3",prettier:"^2.7.1","ts-jest":"^28.0.7",tsup:"^6.2.1",typescript:"^4.7.4"},dependencies:{"@objectiv/tracker-core":"~0.0.25-next.0"}};var c=class{constructor(e){this.queueStoreName="LocalStorageQueueStore";var t;if(typeof localStorage>"u")throw new Error(`${this.queueStoreName}: failed to initialize: localStorage is not available.`);this.localStorageKey=`objectiv-events-queue-${e.trackerId}`,(t=globalThis.objectiv.devTools)==null||t.TrackerConsole.log(`%c\uFF62objectiv:${this.queueStoreName}\uFF63 Initialized`,"font-weight: bold")}getEventsFromLocalStorage(){var e;try{return JSON.parse(localStorage.getItem(this.localStorageKey)??"[]")}catch(t){(e=globalThis.objectiv.devTools)==null||e.TrackerConsole.error(`%c\uFF62objectiv:${this.queueStoreName}\uFF63 Failed to parse Events from localStorage: ${t}`,"font-weight: bold")}return[]}writeEventsToLocalStorage(e){var t;try{localStorage.setItem(this.localStorageKey,JSON.stringify(e))}catch(o){(t=globalThis.objectiv.devTools)==null||t.TrackerConsole.error(`%c\uFF62objectiv:${this.queueStoreName}\uFF63 Failed to write Events to localStorage: ${o}`,"font-weight: bold")}}get length(){return this.getEventsFromLocalStorage().length}async read(e,t){let o=this.getEventsFromLocalStorage();return t&&(o=o.filter(t)),o.slice(0,e)}async write(...e){let t=this.getEventsFromLocalStorage();t.push(...e),this.writeEventsToLocalStorage(t)}async delete(e){let t=this.getEventsFromLocalStorage();t=t.filter(o=>!e.includes(o.id)),this.writeEventsToLocalStorage(t)}async clear(){this.writeEventsToLocalStorage([])}};globalThis.objectiv=globalThis.objectiv??{};globalThis.objectiv.versions=globalThis.objectiv.versions??new Map;globalThis.objectiv.versions.set(a.name,a.version);0&&(module.exports={LocalStorageQueueStore});
"use strict";var s=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var v=(r,e)=>{for(var t in e)s(r,t,{get:e[t],enumerable:!0})},u=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of l(e))!g.call(r,i)&&i!==t&&s(r,i,{get:()=>e[i],enumerable:!(o=n(e,i))||o.enumerable});return r};var m=r=>u(s({},"__esModule",{value:!0}),r);var p={};v(p,{LocalStorageQueueStore:()=>c});module.exports=m(p);var a={name:"@objectiv/queue-local-storage",version:"0.0.26-experimental.0",description:"A TrackerQueueStore based on localStorage API",license:"Apache-2.0",homepage:"https://objectiv.io",keywords:["objectiv","tracking","analytics","events","taxonomy","queue","localstorage"],repository:{type:"git",url:"https://github.com/objectiv/objectiv-analytics.git",directory:"tracker/queue/local-storage"},bugs:"https://github.com/objectiv/objectiv-analytics/issues",contributors:[{name:"Surai Di Rosa",email:"surai.dirosa@gmail.com",url:"https://github.com/sdirosa"}],main:"./dist/index.js",module:"./dist/esm/index.js",types:"./dist/index.d.ts",files:["dist"],exports:{".":{require:"./dist/index.js",import:"./dist/esm/index.js",types:"./dist/index.d.ts"}},scripts:{build:"tsup src/index.ts --format cjs,esm --legacy-output --minify --dts --sourcemap --clean","deploy:verdaccio":"npm publish",prettify:"prettier --write .",tsc:"tsc --noEmit",test:"jest --silent","test:ci":"jest --silent --ci","test:coverage":"jest --silent --coverage",depcheck:"npx depcheck"},devDependencies:{"@objectiv/developer-tools":"^0.0.26-experimental.0","@objectiv/testing-tools":"^0.0.26-experimental.0",jest:"^28.1.3",prettier:"^2.7.1","ts-jest":"^28.0.7",tsup:"^6.2.1",typescript:"^4.7.4"},dependencies:{"@objectiv/tracker-core":"~0.0.26-experimental.0"}};var c=class{constructor(e){this.queueStoreName="LocalStorageQueueStore";var t;if(typeof localStorage>"u")throw new Error(`${this.queueStoreName}: failed to initialize: localStorage is not available.`);this.localStorageKey=`objectiv-events-queue-${e.trackerId}`,(t=globalThis.objectiv.devTools)==null||t.TrackerConsole.log(`%c\uFF62objectiv:${this.queueStoreName}\uFF63 Initialized`,"font-weight: bold")}getEventsFromLocalStorage(){var e;try{return JSON.parse(localStorage.getItem(this.localStorageKey)??"[]")}catch(t){(e=globalThis.objectiv.devTools)==null||e.TrackerConsole.error(`%c\uFF62objectiv:${this.queueStoreName}\uFF63 Failed to parse Events from localStorage: ${t}`,"font-weight: bold")}return[]}writeEventsToLocalStorage(e){var t;try{localStorage.setItem(this.localStorageKey,JSON.stringify(e))}catch(o){(t=globalThis.objectiv.devTools)==null||t.TrackerConsole.error(`%c\uFF62objectiv:${this.queueStoreName}\uFF63 Failed to write Events to localStorage: ${o}`,"font-weight: bold")}}get length(){return this.getEventsFromLocalStorage().length}async read(e,t){let o=this.getEventsFromLocalStorage();return t&&(o=o.filter(t)),o.slice(0,e)}async write(...e){let t=this.getEventsFromLocalStorage();t.push(...e),this.writeEventsToLocalStorage(t)}async delete(e){let t=this.getEventsFromLocalStorage();t=t.filter(o=>!e.includes(o.id)),this.writeEventsToLocalStorage(t)}async clear(){this.writeEventsToLocalStorage([])}};globalThis.objectiv=globalThis.objectiv??{};globalThis.objectiv.versions=globalThis.objectiv.versions??new Map;globalThis.objectiv.versions.set(a.name,a.version);0&&(module.exports={LocalStorageQueueStore});
//# sourceMappingURL=index.js.map
{
"name": "@objectiv/queue-local-storage",
"version": "0.0.25-next.0",
"version": "0.0.26-experimental.0",
"description": "A TrackerQueueStore based on localStorage API",

@@ -53,4 +53,4 @@ "license": "Apache-2.0",

"devDependencies": {
"@objectiv/developer-tools": "^0.0.25-next.0",
"@objectiv/testing-tools": "^0.0.25-next.0",
"@objectiv/developer-tools": "^0.0.26-experimental.0",
"@objectiv/testing-tools": "^0.0.26-experimental.0",
"jest": "^28.1.3",

@@ -63,4 +63,4 @@ "prettier": "^2.7.1",

"dependencies": {
"@objectiv/tracker-core": "~0.0.25-next.0"
"@objectiv/tracker-core": "~0.0.26-experimental.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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