简体   繁体   中英

How are client-side libraries used in node.js?

I am new to node.js and just discovered npm, which has been a pretty handy tool. However, I noticed that a lot of libraries that I have used before in client side JavaScript programming, such as jquery and d3, can be installed using npm. It seems strange to me to install these libraries as node modules as I don't understand how to use something like d3, useful for data visualization, in node. Is it just because npm is a convenient way to download JavaScript code even if the libraries are not to be used with node?

Remember how you should not parse html with regex ? Yeah, you should parse html into a dom and manipulate that. jQuery and d3 make this easier on server-side.

There is also a jQuery port even for PHP

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM