Nick Dima
Nick Dima

Reputation: 1595

Javascript library for both the browser and node

I want to write a javascript library that works like an SDK for an external API.
Ideally this library could be used both for frontend projects, in the browser and for backend projects using node.js.
Initally I wasn't considering node so I was planning to require jquery as a dependency for using the ajax functions (for making the API calls) and deffered objects, but now I have second thaughts.
Considering that my goal is to have the same code base for both scenarios what do you think I should do? Is using the jquery npm package a good idea, or do you have other suggestions?

Upvotes: 0

Views: 119

Answers (1)

Chris
Chris

Reputation: 4225

You can use the jquery package from the npm repo without problems.

Upvotes: 1

Related Questions