This file contains hidden or 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
export class ResolvablePromise<T = any> implements Promise<T> { | |
[Symbol.toStringTag]: string; | |
__promise: Promise<T>; | |
resolve!: (value: T) => void; | |
reject!: (reason: T) => void; | |
constructor() { | |
this.__promise = new Promise<T>((resolve, reject) => { | |
this.resolve = resolve; | |
this.reject = reject; |
This file contains hidden or 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
/* | |
Ahoy Matey! | |
Welcome to the seven seas. | |
You are the captain of a pirate ship. | |
You are in battle against the royal navy. | |
You have cannons at the ready.... or are they? |
This file contains hidden or 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 { Component, Vue } from "vue-property-decorator"; | |
const DEFAULT_REDIRECT = "home"; | |
type redirectFn = () => string; | |
// You can declare a mixin as the same style as components. | |
@Component | |
export default class OnLoginMixin extends Vue { | |
protected redirect?: string | redirectFn = DEFAULT_REDIRECT; | |
protected watchLogin?: boolean = true; |
This file contains hidden or 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 { Application } from "@feathersjs/feathers"; | |
import { join } from "path"; | |
import pug from "pug"; | |
import sender from "./notifier"; | |
import { isString, isFunction } from "util"; | |
import { stringify } from "querystring"; | |
const isProd = process.env.NODE_ENV === 'production' | |
const encodeOpt = { encodeURIComponent: (str) => str } |
This file contains hidden or 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
/* tslint:disable:no-console */ | |
import { join } from 'path'; | |
import { readJsonFileSync } from '@feathers-plus/test-utils'; | |
import { App } from './app.interface' | |
// !code: imports // !end | |
// Determine if command line argument exists for seeding data | |
let ifSeedServices = ['--seed', '-s'].some(str => process.argv.slice(2).includes(str)); |
This file contains hidden or 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
/** | |
* Get the value of a property that is nested in several objects given a string of properties in the form | |
* 'foo.bar.deepProp.reallyDeepProp' would return the value 'whew that was deep' from the object | |
* { foo: { | |
* bar: { | |
* deepProp:{ | |
* reallyDeepProp: 'whew that was deep' | |
* } | |
* } | |
* } |
This file contains hidden or 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
<link rel="import" href="../polymer/polymer.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<script> | |
PolymerExpressions.prototype.json = function(object) { | |
return JSON.stringify(object); | |
} | |
</script> | |
This file contains hidden or 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
<link rel="import" href="../polymer/polymer.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<script> | |
PolymerExpressions.prototype.json = function(object) { | |
return JSON.stringify(object); | |
} | |
</script> | |
This file contains hidden or 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
<link rel="import" href="../polymer/polymer.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<script> | |
PolymerExpressions.prototype.json = function(object) { | |
return JSON.stringify(object); | |
} | |
</script> | |
This file contains hidden or 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
<link rel="import" href="../polymer/polymer.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../core-selector/core-selector.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<script> | |
PolymerExpressions.prototype.json = function(object) { | |
return JSON.stringify(object); | |
} |
NewerOlder