Socket
Socket
Sign inDemoInstall

@xyo-network/base

Package Overview
Dependencies
Maintainers
4
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xyo-network/base - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

dist/@types/index.d.ts

2

dist/xyo-base.d.ts

@@ -17,2 +17,4 @@ import { XyoLogger } from "@xyo-network/logger";

static stringify(value: any): string;
private cache;
protected getOrCreate<T>(name: string, initializer: () => T): T;
/** Logs to the `info` level */

@@ -19,0 +21,0 @@ protected logInfo(message?: any, ...optionalParams: any[]): void;

@@ -8,3 +8,3 @@ "use strict";

* @Last modified by: ryanxyo
* @Last modified time: Monday, 19th November 2018 11:35:28 am
* @Last modified time: Monday, 10th December 2018 1:26:51 pm
* @License: All Rights Reserved

@@ -19,2 +19,3 @@ * @Copyright: Copyright XY | The Findables Company

const fast_safe_stringify_1 = __importDefault(require("fast-safe-stringify"));
const xyo_simple_cache_1 = require("./xyo-simple-cache");
/**

@@ -40,2 +41,8 @@ * A general purpose base class that can be used to incorporate

}
getOrCreate(name, initializer) {
if (!this.cache) {
this.cache = new xyo_simple_cache_1.XyoSimpleCache();
}
return this.cache.getOrCreate(name, initializer);
}
/** Logs to the `info` level */

@@ -42,0 +49,0 @@ logInfo(message, ...optionalParams) {

6

package.json
{
"name": "@xyo-network/base",
"version": "0.2.1",
"version": "0.3.0",
"description": "A base class for the Xyo Network",

@@ -10,3 +10,3 @@ "main": "dist/index.js",

"dependencies": {
"@xyo-network/logger": "^0.2.1",
"@xyo-network/logger": "^0.3.0",
"fast-safe-stringify": "^2.0.6"

@@ -23,3 +23,3 @@ },

},
"gitHead": "0635d162b742fbb5ee4f09d4e3faf5149b43eaf0"
"gitHead": "55319bda08512a2701fb6494ad2e2526791e6bb7"
}

@@ -7,3 +7,3 @@ /*

* @Last modified by: ryanxyo
* @Last modified time: Monday, 19th November 2018 11:35:28 am
* @Last modified time: Monday, 10th December 2018 1:26:51 pm
* @License: All Rights Reserved

@@ -15,2 +15,4 @@ * @Copyright: Copyright XY | The Findables Company

import safeStringify from 'fast-safe-stringify'
import { ISimpleCache } from "./@types"
import { XyoSimpleCache } from "./xyo-simple-cache"

@@ -43,2 +45,12 @@ /**

private cache: ISimpleCache | undefined
protected getOrCreate<T>(name: string, initializer: () => T): T {
if (!this.cache) {
this.cache = new XyoSimpleCache()
}
return this.cache.getOrCreate(name, initializer)
}
/** Logs to the `info` level */

@@ -45,0 +57,0 @@ protected logInfo(message?: any, ...optionalParams: any[]) {

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