Skip to content

Commit 78384a9

Browse files
committed
Merge branch 'gh-i' of https://github.com/crypti/cryptocurrencies into gh-i
2 parents aaa63c2 + f01eb79 commit 78384a9

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"scripts": {
2323
"test": "xo && ava",
2424
"build": "rm -rf images && mkdir images && node build.js",
25-
"fast-build": "node build.js"
25+
"fast-build": "node build.js"
2626
},
2727
"files": [
2828
"cryptocurrencies.json",

readme.md

+14-8
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,22 @@ $ npm install --save cryptocurrencies
1616
```js
1717
const cryptocurrencies = require('cryptocurrencies');
1818

19-
cryptocurrencies.BTC.name;
19+
cryptocurrencies.BTC;
2020
//=> 'Bitcoin'
2121

22-
cryptocurrencies.BTC.imageUrl;
22+
cryptocurrencies.symbols();
23+
//=> ['42', ... 'BTC', 'ETH', 'LTC', ...]
24+
```
25+
26+
Want more meta information? Download the [cryptocurrencies-meta.json](https://github.com/crypti/cryptocurrencies/blob/master/cryptocurrencies-meta.json) and import it to your project.
27+
28+
```js
29+
const cryptocurrenciesMeta = require('./cryptocurrencies-meta.json');
30+
cryptocurrenciesMeta.BTC.imageUrl;
2331
//=> 'https://raw.githubusercontent.com/crypti/cryptocurrencies/master/images/BTC.png'
2432

25-
cryptocurrencies.BTC.iconUrl;
33+
cryptocurrenciesMeta.BTC.iconUrl;
2634
//=> 'https://raw.githubusercontent.com/crypti/cryptocurrencies/master/images/BTC-128.png'
27-
28-
cryptocurrencies.symbols();
29-
//=> ['42', ... 'BTC', 'ETH', 'LTC', ...]
3035
```
3136

3237
## Cryptocurrencies
@@ -49,8 +54,9 @@ and can be updated automatically by running:
4954
$ npm run build
5055
```
5156

52-
:bulb: Note that this build routine synchronously downloads the currency icons and saves them to the `images` directory. This means
53-
that the build routine takes a few minutes, since it has to process thousands of images.
57+
> :bulb: **Important**
58+
>
59+
> The standard build routine synchronously downloads the currency icons and saves them to the `images` directory. This means that the build routine takes a few minutes, since it has to process thousands of images. Use `npm run fast-build` to skip existing images that may have already been downloaded.
5460
5561
## License
5662

0 commit comments

Comments
 (0)