Giter Site home page Giter Site logo

Comments (5)

koblas avatar koblas commented on August 22, 2024 1

Did a bit better -- there is a small compatibility layer in there, still no external dependancies.

from ibankit-js.

koblas avatar koblas commented on August 22, 2024

Make sure that you have "lib": ["es2017", "es2016"] in your tsconfig.json

Though If you're editing the project itself, it should have picked that up...?

from ibankit-js.

waldyrious avatar waldyrious commented on August 22, 2024

The project I tried this in is not a typescript project, so it doesn't have a tsconfig.json file. Should I add one to the project directory even though it's not itself a typescript project?

Or should I just ignore those warnings? They only came up because vscode opened the bbanStructure.ts file when I was testing the lib in debug mode with auto-break on all exceptions, and tested with a malformed IBAN; once the file was open, vscode automatically performed checks in it and displayed those errors.

I then manually opened all the files in the ibankit project (inside my project's node_modules) just to make this report more complete. I guess as a downstream user I should ignore those errors, then?

from ibankit-js.

koblas avatar koblas commented on August 22, 2024

Ugh - just learned something. TypeScript by default doesn't include the polyfills that are I'm using.

Options:

  1. Convince me to write the code without using Object.entries() or Object.values()
  2. Import core-js and the or the polyfill of your choice
  3. Have me bake into the system a polyfill (still like the idea of 0 external dependencies)

from ibankit-js.

waldyrious avatar waldyrious commented on August 22, 2024

I don't think Option 2 leads to a good experience in usage of this package. IMO the less friction and manual steps there are, the more likely people are to start and continue using it.

Between options 1 and 3, it ends up being a choice between the neatness of zero-dependencies and the neatness of newer ES syntax -- so it's a subjective choice that you're the most qualified person to make.

I would personally go with the latter (i.e. option 3), especially since the support for older ES syntax can be dropped once its prevalence becomes sufficiently low among JS engines, thus returning the package to the zero-dependencies status. WDYT?

from ibankit-js.

Related Issues (10)

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.