Skip to content

Instantly share code, notes, and snippets.

View ankryption's full-sized avatar
:octocat:
|| ¯\_(ツ)_/¯ ||

Ankush Mehta ankryption

:octocat:
|| ¯\_(ツ)_/¯ ||
View GitHub Profile
const axios = require('axios');
async function follow(url) {
const { data } = await axios(url);
// display the route
console.log('data: ', data);
// the end: nothing to follow
if (!data || !data.follow) return;
/*
* A simple function that returns the objects between a range of given values, and grouped by a given key
*/
Array.prototype.customFilter = function(group, range, low, high) {
if (!(array instanceof Array)) {
throw new Error("Invalid array");
}
var result = {};