Giter Site home page Giter Site logo

tylim88 / crypto-symbol Goto Github PK

View Code? Open in Web Editor NEW
15.0 5.0 9.0 12.43 MB

:baby_chick: Provide easy conversion between crypto symbol and name, auto update daily

Home Page: https://www.npmjs.com/package/crypto-symbol

License: MIT License

JavaScript 1.71% TypeScript 98.25% Shell 0.04%
bitcoin ethereum crypto symbol name cryptocurrency

crypto-symbol's People

Contributors

dependabot[bot] avatar tylim88 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

crypto-symbol's Issues

Possible to look for multiple tickers in string?

Hi, is there a way to get multiple tickers using the symbolLookup() function? i have some strings that have more than 1 ticker on it,
example: 'Price analysis 9/14: BTC, ETH, BNB, XRP, ADA, SOL, DOGE, DOT, MATIC, SHIB' but when i run the function it returns undefined.

Undeclared dependency

I'm trying to use this library in my Vite app, but it seems like it needs axios as a dependency:

✘ [ERROR] Could not resolve "axios"

  node_modules/crypto-symbol/dist/1_sync/1_fetch.js:34:75:
    34 │     const axios = (await Promise.resolve().then(() => __importStar(require('axios')))).default;
       ╵                                                                            ~~~~~~~

  You can mark the path "axios" as external to exclude it from the bundle, which will remove this
  error. You can also surround this "require" call with a try/catch block to handle this failure at
  run-time instead of bundle-time.

8:38:47 PM [vite] error while updating dependencies:
Error: Build failed with 1 error:
node_modules/crypto-symbol/dist/1_sync/1_fetch.js:34:75: ERROR: Could not resolve "axios"
    at failureErrorWithLog (/home/daniel/Documents/JS/wwwallet-fe/node_modules/esbuild/lib/main.js:1600:15)
    at /home/daniel/Documents/JS/wwwallet-fe/node_modules/esbuild/lib/main.js:1246:28
    at runOnEndCallbacks (/home/daniel/Documents/JS/wwwallet-fe/node_modules/esbuild/lib/main.js:1031:63)
    at buildResponseToResult (/home/daniel/Documents/JS/wwwallet-fe/node_modules/esbuild/lib/main.js:1244:7)
    at /home/daniel/Documents/JS/wwwallet-fe/node_modules/esbuild/lib/main.js:1353:14
    at /home/daniel/Documents/JS/wwwallet-fe/node_modules/esbuild/lib/main.js:663:9
    at handleIncomingPacket (/home/daniel/Documents/JS/wwwallet-fe/node_modules/esbuild/lib/main.js:760:9)
    at Socket.readFromStdout (/home/daniel/Documents/JS/wwwallet-fe/node_modules/esbuild/lib/main.js:629:7)
    at Socket.emit (events.js:400:28)
    at addChunk (internal/streams/readable.js:293:12)
Vite Error, /node_modules/.vite/deps/crypto-symbol.js?v=2dfff904 optimized info should be defined```

Edge-case bug with overriding ticker/symbol.

Problem context

Nano recently changed it's ticker to XNO instead of Nano.

There is currently also a token under XNO called "Xeno Token".

That, in of itself is fine. I'd like to override the XNO ticker to have a name of "Nano" as I don't care about this particular token.

The Bug

Because the code is basically Object.assign based on the "name-symbol" pair, it's keying off of the name specifically for an overwrite.

This means it is overriding the ticker for Nano (NANO) to be XNO, the swapKeyAndValue function will hit "XNO": "Nano", and override it to be "XNO": "Xeno Token" as it is further down the list.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.