Giter VIP home page Giter VIP logo

kruonis's People

Contributors

alexandrevalle avatar antonioalmeida avatar edgaracarneiro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

antonioalmeida

kruonis's Issues

Typings not included in the bundle

Hi. I was finding a benchmark tool other than benchmark.js and found yours. However, I got this error:

Could not find a declaration file for module 'kruonis'. .../node_modules/kruonis/dist/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/kruonis` if it exists or add a new declaration (.d.ts) file containing `declare module 'kruonis';`ts(7016)

When I check the package on node_modules, I see that you included all the files including the source code on the bundle. Which is not necessary because it won't be used by the users anyway.

image

Do you mind if I submit a PR to fix that + create a typescript definition build + CJS and ESM support?

index.mjs broken? Trying to import default from performance-now

I was trying to use kruonis in a browser to run some benchmarks, however I get this error:

Uncaught SyntaxError: import not found: default

at the beginning of index.mjs:

import now from 'performance-now';

Im a bit new to npm and different module systems, but from looking at performance-now, it looks like its cjs only. They only have module.exports, no esm export. Maybe that's the problem here?

Support benchmark of async calls


        benchmark
            .add(
                new Test('Sleep', async() => {
                    await sleep(10000)
                }))


        const results: Array<[string, Stats]> = await benchmark.run();
        for (let result of results) {
            console.log("Test name: " + result[0])
            console.log("Test stats: ")
            console.log(result[1])
        }

This code prints the results before the sleep promise was resolved. How to use benchmark with async calls?

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.