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

yahoo-exchange

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yahoo-exchange - npm Package Compare versions

Comparing version 1.5.3 to 1.5.4

2

index.js

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

const parseHTML = html => parseR(html.toString())(36);
const parseHTML2 = (html, r) => [r(36),
const parseHTML2 = (html, r) => [parseFloat(remove(/<!-- react-text: 36 -->([0-9.,]+)/gmi.exec(html)[1], ',')),
html.indexOf('react-text: 39 -->') === -1 ?

@@ -15,0 +15,0 @@ parseFloat(parseReact(html, 38, 2).split(' ')[0]) :

@@ -10,3 +10,3 @@ import request = require('request');

const parseHTML = html => parseR(html.toString())(36);
const parseHTML2 = (html: string, r: Function) => [r(36),
const parseHTML2 = (html: string, r: Function) => [parseFloat(remove(/<!-- react-text: 36 -->([0-9.,]+)/gmi.exec(html)[1], ',')),
html.indexOf('react-text: 39 -->') === -1 ?

@@ -13,0 +13,0 @@ parseFloat(parseReact(html, 38, 2).split(' ')[0]) :

@@ -14,3 +14,3 @@ {

"main": "index.js",
"version": "1.5.3",
"version": "1.5.4",
"license": "MIT",

@@ -17,0 +17,0 @@ "dependencies": {

@@ -140,43 +140,5 @@ # yahoo-exchange 疎開

> 1.0で除去されたメソッドです。 2.0で削除される予定ですので、getExchangeDataArrayを使用してください。
### 例示コード
* ``` javascript
getData('USDKRW', data => console.log(data)); // [
```
* ``` javascript
getData('USDKRW', data => console.log(data), error => console.log('[Error]' + error));
// 1070 または [Error] error message
```
* ``` javascript
getData('USDKRW', (data,pair) => console.log(data,pair), error => console.log('[Error]' + error));
// 1070 USDRKW または [Error] error message
```
* ``` javascript
getData('USDKRW', (data,pair) => console.log(data,pair), (error,pair) => console.log(`[Error:${pair}]${error}`));
// 1070 USDKRW または [Error:USDKRW] error message
```
## getDataArray(pair, callback, errorHandler): void @deprecated
> 1.0で除去されたメソッドです。 2.0で削除される予定ですので、getExchangeDataArrayを使用してください。
### 例示コード
* ``` javascript
getDataArray(['USDKRW', 'JPYKRW'], data => console.log(data));
// 1070
// 970
```
* ``` javascript
getDataArray(['USDKRW', 'JPYKRW'], data => console.log(data), error => console.log('[Error]' + error));
// 1070 または [Error] error message
// 970 または [Error] error message
```
* ``` javascript
getDataArray(['USDKRW', 'JPYKRW'], (data,pair) => console.log(data, pair)), error => console.log('[Error]' + error));
// 1070 USDKRW または [Error] error message
// 970 JPYKRW または [Error] error message
```
* ``` javascript
getDataArray(['USDKRW', 'JPYKRW'], (data,pair) => console.log(data, pair)), (error,pair) => console.log(`[Error:${pair}]${error}`));
// 1070 USDKRW または [Error:USDKRW] error message
// 970 JPYKRW または [Error:JPYKRW] error message
```
### 警告
getDataArrayは全体データをコールバック関数で返却しません。
## getPairArray(currency: Array<string>, base: Array<string>): Array<string>

@@ -194,10 +156,2 @@ フェアリストを生成してくれます。

const yahooExchange = require('yahoo-exchange');
/**
* yahooExchange.getData('USDKRW', data => console.log(data));
* yahooExchange.getDataArray(['USDKRW', 'JPYKRW'], data => console.log(data));
* yahooExchange.getData('USDKRW', (data, pair) => console.log(data, pair));
* yahooExchange.getDataArray(['USDKRW', 'JPYKRW'], (data, pair) => console.log(data, pair));
* yahooExchange.getData('USDKRW', (data, pair) => console.log(data, pair), (error,pair) => console.log(`[Error] ${pair}\n${error}`));
* yahooExchange.getDataArray(['USDKRW', 'JPYKRW'], (data, pair) => console.log(data, pair), (error,pair) => console.log(`[Error] ${pair}\n${error}`));
*/
yahooExchange.getExchangeDataArray('USDKRW', data => console.log(data));

@@ -204,0 +158,0 @@ yahooExchange.getExchangeDataArray(['USDKRW', 'JPYKRW'], data => console.log(data));

@@ -139,43 +139,6 @@ # yahoo-exchange 소개

> 1.0에서 제거된 메소드입니다. 2.0에서 삭제될 예정이오니, getExchangeDataArray를 사용하세요.
### 예시 코드
* ``` javascript
getData('USDKRW', data => console.log(data)); // [
```
* ``` javascript
getData('USDKRW', data => console.log(data), error => console.log('[Error]' + error));
// 1070 또는 [Error] error message
```
* ``` javascript
getData('USDKRW', (data,pair) => console.log(data,pair), error => console.log('[Error]' + error));
// 1070 USDRKW 또는 [Error] error message
```
* ``` javascript
getData('USDKRW', (data,pair) => console.log(data,pair), (error,pair) => console.log(`[Error:${pair}]${error}`));
// 1070 USDKRW 또는 [Error:USDKRW] error message
```
## getDataArray(pair, callback, errorHandler): void @deprecated
> 1.0에서 제거된 메소드입니다. 2.0에서 삭제될 예정이오니, getExchangeDataArray를 사용하세요.
### 예시 코드
* ``` javascript
getDataArray(['USDKRW', 'JPYKRW'], data => console.log(data));
// 1070
// 970
```
* ``` javascript
getDataArray(['USDKRW', 'JPYKRW'], data => console.log(data), error => console.log('[Error]' + error));
// 1070 또는 [Error] error message
// 970 또는 [Error] error message
```
* ``` javascript
getDataArray(['USDKRW', 'JPYKRW'], (data,pair) => console.log(data, pair)), error => console.log('[Error]' + error));
// 1070 USDKRW 또는 [Error] error message
// 970 JPYKRW 또는 [Error] error message
```
* ``` javascript
getDataArray(['USDKRW', 'JPYKRW'], (data,pair) => console.log(data, pair)), (error,pair) => console.log(`[Error:${pair}]${error}`));
// 1070 USDKRW 또는 [Error:USDKRW] error message
// 970 JPYKRW 또는 [Error:JPYKRW] error message
```
### 경고
getDataArray는 전체 데이터를 넘겨주지 않습니다.
## getPairArray(currency: Array<string>, base: Array<string>): Array<string>

@@ -193,10 +156,2 @@ 페어 목록을 생성해 줍니다.

const yahooExchange = require('yahoo-exchange');
/**
* yahooExchange.getData('USDKRW', data => console.log(data));
* yahooExchange.getDataArray(['USDKRW', 'JPYKRW'], data => console.log(data));
* yahooExchange.getData('USDKRW', (data, pair) => console.log(data, pair));
* yahooExchange.getDataArray(['USDKRW', 'JPYKRW'], (data, pair) => console.log(data, pair));
* yahooExchange.getData('USDKRW', (data, pair) => console.log(data, pair), (error,pair) => console.log(`[Error] ${pair}\n${error}`));
* yahooExchange.getDataArray(['USDKRW', 'JPYKRW'], (data, pair) => console.log(data, pair), (error,pair) => console.log(`[Error] ${pair}\n${error}`));
*/
yahooExchange.getExchangeDataArray('USDKRW', data => console.log(data));

@@ -203,0 +158,0 @@ yahooExchange.getExchangeDataArray(['USDKRW', 'JPYKRW'], data => console.log(data));

@@ -137,43 +137,6 @@ # yahoo-exchange

> deprecated Since version 1.0. Will be deleted in version 2.0. Use getExchangeDataArray instead.
### Example
* ``` javascript
getData('USDKRW', data => console.log(data)); // [
```
* ``` javascript
getData('USDKRW', data => console.log(data), error => console.log('[Error]' + error));
// 1070 or [Error] error message
```
* ``` javascript
getData('USDKRW', (data,pair) => console.log(data,pair), error => console.log('[Error]' + error));
// 1070 USDRKW or [Error] error message
```
* ``` javascript
getData('USDKRW', (data,pair) => console.log(data,pair), (error,pair) => console.log(`[Error:${pair}]${error}`));
// 1070 USDKRW or [Error:USDKRW] error message
```
## getDataArray(pair, callback, errorHandler): void @deprecated
> deprecated Since version 1.0. Will be deleted in version 2.0. Use getExchangeDataArray instead.
### Example
* ``` javascript
getDataArray(['USDKRW', 'JPYKRW'], data => console.log(data));
// 1070
// 970
```
* ``` javascript
getDataArray(['USDKRW', 'JPYKRW'], data => console.log(data), error => console.log('[Error]' + error));
// 1070 or [Error] error message
// 970 or [Error] error message
```
* ``` javascript
getDataArray(['USDKRW', 'JPYKRW'], (data,pair) => console.log(data, pair)), error => console.log('[Error]' + error));
// 1070 USDKRW or [Error] error message
// 970 JPYKRW or [Error] error message
```
* ``` javascript
getDataArray(['USDKRW', 'JPYKRW'], (data,pair) => console.log(data, pair)), (error,pair) => console.log(`[Error:${pair}]${error}`));
// 1070 USDKRW or [Error:USDKRW] error message
// 970 JPYKRW or [Error:JPYKRW] error message
```
### Warning
getDataArray does not return Array to Callback.
## getPairArray(currency: Array<string>, base: Array<string>): Array<string>

@@ -191,10 +154,2 @@ It Returns a pair array.

const yahooExchange = require('yahoo-exchange');
/**
* yahooExchange.getData('USDKRW', data => console.log(data));
* yahooExchange.getDataArray(['USDKRW', 'JPYKRW'], data => console.log(data));
* yahooExchange.getData('USDKRW', (data, pair) => console.log(data, pair));
* yahooExchange.getDataArray(['USDKRW', 'JPYKRW'], (data, pair) => console.log(data, pair));
* yahooExchange.getData('USDKRW', (data, pair) => console.log(data, pair), (error,pair) => console.log(`[Error] ${pair}\n${error}`));
* yahooExchange.getDataArray(['USDKRW', 'JPYKRW'], (data, pair) => console.log(data, pair), (error,pair) => console.log(`[Error] ${pair}\n${error}`));
*/
yahooExchange.getExchangeDataArray('USDKRW', data => console.log(data));

@@ -201,0 +156,0 @@ yahooExchange.getExchangeDataArray(['USDKRW', 'JPYKRW'], data => console.log(data));

const index = require('../index');
/*
* index.getData('USDKRW', data => console.log(data));
* index.getDataArray(['USDKRW', 'JPYKRW'], data => console.log(data));
* index.getData('USDKRW', (data, pair) => console.log(data, pair));
* index.getDataArray(['USDKRW', 'JPYKRW'], (data, pair) => console.log(data, pair));
* index.getData('USDKRW', (data, pair) => console.log(data, pair), (error,pair) => console.log(`[Error] ${pair}\n${error}`));
* index.getDataArray(['USDKRW', 'JPYKRW'], (data, pair) => console.log(data, pair), (error,pair) => console.log(`[Error] ${pair}\n${error}`));
*/
// index.getFxYahooJapan(v => console.log(v));
index.getFxYahooJapan(v => console.log(v));
index.getExchangeDataLowTraffic(v => console.log(v));
// index.getExchangeDataLowTrafficP().then(v => console.log(v));
// index.getExchangeDataArray('USDKRW', data => console.log(data));
// index.getExchangeDataArray(['USDKRW', 'JPYKRW'], data => console.log(data));
// index.getExchangeDataArray('USDKRW', (data, pair) => console.log(data, pair));
// index.getExchangeDataArray(['USDKRW', 'JPYKRW'], (data, pair) => console.log(data, pair));
// index.getExchangeDataArray('USDKRW', (data, pair) => console.log(data, pair), (error, pair) => console.log(`[Error] ${pair}\n${error}`));
// index.getExchangeDataArray(['USDKRW', 'JPYKRW'], (data, pair) => console.log(data, pair), (error, pair) => console.log(`[Error] ${pair}\n${error}`));
index.getExchangeDataLowTrafficP().then(v => console.log(v));
index.getExchangeDataArray('USDKRW', data => console.log(data));
index.getExchangeDataArray(['USDKRW', 'JPYKRW'], data => console.log(data));
index.getExchangeDataArray('USDKRW', (data, pair) => console.log(data, pair));
index.getExchangeDataArray(['USDKRW', 'JPYKRW'], (data, pair) => console.log(data, pair));
index.getExchangeDataArray('USDKRW', (data, pair) => console.log(data, pair), (error, pair) => console.log(`[Error] ${pair}\n${error}`));
index.getExchangeDataArray(['USDKRW', 'JPYKRW'], (data, pair) => console.log(data, pair), (error, pair) => console.log(`[Error] ${pair}\n${error}`));

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