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

@xyo-network/previous-hash-store-storage

Package Overview
Dependencies
Maintainers
0
Versions
537
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xyo-network/previous-hash-store-storage - npm Package Compare versions

Comparing version 2.107.3 to 2.107.4

44

dist/browser/index.js

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

var p=Object.defineProperty;var s=(t,e)=>p(t,"name",{value:e,configurable:!0});import r from"store2";var i=class t{static{s(this,"StoragePreviousHashStore")}static DefaultNamespace="xyo-previous-hash-store";static DefaultStorageType="local";_namespace=t.DefaultNamespace;_storage;_type=t.DefaultStorageType;constructor(e){e?.namespace&&(this._namespace=e.namespace),e?.type&&(this._type=e.type),this._storage=r[this.type].namespace(this.namespace)}get namespace(){return this._namespace}get type(){return this._type}get storage(){return this?._storage||(this._storage=r[this.type].namespace(this.namespace)),this._storage}async getItem(e){return await this.storage.get(e)??null}async removeItem(e){await this.storage.remove(e)}async setItem(e,a){await this.storage.set(e,a)}};export{i as StoragePreviousHashStore};
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
// src/StoragePreviousHashStore.ts
import store from "store2";
var StoragePreviousHashStore = class _StoragePreviousHashStore {
static {
__name(this, "StoragePreviousHashStore");
}
static DefaultNamespace = "xyo-previous-hash-store";
static DefaultStorageType = "local";
_namespace = _StoragePreviousHashStore.DefaultNamespace;
_storage;
_type = _StoragePreviousHashStore.DefaultStorageType;
constructor(opts) {
if (opts?.namespace) this._namespace = opts.namespace;
if (opts?.type) this._type = opts.type;
this._storage = store[this.type].namespace(this.namespace);
}
get namespace() {
return this._namespace;
}
get type() {
return this._type;
}
get storage() {
if (!this?._storage) this._storage = store[this.type].namespace(this.namespace);
return this._storage;
}
async getItem(address) {
const value = await this.storage.get(address);
return value ?? null;
}
async removeItem(address) {
await this.storage.remove(address);
}
async setItem(address, previousHash) {
await this.storage.set(address, previousHash);
}
};
export {
StoragePreviousHashStore
};
//# sourceMappingURL=index.js.map

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

var p=Object.defineProperty;var s=(t,e)=>p(t,"name",{value:e,configurable:!0});import r from"store2";var i=class t{static{s(this,"StoragePreviousHashStore")}static DefaultNamespace="xyo-previous-hash-store";static DefaultStorageType="local";_namespace=t.DefaultNamespace;_storage;_type=t.DefaultStorageType;constructor(e){e?.namespace&&(this._namespace=e.namespace),e?.type&&(this._type=e.type),this._storage=r[this.type].namespace(this.namespace)}get namespace(){return this._namespace}get type(){return this._type}get storage(){return this?._storage||(this._storage=r[this.type].namespace(this.namespace)),this._storage}async getItem(e){return await this.storage.get(e)??null}async removeItem(e){await this.storage.remove(e)}async setItem(e,a){await this.storage.set(e,a)}};export{i as StoragePreviousHashStore};
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
// src/StoragePreviousHashStore.ts
import store from "store2";
var StoragePreviousHashStore = class _StoragePreviousHashStore {
static {
__name(this, "StoragePreviousHashStore");
}
static DefaultNamespace = "xyo-previous-hash-store";
static DefaultStorageType = "local";
_namespace = _StoragePreviousHashStore.DefaultNamespace;
_storage;
_type = _StoragePreviousHashStore.DefaultStorageType;
constructor(opts) {
if (opts?.namespace) this._namespace = opts.namespace;
if (opts?.type) this._type = opts.type;
this._storage = store[this.type].namespace(this.namespace);
}
get namespace() {
return this._namespace;
}
get type() {
return this._type;
}
get storage() {
if (!this?._storage) this._storage = store[this.type].namespace(this.namespace);
return this._storage;
}
async getItem(address) {
const value = await this.storage.get(address);
return value ?? null;
}
async removeItem(address) {
await this.storage.remove(address);
}
async setItem(address, previousHash) {
await this.storage.set(address, previousHash);
}
};
export {
StoragePreviousHashStore
};
//# sourceMappingURL=index.js.map

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

var i=Object.defineProperty;var p=(t,e,a)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a;var m=(t,e)=>i(t,"name",{value:e,configurable:!0});var c=(t,e,a)=>p(t,typeof e!="symbol"?e+"":e,a);import n from"store2";var s=class s{_namespace=s.DefaultNamespace;_storage;_type=s.DefaultStorageType;constructor(e){e!=null&&e.namespace&&(this._namespace=e.namespace),e!=null&&e.type&&(this._type=e.type),this._storage=n[this.type].namespace(this.namespace)}get namespace(){return this._namespace}get type(){return this._type}get storage(){return this!=null&&this._storage||(this._storage=n[this.type].namespace(this.namespace)),this._storage}async getItem(e){return await this.storage.get(e)??null}async removeItem(e){await this.storage.remove(e)}async setItem(e,a){await this.storage.set(e,a)}};m(s,"StoragePreviousHashStore"),c(s,"DefaultNamespace","xyo-previous-hash-store"),c(s,"DefaultStorageType","local");var r=s;export{r as StoragePreviousHashStore};
var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
// src/StoragePreviousHashStore.ts
import store from "store2";
var _StoragePreviousHashStore = class _StoragePreviousHashStore {
_namespace = _StoragePreviousHashStore.DefaultNamespace;
_storage;
_type = _StoragePreviousHashStore.DefaultStorageType;
constructor(opts) {
if (opts == null ? void 0 : opts.namespace) this._namespace = opts.namespace;
if (opts == null ? void 0 : opts.type) this._type = opts.type;
this._storage = store[this.type].namespace(this.namespace);
}
get namespace() {
return this._namespace;
}
get type() {
return this._type;
}
get storage() {
if (!(this == null ? void 0 : this._storage)) this._storage = store[this.type].namespace(this.namespace);
return this._storage;
}
async getItem(address) {
const value = await this.storage.get(address);
return value ?? null;
}
async removeItem(address) {
await this.storage.remove(address);
}
async setItem(address, previousHash) {
await this.storage.set(address, previousHash);
}
};
__name(_StoragePreviousHashStore, "StoragePreviousHashStore");
__publicField(_StoragePreviousHashStore, "DefaultNamespace", "xyo-previous-hash-store");
__publicField(_StoragePreviousHashStore, "DefaultStorageType", "local");
var StoragePreviousHashStore = _StoragePreviousHashStore;
export {
StoragePreviousHashStore
};
//# sourceMappingURL=index.js.map

8

package.json

@@ -15,8 +15,8 @@ {

"@xylabs/hex": "^3.5.1",
"@xyo-network/previous-hash-store-model": "~2.107.3",
"@xyo-network/previous-hash-store-model": "~2.107.4",
"store2": "^2.14.3"
},
"devDependencies": {
"@xylabs/ts-scripts-yarn3": "^3.11.9",
"@xylabs/tsconfig": "^3.11.9",
"@xylabs/ts-scripts-yarn3": "^3.11.10",
"@xylabs/tsconfig": "^3.11.10",
"typescript": "^5.5.2",

@@ -63,4 +63,4 @@ "uuid": "^10.0.0"

"types": "dist/node/index.d.ts",
"version": "2.107.3",
"version": "2.107.4",
"type": "module"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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