Compress images with Javascript

Javascript image compression

These days, most of the photos generated by our devices are quite large in resolution and in size. As developers, we may not need large images (>5mb) especially if you’re using it for a profile picture or so. A common solution so far was to resize the image after it was uploaded to the server. … Read more

Whats a double Arrow function in javascript ?

Double Arrow Functions

Wondering what exactly does a double arrow function do, how it works and when is it used ? We’ll take you through a quick tutorial explaining the same. Before explaining double arrow functions, we’ll take a quick look at arrow functions. Arrow functions Arrow functions are anonymous functions that are special because they do not … Read more

Rotate Ads in Javascript with Ad-rotator

Ad rotator in javascript

For many websites, advertisements could mean a substantial source of revenue. Hence, making it appealing, clickable and unobtrusive is an essential base requirement. Lets see how you could easily setup ad rotation on your website with the use of a standalone javascript library Ad-rotator. Ad Rotation in pure javascript We made a small list of … Read more

How to Encrypt LocalStorage data?

Encrypt Localstorage

Sometimes, you might want to encrypt your data stored in the LocalStorage given that it is easily readable by anyone having sufficient knowledge on where to look. Lets see how we can encrypt localstorage data with ease. Instead of reinventing the wheel, we are going to use a localStorage wrapper that takes care of checking … Read more

All in one smart search with typeahead standalone

Typeahead standalone

Building a smart search that’s fast, autocompletes your queries and displays suggestions is something that everyone would love on their website. Today you will be introduced to a sleek, lightweight and most importantly, a standalone autocomplete library – typeahead-standalone.js. Why typeahead standalone ? Before answering that, know that typeahead-standalone is heavily inspired from the famous … Read more

LocalStorage with TTL (Time to expiry)

Localstorage with TTL

If you are familiar with the LocalStorage API, you know that there is no provision for setting a TTL. This post aims to show you an easy way to write up a simple wrapper to have LocalStorage with TTL. To setup TTL with LocalStorage, all we need to do is – Store items with TTL … Read more

Smooth Scroll in native Javascript/css

Smooth Scroll in native javascript, css

How to get a smooth scroll without using Jquery ? or any other library? As of 2020, such a trivial task is well supported natively by browsers. Smooth scroll can be achieved via pure javascript or even pure css. Lets check out how to smooth scroll natively using both the ways. Smooth scroll in pure … Read more

Lint on precommit Git hook made easy

This post involves setting up eslint, stylelint, husky and lint-staged to ensure you lint on precommit git hook. Less than 5 mins of setup that will automate linting and make it a part of your daily development process. If you are unfamiliar with the libraries that will be used, lets quickly see what each one … Read more

How to use Webpack Analyzer Bundle

Webpack analyzer bundle helps you to visualize the output of webpack in an interactive map. It displays the size that each bundle uses before and after being minified and compressed (gzipped). This can help you to discover which bundles are huge and if any of the bundles got in by mistake. Lets check this out … Read more