yahoo-exchange
Advanced tools
Comparing version 1.5.4 to 1.5.5
11
index.js
@@ -5,2 +5,7 @@ "use strict"; | ||
const arrayLen24 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; | ||
const regexpList = [ | ||
/<!-- react-text: 36 -->([0-9.,]+)/gmi, | ||
/<!-- react-text: 38 -->([0-9.,]+)/gmi, | ||
/<!-- react-text: 39 -->([0-9.,]+)/gmi | ||
]; | ||
const remove = (str, remove) => { | ||
@@ -13,9 +18,9 @@ if (typeof str === 'string') | ||
const parseHTML = html => parseR(html.toString())(36); | ||
const parseHTML2 = (html, r) => [parseFloat(remove(/<!-- react-text: 36 -->([0-9.,]+)/gmi.exec(html)[1], ',')), | ||
const parseHTML2 = (html, r) => [parseFloat(remove(regexpList[0].exec(html)[1], ',')), | ||
html.indexOf('react-text: 39 -->') === -1 ? | ||
parseFloat(parseReact(html, 38, 2).split(' ')[0]) : | ||
parseFloat(parseReact(html, 39, 1).split(' ')[0]), | ||
parseFloat(regexpList[2].exec(html)[1].split(' ')[0]), | ||
html.indexOf('react-text: 39 -->') === -1 ? | ||
parseFloat(parseReact(html, 38, 2).split('(')[1].split("\%")[0]) : | ||
parseFloat(parseReact(html, 39, 1).split('(')[1].split("\%")[0]), r(42), r(48), r(54), r(71), | ||
parseFloat(regexpList[2].exec(html)[1].split('(')[1].split("\%")[0]), r(42), r(48), r(54), r(71), | ||
parseFloat(remove(html.split('data-reactid="61">')[2].split(' ')[0], ',')), | ||
@@ -22,0 +27,0 @@ parseFloat(remove(html.split('data-reactid="61">')[2].split(' ')[2].split('<')[0], ',')), |
11
index.ts
import request = require('request'); | ||
const arrayLen24 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; | ||
const regexpList = [ | ||
/<!-- react-text: 36 -->([0-9.,]+)/gmi, | ||
/<!-- react-text: 38 -->([0-9.,]+)/gmi, | ||
/<!-- react-text: 39 -->([0-9.,]+)/gmi | ||
]; | ||
const remove = (str: string, remove: string) => { | ||
@@ -10,9 +15,9 @@ if (typeof str === 'string') return str.replace(remove, ''); | ||
const parseHTML = html => parseR(html.toString())(36); | ||
const parseHTML2 = (html: string, r: Function) => [parseFloat(remove(/<!-- react-text: 36 -->([0-9.,]+)/gmi.exec(html)[1], ',')), | ||
const parseHTML2 = (html: string, r: Function) => [parseFloat(remove(regexpList[0].exec(html)[1], ',')), | ||
html.indexOf('react-text: 39 -->') === -1 ? | ||
parseFloat(parseReact(html, 38, 2).split(' ')[0]) : | ||
parseFloat(parseReact(html, 39, 1).split(' ')[0]), | ||
parseFloat(regexpList[2].exec(html)[1].split(' ')[0]), | ||
html.indexOf('react-text: 39 -->') === -1 ? | ||
parseFloat(parseReact(html, 38, 2).split('(')[1].split("\%")[0]) : | ||
parseFloat(parseReact(html, 39, 1).split('(')[1].split("\%")[0]), r(42), r(48), r(54), r(71), | ||
parseFloat(regexpList[2].exec(html)[1].split('(')[1].split("\%")[0]), r(42), r(48), r(54), r(71), | ||
parseFloat(remove(html.split('data-reactid="61">')[2].split(' ')[0], ',')), | ||
@@ -19,0 +24,0 @@ parseFloat(remove(html.split('data-reactid="61">')[2].split(' ')[2].split('<')[0], ',')), |
@@ -14,3 +14,3 @@ { | ||
"main": "index.js", | ||
"version": "1.5.4", | ||
"version": "1.5.5", | ||
"license": "MIT", | ||
@@ -17,0 +17,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
1042327
359