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

how to import with ECMAScript #33

Open
shayan-ziaarabshahi opened this issue Dec 18, 2022 · 3 comments
Open

how to import with ECMAScript #33

shayan-ziaarabshahi opened this issue Dec 18, 2022 · 3 comments

Comments

@shayan-ziaarabshahi
Copy link

hi.
how can i import it by ECMAScript?

@helmasaur
Copy link
Owner

Sorry, I didn't see your message. I'll look through this before next week 😊 !

@helmasaur
Copy link
Owner

I searched a little before answering to you but I'm not sure about what you are asking.

First, you need to install a package manager (usually npm) then install my package:

$ npm install zodiac-signs

Then, you can import it in the files using this package using::

const zodiac = require('zodiac-signs')('en');
// Require with a language (format xx-YY sets (format xx)
const zodiac = require('zodiac-signs')('en-US')
// Require without an argument sets 'en'
const zodiac = require('zodiac-signs')();

All the documentation is able in the README file. Or maybe are you asking how to use the package using import?

Sorry if I didn't understand what you are asking at the first place.

@erenkulaksiz
Copy link

My solution

import zodiac from "zodiac-signs";

...

const zodiacSign = zodiac().getSignByDate(
  {
    day: date.getDate(), // put your own date
    month: date.getMonth() + 1,
  }
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants