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 TRANSITIONS = { | |
BACK: 'BACK', | |
CONTINUE: 'CONTINUE', | |
}; | |
const STATES = { | |
ENTREE: 'ENTREE', | |
COMBO: 'COMBO', | |
DRINK: 'DRINK', |
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 TRANSITIONS = { | |
BACK: 'BACK', | |
CONTINUE: 'CONTINUE', | |
}; | |
const STATES = { | |
INITIALIZE: 'INITIALIZE', |
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
/************* | |
Fixed | |
*************/ | |
const STATES = Object.fromEntries(["animalKingdom", "dogOrCat", "petAge", "enrolledInPuppySchool", "recommendedProduct"].map(x => [x, x])) | |
const GUARDS = Object.fromEntries(["isMammal", "isFish", "isDog", "isCat", "petNameValid"].map(x => [x, x])) | |
const TRANSITIONS = Object.fromEntries(["continue", "error"].map(x => [x, 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
/************* | |
Fixed | |
*************/ | |
const STATES = Object.fromEntries(["animalKingdom", "dogOrCat", "petAge", "enrolledInPuppySchool", "recommendedProduct"].map(x => [x, x])) | |
const GUARDS = Object.fromEntries(["isMammal", "isFish", "isDog", "isCat", "petNameValid"].map(x => [x, x])) | |
const TRANSITIONS = Object.fromEntries(["continue", "error"].map(x => [x, x])) | |
// FULLY SERIALIZED |
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 State = { | |
cancelMigrationConfirmation: 'cancelMigrationConfirmation', | |
done: 'done', | |
duplicatePortal: 'duplicatePortal', | |
initial: 'initial', | |
migrationAccountsMismatch: 'migrationAccountsMismatch', | |
migrationDisclosure: 'migrationDisclosure', | |
plaidFlow: 'plaidFlow', | |
portalError: 'portalError', | |
selectInstitution: 'selectInstitution', |
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
extension UIImage { | |
/// Aspect fit an image from a size. (center) | |
/// | |
/// The input size is the minimum size of the output image. The size of `self` is the | |
/// maximum size of the output image. Aspect ratio is maintained. Transparency is added to the | |
/// sides of the output image to keep the image centered. | |
/// | |
/// - parameter in: The `CGSize` in which to scale and center `self`. | |
func scaleAndFit(in inputSize: CGSize) -> UIImage? { | |
// Scale rect to fit image, if image is larger. |
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
// | |
// GrowingTextView.swift | |
// https://gist.github.com/Bogidon/cc0c9ae6f041413c39fb0ff146ad1b18 | |
// | |
// Created by Bogdan Vitoc on 02/22/2017. | |
// Distributed under the MIT License: https://gist.github.com/Bogidon/cc0c9ae6f041413c39fb0ff146ad1b18#file-license | |
// | |
import UIKit |
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
// | |
// AnimatedGrowingTextView.swift | |
// https://gist.github.com/Bogidon/632e265b784ef978d5d8c0b86858c2ee | |
// | |
// Created by Bogdan Vitoc on 02/15/2017. | |
// Distributed under the MIT License: https://gist.github.com/Bogidon/632e265b784ef978d5d8c0b86858c2ee#file-license | |
// | |
import UIKit |
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
'use strict' | |
let mocha = require('mocha') | |
let Base = mocha.reporters.Base | |
exports = module.exports = BrowserSpec | |
// This class is a ported version of Mocha's default "spec" reporter to format color output for the browser. | |
// https://github.com/mochajs/mocha/blob/master/lib/reporters/spec.js | |
function BrowserSpec (runner) { | |
mocha.reporters.Base.call(this, runner) |
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 Foundation | |
extension Date { | |
/** | |
Returns the current time in a timezone. | |
- Note: | |
`Date` is [time zone agnostic.](https://developer.apple.com/reference/foundation/date#overview) | |
*/ | |
static func `for`(zone: TimeZone) -> Date { |
NewerOlder