New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@curium.rocks/data-emitter-base

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@curium.rocks/data-emitter-base - npm Package Compare versions

Comparing version 0.1.1-alpha.32 to 0.1.1-alpha.33

19

build/src/common.d.ts

@@ -11,2 +11,21 @@ import { IFormatSettings } from "./lib";

*
* @param {unknown} obj
* @param {string} methodName
* @return {boolean}
*/
export declare function hasMethod(obj: unknown, methodName: string): boolean;
/**
* Check if a object implements IDisposableAsync interface
* @param {unknown} obj
* @return {boolean}
*/
export declare function isDisposableAsync(obj: unknown): boolean;
/**
* Checks if an object implements the IDisposable interface
* @param {unknown} obj
* @return {boolean}
*/
export declare function isDisposable(obj: unknown): boolean;
/**
*
* @param {string} json

@@ -13,0 +32,0 @@ * @param {IFormatSettings} settings

36

build/src/common.js

@@ -6,6 +6,40 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.decrypt = exports.encrypt = void 0;
exports.decrypt = exports.encrypt = exports.isDisposable = exports.isDisposableAsync = exports.hasMethod = void 0;
const crypto_1 = __importDefault(require("crypto"));
/**
*
* @param {unknown} obj
* @param {string} methodName
* @return {boolean}
*/
function hasMethod(obj, methodName) {
if (obj == null)
return false;
if (typeof obj == 'object') {
const val = obj;
return typeof val[methodName] == 'function';
}
return false;
}
exports.hasMethod = hasMethod;
/**
* Check if a object implements IDisposableAsync interface
* @param {unknown} obj
* @return {boolean}
*/
function isDisposableAsync(obj) {
return hasMethod(obj, 'disposeAsync');
}
exports.isDisposableAsync = isDisposableAsync;
/**
* Checks if an object implements the IDisposable interface
* @param {unknown} obj
* @return {boolean}
*/
function isDisposable(obj) {
return hasMethod(obj, 'dispose');
}
exports.isDisposable = isDisposable;
/**
*
* @param {string} json

@@ -12,0 +46,0 @@ * @param {IFormatSettings} settings

19

build/src/dataEmitter.d.ts

@@ -138,21 +138,2 @@ import { IChronicler, IJsonSerializable } from "./chronicler";

*
* @param {unknown} obj
* @param {string} methodName
* @return {boolean}
*/
export declare function hasMethod(obj: unknown, methodName: string): boolean;
/**
* Check if a object implements IDisposableAsync interface
* @param {unknown} obj
* @return {boolean}
*/
export declare function isDisposableAsync(obj: unknown): boolean;
/**
* Checks if an object implements the IDisposable interface
* @param {unknown} obj
* @return {boolean}
*/
export declare function isDisposable(obj: unknown): boolean;
/**
*
* @param {Record<string, unknown>} obj

@@ -159,0 +140,0 @@ * @return {boolean}

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isJsonSerializable = exports.isDisposable = exports.isDisposableAsync = exports.hasMethod = void 0;
exports.isJsonSerializable = void 0;
/**
*
* @param {unknown} obj
* @param {string} methodName
* @return {boolean}
*/
function hasMethod(obj, methodName) {
if (obj == null)
return false;
if (typeof obj == 'object') {
const val = obj;
return typeof val[methodName] == 'function';
}
return false;
}
exports.hasMethod = hasMethod;
/**
* Check if a object implements IDisposableAsync interface
* @param {unknown} obj
* @return {boolean}
*/
function isDisposableAsync(obj) {
return hasMethod(obj, 'disposableAsync');
}
exports.isDisposableAsync = isDisposableAsync;
/**
* Checks if an object implements the IDisposable interface
* @param {unknown} obj
* @return {boolean}
*/
function isDisposable(obj) {
return hasMethod(obj, 'disposable');
}
exports.isDisposable = isDisposable;
/**
*
* @param {Record<string, unknown>} obj

@@ -41,0 +7,0 @@ * @return {boolean}

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

export { IDataEmitter, ICompoundDataEmitter, ICommand, IDataEvent, IExecutionResult, ISettings, ITraceableAction, IEmitterFactory, IDisposableAsync, IDisposable, IClassifier, IDataEventListener, IDataEventListenerFunc, IStatusChangeListener, IStatusChangeListenerFunc, IStatusEvent, IEmitterProvider, IChroniclerFactory, IChroniclerProvider, IEmitterDescription, IChroniclerDescription, IFormatSettings, isJsonSerializable, isDisposable, isDisposableAsync, hasMethod } from './dataEmitter';
export { IDataEmitter, ICompoundDataEmitter, ICommand, IDataEvent, IExecutionResult, ISettings, ITraceableAction, IEmitterFactory, IDisposableAsync, IDisposable, IClassifier, IDataEventListener, IDataEventListenerFunc, IStatusChangeListener, IStatusChangeListenerFunc, IStatusEvent, IEmitterProvider, IChroniclerFactory, IChroniclerProvider, IEmitterDescription, IChroniclerDescription, IFormatSettings, isJsonSerializable } from './dataEmitter';
export { BaseEmitter, BaseStatusEvent, BaseDataEvent } from './baseEmitter';

@@ -9,2 +9,2 @@ export { PollingEmitter, DeltaPollingEmitter } from './pollingEmitter';

export { BaseFactory, BaseEmitterFactory, BaseChroniclerFactory } from './factory';
export { ISerializableState } from './common';
export { ISerializableState, isDisposableAsync, isDisposable, hasMethod } from './common';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseChroniclerFactory = exports.BaseEmitterFactory = exports.BaseFactory = exports.ProviderSingleton = exports.isService = exports.LogLevel = exports.DeltaPollingEmitter = exports.PollingEmitter = exports.BaseDataEvent = exports.BaseStatusEvent = exports.BaseEmitter = exports.hasMethod = exports.isDisposableAsync = exports.isDisposable = exports.isJsonSerializable = void 0;
exports.hasMethod = exports.isDisposable = exports.isDisposableAsync = exports.BaseChroniclerFactory = exports.BaseEmitterFactory = exports.BaseFactory = exports.ProviderSingleton = exports.isService = exports.LogLevel = exports.DeltaPollingEmitter = exports.PollingEmitter = exports.BaseDataEvent = exports.BaseStatusEvent = exports.BaseEmitter = exports.isJsonSerializable = void 0;
var dataEmitter_1 = require("./dataEmitter");
Object.defineProperty(exports, "isJsonSerializable", { enumerable: true, get: function () { return dataEmitter_1.isJsonSerializable; } });
Object.defineProperty(exports, "isDisposable", { enumerable: true, get: function () { return dataEmitter_1.isDisposable; } });
Object.defineProperty(exports, "isDisposableAsync", { enumerable: true, get: function () { return dataEmitter_1.isDisposableAsync; } });
Object.defineProperty(exports, "hasMethod", { enumerable: true, get: function () { return dataEmitter_1.hasMethod; } });
var baseEmitter_1 = require("./baseEmitter");

@@ -26,2 +23,6 @@ Object.defineProperty(exports, "BaseEmitter", { enumerable: true, get: function () { return baseEmitter_1.BaseEmitter; } });

Object.defineProperty(exports, "BaseChroniclerFactory", { enumerable: true, get: function () { return factory_1.BaseChroniclerFactory; } });
var common_1 = require("./common");
Object.defineProperty(exports, "isDisposableAsync", { enumerable: true, get: function () { return common_1.isDisposableAsync; } });
Object.defineProperty(exports, "isDisposable", { enumerable: true, get: function () { return common_1.isDisposable; } });
Object.defineProperty(exports, "hasMethod", { enumerable: true, get: function () { return common_1.hasMethod; } });
//# sourceMappingURL=lib.js.map
import { IClassifier, IDataEmitter, IDisposable } from "./dataEmitter";
import { IChronicler } from "./chronicler";
import { IDisposableAsync } from "./lib";
/**

@@ -72,3 +73,3 @@ * Methods to start and stop a service,

*/
export interface IMaestro extends IEmitterMaestro, IChroniclerMaestro, IClassifier {
export interface IMaestro extends IEmitterMaestro, IChroniclerMaestro, IClassifier, IDisposableAsync {
/**

@@ -75,0 +76,0 @@ * connect the collection of emitters to the collection of chroniclers,

{
"name": "@curium.rocks/data-emitter-base",
"version": "0.1.1-alpha.32",
"version": "0.1.1-alpha.33",
"description": "A collection of typescript class interfaces and base classes that specify generic contracts with things that emit data",

@@ -5,0 +5,0 @@ "main": "build/src/lib.js",

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