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
let widestElement = document.body; | |
let widestElementDepth = 0; | |
function checkElemWidth(elem, depth) { | |
const currentWidest = widestElement.getBoundingClientRect(); | |
const boundingRect = elem.getBoundingClientRect(); | |
const currentRight = currentWidest.right; | |
const right = boundingRect.right; | |
if (right >= currentRight && depth > widestElementDepth) { | |
widestElement = elem; |
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
git diff --quiet HEAD $(git rev-list --max-count=1 --merges --skip=1 HEAD) -- $FOLDER |
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
/* | |
A collection of tests where Flow and TypeScript might have different behavior | |
Some tests are borrowed from https://github.com/vkurchatkin/typescript-vs-flow | |
Some tests now have the same behavior as the new versions of Flow/TS have fixed the bugs and improved type safety | |
*/ | |
/* 1. Accessing unknown properties on objects */ |
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
/** | |
* TDD language that can used in tests for more descriptive test writing and smaller scopes. | |
* Note that we don't actually run tests, these are simply present to mimic the TDD verbs we know and love. | |
* | |
* Usage: | |
* | |
* describe('#someFunction', () => { | |
* it('should do something', () => { | |
* // test... | |
* }) |
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 "request" { | |
import type { IncomingMessage } from 'http'; | |
declare type Defaults = $Shape<{| | |
proxy: string | |
|}>; | |
declare class Request extends stream$Duplex { | |
auth( | |
username: ?string, | |
password: ?string, |
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
("password":")(?:\\"|[^"])*" |