Eliminating all duplicates in array with reduce() reduce take 4 params previousValue, currentValue, index, array
array.reduce((acc, el, i, arr) => {
if (arr.indexOf(el) !== i && acc.indexOf(el) < 0) acc.push(el); return acc;
}, []);| // | |
| // the stack that i use with stylus-lang | |
| // | |
| #nib || stylus mixin | |
| https://github.com/stylus/nib | |
| #rupture || stylus media queries | |
| https://github.com/jescalan/rupture |
| // https://api.whatsapp.com/send?phone=+{{ *YOURNUMBER* }}&text=%20{{ *YOUR MESSAGE* }} | |
| var yourNumber = "{{ your number in string}}" | |
| var yourMessage = "{{ your message in string }}" | |
| // %20 mean space in link | |
| // If you already had an array then you just join them with '%20' | |
| // easy right | |
| function getLinkWhastapp(number, message) { |
Eliminating all duplicates in array with reduce() reduce take 4 params previousValue, currentValue, index, array
array.reduce((acc, el, i, arr) => {
if (arr.indexOf(el) !== i && acc.indexOf(el) < 0) acc.push(el); return acc;
}, []);| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <link rel="stylesheet" href="./css/style.css"> | |
| <title>A Gamma Image Editor</title> | |
| </head> | |
| <body> |
| HOST= | |
| PORT= | |
| ENV= | |
| REDIS_HOST= | |
| REDIS_PORT= | |
| DB_CLIENT= | |
| DB_HOST= | |
| DB_USER= |
This Youtube ID mean to be played with Tizonia on terminal :
| #!/usr/bin/env node | |
| /* I found this code somewhere in the wild if someone could reference it I would happy | |
| * I'm creating this because my google search cant find it! It will run index.js | |
| * and watch files under folder src. Thanks. tell me if you found the source of this code | |
| * I'm glad to mention it here. | |
| */ | |
| /* eslint-disable no-path-concat */ |