A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
This file contains hidden or 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
import Vue from 'vue'; | |
import VueRouter from 'vue-router'; | |
import applyOnRouterAbortShim from './on-router-abort-shim'; | |
Vue.use(VueRouter); | |
const router = new VueRouter(...); | |
applyOnRouterAbortShim(router); |
This file contains hidden or 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
|
This file contains hidden or 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
// inherits from promise class through the chain | |
new ExtendablePromise(resolve => resolve()).then() instanceof Promise === true | |
// inherits from promise subclass through the chain | |
new ExtendablePromise(resolve => resolve()).then() instanceof ExtendablePromise === true | |
// allows for direct calls for ES5 inheritance | |
ExtendablePromise.call(Object.create(ExtendablePromise.prototype), resolve => resolve()).then() |
This file contains hidden or 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
import * as models from "models"; | |
import Sequelize from "sequelize"; | |
import fs from "fs"; | |
delete models.default; | |
const sequelize = new Sequelize( | |
'', | |
'', | |
'', { |
This file contains hidden or 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
// These window.navigator contain language information | |
// 1. languages -> Array of preferred languages (eg ["en-US", "zh-CN", "ja-JP"]) Firefox^32, Chrome^32 | |
// 2. language -> Preferred language as String (eg "en-US") Firefox^5, IE^11, Safari, | |
// Chrome sends Browser UI language | |
// 3. browserLanguage -> UI Language of IE | |
// 4. userLanguage -> Language of Windows Regional Options | |
// 5. systemLanguage -> UI Language of Windows | |
var browserLanguagePropertyKeys = ['languages', 'language', 'browserLanguage', 'userLanguage', 'systemLanguage']; |
This file contains hidden or 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
.each(@list, @ruleset) { | |
@plugin "plugins/lambda"; | |
@length : length(@list); | |
._iterate(1); | |
._iterate(@index) when (@index =< @length) { | |
@item : extract(@list, @index); | |
@lambda : lambda(@item, @index, item index, @ruleset); | |
@lambda(); |
This file contains hidden or 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
// @mixin | |
// Loops over all items in the specified list and for each item executes | |
// a special `.\\` mixin declared by the specified ruleset. The ruleset | |
// and mixin combination is used to emulate a lambda function delegate. | |
// @param {List} list | |
// The list over which to loop. | |
// @param {Ruleset} lambda | |
// A ruleset that may define the `.\\` mixin that is used to process the | |
// individual list items. The mixin should correspond to the | |
// following signature: |
This file contains hidden or 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
Options -Indexes | |
<IfModule !mod_rewrite.c> | |
Deny from all | |
</IfModule> | |
<IfModule mod_rewrite.c> |
This file contains hidden or 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
/** | |
* Intercept.js | |
* Simple meta-programming for methods | |
* Copyright (c) 2014 marlun78 | |
* MIT License, https://gist.github.com/marlun78/bd0800cf5e8053ba9f83 | |
* | |
* The intercept-function provides a pre and a post hook that | |
* will run before and after the original implementation | |
* respectively. In the pre-hook you have access to the | |
* arguments passed, and in the post-hook you have access to |
NewerOlder