View tarjan.test.ts
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 { Graph, Vertex, Tarjan } from '../tarjan'; | |
it('handles simple cases', () => { | |
const v0 = new Vertex('0'); | |
const v1 = new Vertex('1'); | |
const v2 = new Vertex('2'); | |
v0.connections.add(v1); | |
v1.connections.add(v2); |
View css-perf-metrics.csv
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
react-with-styles (control) | Emotion | Treat | Linaria | ||
---|---|---|---|---|---|
Total Blocking Time (ms) | 276 | 189 (-87) | 122 (-154) | 144 (-132) | |
JS bundle size (KiB) | 666 | 677 (+11) | 581 (-85) | 596 (-70) | |
CSS bundle size (KiB) | 8 | 8 (+0) | 12 (+4) | 13 (+5) | |
Update layout tree count | 2.84 | 2.96 (+0.12) | 2.00 (-0.84) | 2.00 (-0.84) | |
Update layout tree duration (ms) | 7,594 | 3,225 (-4,369) | 3,313 (-4,281) | 3,380 (-4,214) | |
Composite layers count | 5.43 | 5.22 (-0.21) | 4.05 (-1.38) | 4.04 (-1.39) | |
Composite layers duration (ms) | 660 | 379 (-281) | 306 (-354) | 292 (-368) |
View tsserverWithEventsPlugin.ts
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 * as ts_module from 'typescript/lib/tsserverlibrary'; | |
/** Log to the TS Server log */ | |
function log(info: ts.server.PluginCreateInfo, message: string) { | |
info.project.projectService.logger.info(`[My TS Server Plugin] ${message}`); | |
} | |
// https://github.com/microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin | |
export default function init({ typescript: ts }: { typescript: typeof ts_module }) { | |
return { |
View pi.js
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
// See "Unbounded Spigot Algorithms for the Digits of Pi," by Jeremy Gibbons, | |
// Math. Monthly, April 2006, pages 318-328. | |
// Adapted from https://gustavus.edu/mcs/max/pi/ | |
let app; | |
let q = BigInt(1); | |
let r = BigInt(0); | |
let t = BigInt(1); | |
let k = BigInt(1); |
View waitUntilSettled.ts
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
/** | |
* We often run into a problem with functions that select DOM nodes like | |
* `cy.get`, where in between the `cy.get` call and the next item in the chain, | |
* the DOM element that `cy.get` found ends up being removed from the DOM. This | |
* can affect code as simple as: | |
* | |
* cy.get('button').click(); | |
* | |
* When it fails sporadically, it uses the following error message: | |
* |
View array.includes.js
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
module.exports = function arrayIncludes(arr, search, fromIndex) { | |
return arr.includes(search, fromIndex); | |
}; |
View propTypes.diff
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
diff -bur esm-before/components/CalendarDay.js esm/components/CalendarDay.js | |
--- esm-before/components/CalendarDay.js 2018-08-22 15:21:46.000000000 -0700 | |
+++ esm/components/CalendarDay.js 2018-08-22 15:22:02.000000000 -0700 | |
@@ -25,7 +25,7 @@ | |
import { DAY_SIZE } from '../constants'; | |
-var propTypes = forbidExtraProps(_objectAssign({}, withStylesPropTypes, { | |
+var propTypes = process.env.NODE_ENV !== "production" ? forbidExtraProps(_objectAssign({}, withStylesPropTypes, { | |
day: momentPropTypes.momentObj, |
View dynamic-import-requires-webpack-chunkname-test.js
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
/** | |
* @fileoverview dynamicImport requires a leading comment with the webpackChunkName | |
* @author Kimberly Strauch | |
* @copyright 2018 Kimberly Strauch. All rights reserved. | |
* See LICENSE file in root directory for full license. | |
*/ | |
'use strict'; | |
const rule = require('../../../lib/rules/dynamic-import-requires-webpack-chunkname'); |
View find-nearly-empty-directories.sh
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
#!/bin/sh | |
# Find directories that only contain a single .eslintrc file. | |
# Adapted from https://superuser.com/a/727070 | |
# Enable double glob to find hidden files | |
shopt -s dotglob | |
# Loop through every subdirectory. | |
# Currently need to tweak this line and run it for every level of directory |
View story.js
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 { storiesOf, action } from '@kadira/storybook'; | |
import { browserDLSExamples } from '../examples/allExamples'; | |
import fixtures from '../examples/fixtures'; | |
const { DLSExamples, DLSComponents } = browserDLSExamples(); | |
Object.entries(DLSExamples).forEach(([name, examplesFunc]) => { | |
let story = storiesOf(name, module); |
NewerOlder