@strong-roots-capital/bin-size-to-timeframe
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -6,4 +6,7 @@ /** | ||
/** | ||
* TODO: document | ||
* Convert BiMEX bin size to Trading View timeframe. | ||
* | ||
* @param binSize - Length of bin | ||
* @returns Length of bin size as Trading View timeframe | ||
*/ | ||
export default function binSizeToTimeframe(binSize: '1m' | '5m' | '1h' | '1d'): string; |
@@ -8,8 +8,15 @@ "use strict"; | ||
/** | ||
* TODO: document | ||
* Convert BiMEX bin size to Trading View timeframe. | ||
* | ||
* @param binSize - Length of bin | ||
* @returns Length of bin size as Trading View timeframe | ||
*/ | ||
function binSizeToTimeframe(binSize) { | ||
// TODO: implement | ||
return ''; | ||
return { | ||
'1m': '1', | ||
'5m': '5', | ||
'1h': '1H', | ||
'1d': '1D' | ||
}[binSize]; | ||
} | ||
exports.default = binSizeToTimeframe; |
{ | ||
"name": "@strong-roots-capital/bin-size-to-timeframe", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Convert a BitMEX bin-size to a Trading View timeframe", | ||
@@ -8,3 +8,5 @@ "main": "dist/bin-size-to-timeframe.js", | ||
"scripts": { | ||
"install": "tsc", | ||
"prepublishOnly": "npm run compile", | ||
"compile": "npm run clean && tsc", | ||
"clean": "rm -rf dist", | ||
"ava": "ava -s -v", | ||
@@ -22,2 +24,5 @@ "ava:fail-fast": "ava -s -v --fail-fast", | ||
}, | ||
"files": [ | ||
"dist/" | ||
], | ||
"husky": { | ||
@@ -36,3 +41,3 @@ "hooks": { | ||
"bitmex", | ||
"" | ||
"bin-size" | ||
], | ||
@@ -45,7 +50,4 @@ "author": "Eric Crosson <eric.s.crosson@utexas.edu> (https://github.com/strong-roots-capital)", | ||
"homepage": "https://github.com/strong-roots-capital/bin-size-to-timeframe", | ||
"dependencies": { | ||
"devDependencies": { | ||
"@types/node": "^10.12.18", | ||
"typescript": "^3.2.2" | ||
}, | ||
"devDependencies": { | ||
"ava": "^1.0.0", | ||
@@ -58,3 +60,4 @@ "codecov": "^3.1.0", | ||
"typedoc": "^0.13.0", | ||
"typedoc-plugin-markdown": "^1.1.20" | ||
"typedoc-plugin-markdown": "^1.1.20", | ||
"typescript": "^3.2.2" | ||
}, | ||
@@ -61,0 +64,0 @@ "ava": { |
@@ -31,2 +31,2 @@ # bin-size-to-timeframe [![Build status](https://travis-ci.org/strong-roots-capital/bin-size-to-timeframe.svg?branch=master)](https://travis-ci.org/strong-roots-capital/bin-size-to-timeframe) [![npm version](https://img.shields.io/npm/v/@strong-roots-capital/bin-size-to-timeframe.svg)](https://npmjs.org/package/@strong-roots-capital/bin-size-to-timeframe) [![codecov](https://codecov.io/gh/strong-roots-capital/bin-size-to-timeframe/branch/master/graph/badge.svg)](https://codecov.io/gh/strong-roots-capital/bin-size-to-timeframe) | ||
- [to-bitmex-timeframe](TODO) | ||
- [to-bitmex-timeframe](https://github.com/strong-roots-capital/to-bitmex-timeframe) |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
0
0
4235
10
4
32
1
- Removed@types/node@^10.12.18
- Removedtypescript@^3.2.2
- Removed@types/node@10.17.60(transitive)
- Removedtypescript@3.9.10(transitive)