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

protofun

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protofun - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

1

dist/utils.d.ts

@@ -8,3 +8,2 @@ import { Candle, MetricId, ProtocolId, QueryFn, SubscribeFn, Timeframe } from "./protofun";

};
export declare function loadMetricFns(protocolId: ProtocolId, metricId: MetricId, packagePath?: string): Promise<MetricFnsResult>;
export declare function getLowestTimeframe(supportedTimeframes: Timeframe[]): Timeframe;

@@ -11,0 +10,0 @@ export declare function isProtocolId(value: string): value is ProtocolId;

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.isCandleArray = exports.isCandle = exports.isTimeframe = exports.isMetric = exports.isProtocolId = exports.getLowestTimeframe = exports.loadMetricFns = exports.allTimeframes = exports.wait = void 0;
exports.isCandleArray = exports.isCandle = exports.isTimeframe = exports.isMetric = exports.isProtocolId = exports.getLowestTimeframe = exports.allTimeframes = exports.wait = void 0;
const protofun_1 = require("./protofun");

@@ -33,8 +10,2 @@ async function wait(ms) {

exports.allTimeframes = ["Block", "Minute", "Hour", "Day", "Week"];
async function loadMetricFns(protocolId, metricId, packagePath = "protofun/dist/metrics") {
const module = await Promise.resolve().then(() => __importStar(require(`${packagePath}/${protocolId}/${metricId}`)));
const { default: query, subscribe } = module;
return { query, subscribe };
}
exports.loadMetricFns = loadMetricFns;
function getLowestTimeframe(supportedTimeframes) {

@@ -41,0 +12,0 @@ return supportedTimeframes.find((x) => x !== "Block");

5

package.json
{
"name": "protofun",
"license": "UNLICENSED",
"version": "0.2.2",
"version": "0.2.3",
"files": [

@@ -13,4 +13,3 @@ "dist",

"scripts": {
"start": "concurrently 'vite build --watch' 'npm run types --watch --preserveWatchOutput' --names 'vite,tsc' -c 'green,blue'",
"build": "tsc --project tsconfig.prod.json",
"build": "rm -rf dist/ && tsc --project tsconfig.prod.json",
"check-types": "tsc --noEmit",

@@ -17,0 +16,0 @@ "prepublish": "npm run build",

@@ -24,12 +24,2 @@ import {

export async function loadMetricFns(
protocolId: ProtocolId,
metricId: MetricId,
packagePath = "protofun/dist/metrics"
): Promise<MetricFnsResult> {
const module = await import(`${packagePath}/${protocolId}/${metricId}`)
const { default: query, subscribe } = module
return { query, subscribe }
}
export function getLowestTimeframe(supportedTimeframes: Timeframe[]) {

@@ -36,0 +26,0 @@ return supportedTimeframes.find((x) => x !== "Block") as Timeframe

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