I hereby claim:
- I am baetheus on github.
- I am baetheus (https://keybase.io/baetheus) on keybase.
- I have a public key ASCazPD8JqHVme4Inlk1UFORaPUcRKxU-XNuMjjhClrJfwo
To claim this, I am signing this object:
| { | |
| // See https://go.microsoft.com/fwlink/?LinkId=733558 | |
| // for the documentation about the tasks.json format | |
| "version": "2.0.0", | |
| "tasks": [ | |
| // Run npm start as default build script (cmd + shift + b) | |
| { | |
| "label": "start", | |
| "type": "npm", | |
| "script": "start", |
| /** | |
| * Get Campaigns | |
| */ | |
| export const getCampaigns = contactStrategyActionFactory.async<number, Campaign[], Error>('GET_CAMPAIGNS'); | |
| export const campaignsLens = Lens.fromProp<ContactStrategyStore, 'campaigns'>('campaigns'); | |
| const getCampaignsReducer = reducerFactory(getCampaigns, campaignsLens); | |
| const getCampaignsEpic: Epic = a$ => | |
| a$.pipe( | |
| filterSwitchAsync(getCampaigns, companyId => from(GetCampaigns({ companyId }).then(({ campaigns }) => campaigns))) |
| import * as React from 'react'; | |
| import { SFC } from 'react'; | |
| import { useRedux } from '~/store'; | |
| import { currentRoute, Routes } from '~/stores/routing'; | |
| import { Campaign } from './pages/Campaign'; | |
| import { Dashboard } from './pages/Dashboard'; | |
| export interface RouterProps {} |
| export interface InputState<ValueType, MaskType> { | |
| value: ValueType; | |
| mask: MaskType; // TODO Decide on masking implementation | |
| touched: boolean; | |
| invalid: boolean; | |
| focused: boolean; | |
| disabled: boolean; | |
| } | |
| export enum InputEvents { |
I hereby claim:
To claim this, I am signing this object:
| /** | |
| * maxCountDuringPeriod | |
| */ | |
| export const maxCountDuringPeriod = (count: number, period: number) => (obs: Observable<any>) => { | |
| if (count < 2) { | |
| throw new Error('maxCountDuringPeriod count must be greater than or equal to 2'); | |
| } | |
| if (period < 0) { | |
| throw new Error('maxCountDuringPeriod period must be positive'); |
| import { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, Input, Output, Renderer2 } from '@angular/core'; | |
| import { fromEvent, merge, Observable, Subscription } from 'rxjs'; | |
| import { catchError, map } from 'rxjs/operators'; | |
| const requestImage = (src: string) => { | |
| const img = new Image(); | |
| img.src = src; | |
| return merge(fromEvent(img, 'error'), fromEvent(img, 'load')).pipe( | |
| map(evt => { | |
| if (evt.type === 'error') { |
| import { some, none, fromNullable } from 'fp-ts/lib/Option'; | |
| import { Observable } from 'rxjs' | |
| import { useEffect, useState } from 'react' | |
| const useRxjs = <T>(obs: Observable<T>, init?: T) => { | |
| const [state, setState] = useState(fromNullable(init)); | |
| const [errorState, setErrorState] = useState(none); | |
| const [completeState, setCompleteState] = useState(false); | |
| useEffect(() => obs |
| import { array } from 'fp-ts/lib/Array'; | |
| import { fromNullable, none, Option, some } from 'fp-ts/lib/Option'; | |
| import { fromTraversable, Lens, Optional, Prism } from 'monocle-ts'; | |
| /* Interfaces */ | |
| interface Bug { | |
| bugId: number; | |
| description: Option<string>; | |
| } |
| import { Option } from 'fp-ts/lib/Option'; | |
| import * as t from 'io-ts'; | |
| import { createOptionFromNullable } from 'io-ts-types'; | |
| /** | |
| * Semver RegExp from https://github.com/sindresorhus/semver-regex/blob/master/index.js | |
| */ | |
| const SEMVER_REGEX = /(?<=^v?|\sv?)(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-(?:[1-9]\d*|[\da-z-]*[a-z-][\da-z-]*)(?:\.(?:[1-9]\d*|[\da-z-]*[a-z-][\da-z-]*))*)?(?:\+[\da-z-]+(?:\.[\da-z-]+)*)?(?=$|\s)/gi; | |
| interface SemverBrand { |