Skip to content

Instantly share code, notes, and snippets.

const path = require("path");
module.exports = {
context: path.resolve(__dirname, "./"),
output: {
path: __dirname + "/dist",
filename: "bundle.js",
library: "ab-chart",
libraryTarget: "commonjs"
},
const path = require("path");
module.exports = {
context: path.resolve(__dirname, "."),
output: {
path: __dirname + "/dist",
filename: "bundle.js",
library: "ab-chart",
libraryTarget: "umd"
},
{
"name": "ab-chart",
"version": "1.0.0",
"description": "",
"main": "dist/bundle.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack"
},
"keywords": [],
const path = require("path");
module.exports = {
output: {
path: __dirname + "/dist",
filename: "bundle.js",
library: "ab-chart",
libraryTarget: "commonjs-module"
},
entry: "./src/index.js",
init(searchTerm: String) {
let searchSettings = AppEnvironment.current.searchSettings
// assemble context for search
let assembleSearchContext: () throws -> PerformSearchContext = {
let groups = searchSettings.groups
let filter = try SearchFilter(groups: groups)
let searchType = try SearchType(groups: groups)
class ListViewController: UIViewController, Styled, Reloadable {
private let viewModel: ListViewModel
private let tableview = UITableView()
private let refreshControl = UIRefreshControl()
private let disposeBag = DisposeBag()
init(listViewModel: ListViewModel) {
{
presets: ["env", "react"]
}
//
// Queryables.swift
// DataSiteOne
//
// Created by Bollbach, Alexander on 7/26/18.
// Copyright © 2018 Merrill Corporation. All rights reserved.
//
import Foundation
enum APIResult<T: APIRequest> {
case success(T.Response)
case failure(APIError)
}
extension APIResult: Equatable where T.Response: Equatable {
static func == (lhs: APIResult<T>, rhs: APIResult<T>) -> Bool {
switch (lhs, rhs) {
case (.success, .failure), (.failure, .success):
return false
class Foo: FooType {
func logBars(_ num: Int) -> String {
return "\(num) bars"
}
}
func testFooReturnsBar() {
let sut = Foo() // "subject under test"