Skip to content

Instantly share code, notes, and snippets.

View kashishgrover's full-sized avatar
I like coffee

Kashish Grover kashishgrover

I like coffee
View GitHub Profile

Moved to repo: /quenhus/uBlock-Origin-dev-filter

In order to keep filters up to date, please use this repo.

@lmfresneda
lmfresneda / remove_duplicates.js
Last active January 17, 2021 15:36
Remove duplicates from an array of objects in javascript
// FUN METHOD
/**
* Remove duplicates from an array of objects in javascript
* @param arr - Array of objects
* @param prop - Property of each object to compare
* @returns {Array}
*/
function removeDuplicates( arr, prop ) {
let obj = {};
return Object.keys(arr.reduce((prev, next) => {
'use strict';
import PushNotification from "react-native-push-notification";
let _pushNotificationToken = null;
const _pushNotificationListeners = [];
function init() {
console.log("PushNotification init");