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

nomics

Package Overview
Dependencies
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nomics - npm Package Compare versions

Comparing version 0.2.8 to 0.2.9

10

dist/api/currencies_ticker.js

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

Object.defineProperty(exports, "__esModule", { value: true });
var __1 = __importDefault(require(".."));
var constants_1 = require("../constants");
var fetch_1 = require("../utils/fetch");
var url_1 = require("../utils/url");
var fetch_1 = require("../utils/fetch");
var __1 = __importDefault(require(".."));
var CURRENCIES_TICKER_PATH = "/v1/currencies/ticker";

@@ -57,6 +57,6 @@ var currenciesTicker = function (key, options) {

ids: ids && ids.join(","),
"include-transparency": includeTransparency,
interval: interval && interval.join(","),
"quote-currency": quoteCurrency,
"include-transparency": includeTransparency,
key: key
key: key,
"quote-currency": quoteCurrency
};

@@ -63,0 +63,0 @@ return [2 /*return*/, fetch_1.fetchJSON("" + __1.default.NOMICS_API_BASE + CURRENCIES_TICKER_PATH + "?" + url_1.objToUrlParams(objParams))];

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

import { ICurrenciesTickerOptions, IRawCurrencyTicker, CurrencyTickerInterval } from "./api/currencies_ticker";
import { CurrencyTickerInterval, ICurrenciesTickerOptions, IRawCurrencyTicker } from "./api/currencies_ticker";
import { IntervalEnum } from "./constants";

@@ -13,6 +13,6 @@ export { IRawCurrencyTicker, CurrencyTickerInterval };

declare class Nomics {
static NOMICS_API_BASE: string;
private static baseUrl;
private apiKey;
private version;
private static baseUrl;
static NOMICS_API_BASE: string;
constructor(options: INomicsOptions);

@@ -19,0 +19,0 @@ currenciesTicker(options?: ICurrenciesTickerOptions): Promise<IRawCurrencyTicker[]>;

@@ -53,4 +53,3 @@ "use strict";

}
return [4 /*yield*/, res.json()];
case 2: return [2 /*return*/, _a.sent()];
return [2 /*return*/, res.json()];
}

@@ -57,0 +56,0 @@ });

{
"name": "nomics",
"version": "0.2.8",
"version": "0.2.9",
"description": "",

@@ -21,5 +21,6 @@ "main": "dist/index.js",

"@types/jest": "^24.0.0",
"jest": "^23.6.0",
"jest": "^24.8.0",
"prettier": "^1.16.4",
"ts-jest": "^23.10.5",
"ts-jest": "^24.0.2",
"tslint": "^5.18.0",
"tslint-config-prettier": "^1.18.0",

@@ -26,0 +27,0 @@ "typescript": "^3.3.1"

@@ -0,5 +1,5 @@

import Nomics from "..";
import { API_BASE } from "../constants";
import { fetchJSON } from "../utils/fetch";
import currenciesTicker from "./currencies_ticker";
import { fetchJSON } from "../utils/fetch";
import { API_BASE } from "../constants";
import Nomics from "..";

@@ -6,0 +6,0 @@ jest.mock("../utils/fetch");

@@ -0,5 +1,5 @@

import Nomics from "..";
import { IntervalEnum } from "../constants";
import { fetchJSON } from "../utils/fetch";
import { objToUrlParams } from "../utils/url";
import { fetchJSON } from "../utils/fetch";
import Nomics from "..";

@@ -14,2 +14,3 @@ export interface ICurrenciesTickerOptions {

// tslint:disable-next-line: interface-over-type-literal
export type CurrencyTickerInterval = {

@@ -27,2 +28,3 @@ volume: string;

// tslint:disable-next-line: interface-over-type-literal
export type VolumeTransparency = {

@@ -79,6 +81,6 @@ grade: string;

ids: ids && ids.join(","),
"include-transparency": includeTransparency,
interval: interval && interval.join(","),
"quote-currency": quoteCurrency,
"include-transparency": includeTransparency,
key
key,
"quote-currency": quoteCurrency
};

@@ -85,0 +87,0 @@

import currenciesTicker, {
CurrencyTickerInterval,
ICurrenciesTickerOptions,
IRawCurrencyTicker,
CurrencyTickerInterval
IRawCurrencyTicker
} from "./api/currencies_ticker";
import { IntervalEnum, API_BASE } from "./constants";
import { API_BASE, IntervalEnum } from "./constants";
import { isEmpty } from "./utils/str";

@@ -24,7 +24,2 @@

class Nomics {
private apiKey: string;
private version: number = 1;
private static baseUrl: string = API_BASE;
public static set NOMICS_API_BASE(apiBase: string) {

@@ -38,2 +33,6 @@ Nomics.baseUrl = apiBase;

private static baseUrl: string = API_BASE;
private apiKey: string;
private version: number = 1;
constructor(options: INomicsOptions) {

@@ -50,3 +49,3 @@ const { apiKey, version } = options;

currenciesTicker(options?: ICurrenciesTickerOptions) {
public currenciesTicker(options?: ICurrenciesTickerOptions) {
return currenciesTicker(this.apiKey, options);

@@ -53,0 +52,0 @@ }

@@ -0,3 +1,3 @@

import fetch from "cross-fetch";
import { fetchJSON } from "./fetch";
import fetch from "cross-fetch";

@@ -4,0 +4,0 @@ jest.mock("cross-fetch", () =>

@@ -10,3 +10,3 @@ import fetch from "cross-fetch";

return await res.json();
return res.json();
};

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