Is there a general JavaScript library?

We started a new project and realized that we need a general-purpose javascript library that contains a good set of string functions, MD5, base64, allows extensions, etc. In addition, copying and pasting functions from other libraries does not sound very attractive.

So, I think the question is, which javascript library contains the most common functions? or maybe there is a good collection of global functions that we could use / extend. We know that DOM manipulation is covered by numerous AJAX libraries, including jQuery.

* Remember, we could alternatively extend ExtJS, jQuery, etc. Is that what you guys are doing?

+4
source share
6 answers

Google closure library

It contains (cited by reference):

a large set of reusable widgets and user interface elements, as well as lower-level utilities for manipulating the DOM, communication with the server, animation, data structures, unit testing, editing full-text, etc.

It also contains a nice set of string management methods in the goog.string namespace.

Underscore

The underline is a JavaScript explanatory tape library that provides the great functional programming support you expect in Prototype.js

The underline is designed to work with another library, such as jQuery or a prototype. However, it does not expand like jQuery or Google Closure.

+6
source

* Remember, we could alternatively extend ExtJS, jQuery, etc. Is that what you guys are doing?

Yes, I do, and I think most of them. Many of what you call a "general purpose library" are covered by such frameworks as jQuery, Prototype, or Moo. And, without trimming the nails of webmasters, there is a jQuery plugin for everything that is not yet in the kernel.

However, I am interested to know if any other general purpose libraries are appearing. There are fields - like string manipulation, as indicated in one of the comments to another answer, and advanced date operations - where none of these frameworks are the holy grail of AFAIK.

+4
source

I use jQuery library and a bunch of plugins. The jQuery plugin directory contains many useful tools. There is also a jQuery UI, a set of interactive components and effects that you can use if you do not want to use a more complex library such as ExtJS.

Of course, each project is different, and you will probably end up writing some helper functions yourself.

0
source

I understand that others will say the same thing, but jQuery really amazes me every time I learn something new about it.

DOM, CSS and event manipulation, as well as simple AJAX, extensibility and many existing extensions make jQuery a great tool for web development.

0
source

jQuery is incredibly useful for manipulating the user interface. However, being open source, it contains somewhat less optimal code. If you're starting to run into performance issues, don't be afraid to delve into the source and see what happens.

0
source

I have been using jQuery for some time and seem to handle most of the basic operations that I need. It has a healthy plugin library and you can always write your own. This is a very good lightweight js library, and even if it doesn't do everything you need for you, it is a good starting point.

0
source

Source: https://habr.com/ru/post/1302408/


All Articles