import { NgModule } from '@angular/core';
@NgModule({
declarations: ...,
imports: ...,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_computeSearchUrlParameters(freeTextSearch, originFilter, destinationFilter, quotationStatusFilter) { | |
const argNames = ['freeTextSearch', 'originFilter', 'destinationFilter', 'quotationStatusFilter']; | |
let result = '?'; | |
[].forEach.call(arguments, (arg, index) => { | |
if (arg && arg.length) { | |
result += argNames[index] + '=' + arg + '&'; | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Twitch Auto Fullscreen | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Enter fullscreen after a countdown (ESC to cancel) | |
// @author You | |
// @include https://www.twitch.tv/* | |
// @include https://twitch.tv/* | |
// @require https://cdnjs.cloudflare.com/ajax/libs/umbrella/3.1.0/umbrella.min.js | |
// @grant GM_addStyle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
calcSum = (items, prop) => { | |
return items.reduce((a, b) => a + b[prop], 0); | |
} | |
let foo = [{price: 1}, {price: 2}, {price: 3}]; | |
calcSum(foo, 'price'); // 6 |
OlderNewer