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
console.log('hello world') |
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
//import TestRail from './TestRail'; | |
'use strict'; | |
Object.defineProperty(exports, '__esModule', { | |
value: true | |
}); | |
var request = require('request'); | |
var qs = require('querystring'); | |
var Promise = require('bluebird'); |
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
const compose = (f, g) => (...args) => f(g(...args)); | |
class Task { | |
constructor(fork) { this.fork = fork; } | |
static of (fork) { return new Task(fork); } | |
map(f) { return Task.of((rej, res) => this.fork(rej, compose(res, f))); } | |
chain(f) { return Task.of((rej, res) => this.fork(rej, x => f(x).fork(rej, res))); } | |
ap(task) { return Task.of((rej, res) => this.fork(rej, f => task.fork(rej, compose(res, f)))); } |
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 IFunctor<T> { | |
map<U>(f: (x: T) => U): IFunctor<U>; | |
} | |
export class Maybe<T> implements IFunctor<T> { | |
private readonly $value: T; | |
static of<U>(x: U) { | |
return new Maybe(x); | |
} |
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
type ImgUrl = string; | |
type Color = string; | |
enum PackageService { | |
EyesightCheck = "EyesightCheck", | |
GlassFrame = "GlassFrame", | |
GlassLens = "GlassLens", | |
} | |
interface IGlassFrameConfig { | |
brandName: string; |
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
/* | |
* Copyright (c) 2015 Razeware LLC | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |