Skip to content

Instantly share code, notes, and snippets.

View warash's full-sized avatar

Michał Majewski warash

View GitHub Profile
import { Observable } from 'rxjs/Observable';
import { environment } from '../../environments/environment';
declare module 'rxjs/Observable' {
interface Observable<T> {
debug: (...any) => Observable<T>;
}
}
Observable.prototype.debug = (message: string) => {
@warash
warash / test.ts
Created March 14, 2017 22:36
test
export const todo = (state, action)=> ({...state})
@warash
warash / buffer.js
Created September 30, 2013 20:41
Buffers tasks - and forcess execution one by one #corutines #pipeline #deferred
/* Class: Buffer
* methods: append
*
* Constructor: takes a function which will be the task handler to be called
*
* .append appends a task to the buffer. Buffer will only call a task when the
* previous task has finished
*/
var Buffer = function(handler) {
var tasks = [];