bfx-api-node-models
Advanced tools
Comparing version 1.3.3 to 1.4.0
@@ -528,22 +528,8 @@ 'use strict' | ||
return arr.length === 4 | ||
? raw ? { | ||
orderID: arr[0], | ||
period: arr[1], | ||
rate: arr[2], | ||
amount: arr[3] | ||
} : { | ||
rate: arr[0], | ||
period: arr[1], | ||
count: arr[2], | ||
amount: arr[3] | ||
} | ||
: raw ? { | ||
orderID: arr[0], | ||
price: arr[1], | ||
amount: arr[2] | ||
} : { | ||
price: arr[0], | ||
count: arr[1], | ||
amount: arr[2] | ||
} | ||
? raw | ||
? { orderID: arr[0], period: arr[1], rate: arr[2], amount: arr[3] } | ||
: { rate: arr[0], period: arr[1], count: arr[2], amount: arr[3] } | ||
: raw | ||
? { orderID: arr[0], price: arr[1], amount: arr[2] } | ||
: { price: arr[0], count: arr[1], amount: arr[2] } | ||
} | ||
@@ -550,0 +536,0 @@ } |
@@ -91,14 +91,16 @@ 'use strict' | ||
fields: _isFinite(rate) ? FUNDING_FIELDS : TRADING_FIELDS, | ||
validators: _isFinite(rate) ? { | ||
id: numberValidator, | ||
mts: dateValidator, | ||
amount: amountValidator, | ||
rate: priceValidator, | ||
period: numberValidator | ||
} : { | ||
id: numberValidator, | ||
mts: dateValidator, | ||
amount: amountValidator, | ||
price: priceValidator | ||
} | ||
validators: _isFinite(rate) | ||
? { | ||
id: numberValidator, | ||
mts: dateValidator, | ||
amount: amountValidator, | ||
rate: priceValidator, | ||
period: numberValidator | ||
} | ||
: { | ||
id: numberValidator, | ||
mts: dateValidator, | ||
amount: amountValidator, | ||
price: priceValidator | ||
} | ||
}) | ||
@@ -105,0 +107,0 @@ } |
{ | ||
"name": "bfx-api-node-models", | ||
"version": "1.3.3", | ||
"version": "1.4.0", | ||
"description": "Object models for usage with the Bitfinex node API", | ||
@@ -15,6 +15,5 @@ "engines": { | ||
"scripts": { | ||
"lint": "eslint lib/ examples/ test/ index.js", | ||
"lint": "standard", | ||
"test": "npm run lint && npm run unit", | ||
"unit": "NODE_ENV=test nyc --check-coverage --lines 90 --branches 60 --functions 90 --statements 90 --reporter=lcov --reporter=html mocha -b --recursive", | ||
"build": "babel ./index.js -d ./dist && babel ./lib -d ./dist/lib && copy package.json dist", | ||
"docs": "rm -rf docs && node_modules/.bin/jsdoc --configure .jsdoc.json --verbose" | ||
@@ -46,18 +45,5 @@ }, | ||
"devDependencies": { | ||
"babel-cli": "^6.26.0", | ||
"babel-eslint": "^10.1.0", | ||
"babel-plugin-transform-object-rest-spread": "^6.26.0", | ||
"babel-plugin-transform-regenerator": "^6.26.0", | ||
"bfx-api-node-rest": "^3.0.3", | ||
"bfx-api-node-rest": "^4.1.2", | ||
"chai": "^4.2.0", | ||
"docdash": "^1.2.0", | ||
"eslint": "^6.8.0", | ||
"eslint-config-standard": "^14.1.0", | ||
"eslint-plugin-import": "^2.20.1", | ||
"eslint-plugin-jsdoc": "^22.0.0", | ||
"eslint-plugin-lodash": "^6.0.0", | ||
"eslint-plugin-mocha": "^6.3.0", | ||
"eslint-plugin-node": "^11.0.0", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-standard": "^4.0.1", | ||
"husky": "^4.2.3", | ||
@@ -67,3 +53,3 @@ "jsdoc-to-markdown": "^5.0.3", | ||
"nyc": "^15.0.0", | ||
"standard": "^14.1.0" | ||
"standard": "^16.0.3" | ||
}, | ||
@@ -77,3 +63,8 @@ "dependencies": { | ||
"lodash": "^4.17.15" | ||
}, | ||
"standard": { | ||
"ignore": [ | ||
"/docs/**/*.js" | ||
] | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 13 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
8
0
100
0
0
138316
57
4225