http://blog.sodhanalibrary.com/2016/08/detect-when-user-scrolls-to-bottom-of.html#.WVBjlXWGPOQ
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 definitions for get-port 4.0 | |
// Project: https://github.com/sindresorhus/get-port | |
// Definitions by: York Yao <https://github.com/plantain-00> | |
// BendingBender <https://github.com/BendingBender> | |
// MH Rohman <https://github.com/rohmanhm> | |
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | |
declare module 'get-port' { | |
type Options = { | |
port?: number | ReadonlyArray<number>; |
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
// tslint:disable:no-console | |
// In production, we register a service worker to serve assets from local cache. | |
// This lets the app load faster on subsequent visits in production, and gives | |
// it offline capabilities. However, it also means that developers (and users) | |
// will only see deployed updates on the 'N+1' visit to a page, since previously | |
// cached resources are updated in the background. | |
// To learn more about the benefits of this model, read https://goo.gl/KwvDNy. | |
// This link also includes instructions on opting out of this behavior. |
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
declare module 'format-currency' { | |
interface Options { | |
format?: string; // %s => symbol, %v => value, %c => code | |
code?: string; | |
symbol?: string; | |
locale?: string; | |
minimumFractionDigits?: number; | |
maximumFractionDigits?: number; | |
nanZero?: boolean; | |
} |
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
declare module 'puppeteer' { | |
export interface ConnectOptions { | |
browserWSEndpoint?: string | |
// a browser websocket endpoint to connect to | |
ignoreHTTPSErrors?: boolean | |
// Whether to ignore HTTPS errors during navigation. Defaults to `false` | |
} | |
export interface LaunchOptions { | |
ignoreHTTPSErrors?: boolean |
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
(id=".[^\"]*") | |
Demo | |
https://regex101.com/r/5u1Yo6/1 |
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).
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
function serializeComputedStyle (computed) { | |
const result = {} | |
Object.keys(computed).forEach(key => { | |
if (!Number(key) && !(Number(key) <= 0)) { | |
result[key] = computed[key] | |
} | |
}) | |
return result | |
} |
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
/** | |
* Flowtype definitions for index | |
* Generated by Flowgen from a Typescript Definition | |
* Flowgen v1.2.0 | |
* Author: [Joar Wilk](http://twitter.com/joarwilk) | |
* Repo: http://github.com/joarwilk/flowgen | |
*/ | |
/** |