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
var gulp = require('gulp'); | |
var ts = require('gulp-typescript'); | |
var typescript = require('typescript'); | |
var merge = require('merge2'); | |
var concat = require('gulp-concat'); | |
var browserSync = require('browser-sync').create(); | |
var sass = require('gulp-sass'); | |
var clean = require('gulp-clean'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var karmaServer = require('karma').Server; |
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
interface EventBusInterface { | |
on(call: (...params: any[]) => void, callback: (...params: any[]) => void): number; | |
unsubscribe(subscription: number): void; | |
} | |
class EventBus implements EventBusInterface { | |
private callbacks: any[][] = []; | |
private callbackQueue: any[][] = []; // callback, arguments |
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
[{"title": "Effective Java"}, | |
{"title": "Java Concurrency in Practice"}, | |
{"title": "Java Performance the Definitive Guide"}, | |
{"title": "Clean Code"}] |
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
(ns pl.marpiec.json-parser) | |
(defn is-string-opening? [json] (= \" (first json))) | |
(defn is-string-ending? [json] (= \" (first json))) | |
(defn is-object-opening? [json] (= \{ (first json))) | |
(defn is-object-ending? [json] (= \} (first json))) |