Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESM support #6

Open
kaushals-mecha opened this issue Jun 10, 2023 · 0 comments
Open

ESM support #6

kaushals-mecha opened this issue Jun 10, 2023 · 0 comments

Comments

@kaushals-mecha
Copy link

Currently the package works as expected in commonjs module
but with esm, we have to use it like below

import plot from 'simple-ascii-chart';

plot.default(            // plot.default instead of plot
        [
          [1, 1],
          [2, 4],
          [3, 4],
          [4, 2],
          [5, -1],
          [6, 3],
          [7, -1],
          [8, 9],
        ],
        { title: 'Important data', width: 20, height: 8 }
      )
    );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant