Most popular 10 JavaScript libraries in 2018

Javascript keeps its position in the top of the preferences of a scripting language in 2018. According to StackOverflow’s 2018 survey, about 70% of the respondents chose Javascript as used scripting language. Being so popular automatically means a huge open-source community and this means a lot of new libraries designed to solve some of the shortcomings of language or to make developer’s life easier.

Here you can find 10 of the most popular Javascript libraries in 2018, with some examples of usage.

1) Ramda

This is definitely my favorite Javascript library and I use it in each project I work. Ramda is designed specifically for a functional programming style that makes easy creation of functional pipelines, and of course, ensure immutability.

There are two important distinguishing features of Ramda:

  • Ramda methods are automatically curried;
  • Ramda takes the function first, and the data last;

This two, combined, allow developers to compose functions using significantly less code, before applying data. Ramda automatically curry functions for you making the composition of functions easier.

Ramda is available on NPM, or you can use one of the CDN’s available or even you can download your own copy. More info about how to install an use it can be found here.

// Usage of map function:
const square = x=>x * x;
R.map(square, [1, 2, 3]); //=> [1, 4, 8]
R.map(square, { x:1, y:2, z:3 }); //=> {x: 1, y: 4, z: 8}

// Usage of reduce function:
R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10

2) Sugar

Sugar is a utility library for working with native objects. It offers the functions to get first 2 elements in from an array, get the average of the items or determine if a string contains Greek or Japanese characters. Also using Sugar you can easily work with dates and times. Here you can find out more about how Sugar can help you.

Sugar.Array.average([1,2,3,4]); //=> 2.5
Sugar.Date.range('tomorrow from 3pm to 5pm') //=> 
Sugar.Date.format(new Date(), '{hh}:{mm}') //=> "11:59"
Sugar.Number.isInteger(420); //=> true
Sugar.Number.isInteger(4.5); //=> false

3) Lazy.js

Lazy.js is a functional utility library for JavaScript, similar to Underscore and Lodash, but with a lazy engine under the hood that strives to do as little work as possible while being as flexible as possible.

It has no external dependencies, so you can get started right away with:

npm install lazy.js

4) Collect.js

Collect is a convenient and dependency free wrapper for working with arrays and objects. The API is very similar to Laravel Collect and the library is actively maintained.  More details can be found on the GitHub page.

5) ChanceJS

Chance is a minimalist generator of random strings, numbers, etc. to help reduce some monotony particularly while writing automated tests or anywhere else you need anything random. More details can be found on the GitHub page.

6) C3JS

C3JS is a D3-based reusable chart library.  It is used for easy data visualization. Is very user-friendly and easy to learn. C3 gives some classes to each element when generating, so you can define a custom style by the class and it’s possible to extend the structure directly by D3. The documentation contains lots of examples and a nice getting started guide.

7) Cheerio

Cheerio parses markup and provides an API for traversing/manipulating the resulting data structure. It does not interpret the result as a web browser does. Specifically, it does not produce a visual rendering, apply CSS, load external resources, or execute JavaScript. More about Cheerio here.

8) BasicScroll

BasicScroll is very handy when you want to add parallax scrolling animation effects into the project. It makes possible usage of variables and proprieties directly into CSS or usage of Javascript for even better effects. It works on both desktop and mobile environments and is independent by the framework.

9) Filepond

Filepond is a small library used for file upload. It is framework independent, working fine with React, Angular, Vue.js or any other Javascript framework. Is very tiny, having just 21 KB and has a built-in image resize engine. It allows uploading files by drag-and-drop, browsing filesystem or just copy-paste.

10) List

An immutable list with unmatched performance and a comprehensive functional API. It gives you a fast functional alternative to Javascript Array. List doesn’t allow mutations it can be heavily optimized for pure operations. This makes List much faster for functional programming than arrays. You can find more details about List on their GitHub page.

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
Loading...