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

Usage Example #2

Open
cjmaria opened this issue Jan 3, 2022 · 0 comments
Open

Usage Example #2

cjmaria opened this issue Jan 3, 2022 · 0 comments
Assignees

Comments

@cjmaria
Copy link

cjmaria commented Jan 3, 2022

Hello,

Perhaps I am doing something wrong here, but I needed to do the following to use this library in module mode (when "type": "module" is specified in package.json):

import sdapi from 'sdapi';
sdapi.default.translate('libro');

This contradicts with the usage example in the README:

import sdapi from 'sdapi';
sdapi.translate('libro');

Otherwise, I get the error: TypeError: sdapi.translate is not a function

@librehat librehat self-assigned this Jan 22, 2024
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

2 participants