GithubHelp home page GithubHelp logo

Comments (5)

danwallach avatar danwallach commented on June 9, 2024 1

And, in fact, there are a bunch of great property detectors in the stdlib project. These are exactly what we need.

https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/assert

from electionguard-typescript.

shreyasminocha avatar shreyasminocha commented on June 9, 2024

I was thinking about doing all the checks in index.ts and throwing an error if something was missing. Does that also work or is the "a function that" part necessary?

Related also: We're currently building commonjs modules, which likely wouldn't work in browsers. We could set up a separate browser build, or we could try to build es6 modules, which should work in both node and browsers. The only blocker for that should be seedrandom's lack of esm module support, which I think can be fixed by replacing it with esm-seedrandom? Ugh. Nevermind, I got this part working, but I'm still unsure if the es6 modules tsc is generating will work as-is in browsers. #27

The other consideration with browsers, though, is that we probably want to output a single js file that includes everything? AFAIK tsc doesn't let us do that, so we'll have to bring in rollup or webpack or something.

from electionguard-typescript.

danwallach avatar danwallach commented on June 9, 2024

Found this:
https://github.com/Modernizr/Modernizr

Unsurprisingly, there's a library that knows how to do most of the work we need.

Lets move the webpack/commonjs discussion to a separate issue. The point of this issue is just having some code in front whose job it is to fail fast if we're on an antiquated platform. Maybe this check occurs inside the GroupContext fetcher?

from electionguard-typescript.

danwallach avatar danwallach commented on June 9, 2024

Also: https://featurejs.com/

This can detect async, which is good, but neither this nor Modernizr seem to have bigint detection.

from electionguard-typescript.

danwallach avatar danwallach commented on June 9, 2024

But this has exactly what we need for bigint:
https://github.com/stdlib-js/assert-has-bigint-support

from electionguard-typescript.

Related Issues (20)

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.