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
Welcome* | |
Owner | |
dashboard -> Dashboard | |
Non-Owner | |
create -> Create | |
find -> Search Results | |
Auth | |
redirect -> Create | |
Create | |
Authorized |
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 assert from 'assert'; | |
interface CreateErrorOptions { | |
/** Additional error data */ | |
data?: string; | |
/** Whether clients should interpret error as fatal */ | |
fatal: boolean; | |
/** Error's PascalCase name */ | |
name: string; | |
/** HTTP status code */ |
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
// Dynamic state example | |
import * as React from 'react'; | |
import * as ReactNative from 'react-native'; | |
import connect from 'react-redux' | |
class MyComponent extends React.Component { | |
constructor(props) { | |
// Assign state based on props | |
// A contrived example: |
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
// Measure letter spacing on | |
// https://material-components-web.appspot.com/typography.html | |
Array.from(document.querySelectorAll('.demo-typography--section > *')).forEach((node) => { | |
const span = document.createElement('span') | |
const { fontSize, letterSpacing } = getComputedStyle(node) | |
const parsedFontSize = parseFloat(fontSize, 10) / 16 | |
const parsedLetterSpacing = parseFloat(letterSpacing, 10) / 16 | |
span.innerHTML = `<span style="background:#efefef;border-radius:2px;display:inline-block;font:12px/15px monospace;letter-spacing:normal;margin:0 0 4px 8px;padding:4px 8px;"> | |
font-size: ${Number.isNaN(parsedFontSize) ? fontSize : `${Math.round(parsedFontSize * 1000) / 1000}rem`}<br /> |
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
/** | |
* **Warning!** This script modifies files. Use with caution, in a version | |
* controlled directory, etc. | |
* | |
* Replace partially resolved `import` or `require` paths with fully resolved | |
* paths using Node.js's internal `require` mechanism. Use: | |
* | |
* ```shell | |
* find . -type f -name '*.js' -exec node resolve-imports.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
// Try here: https://material-components-web.appspot.com/typography.html | |
Array.from(document.querySelectorAll('.demo-typography--section > *')).forEach((node) => { | |
const span = document.createElement('span') | |
const { fontSize, letterSpacing } = getComputedStyle(node) | |
const parsedFontSize = parseFloat(fontSize, 10) / 16 | |
const parsedLetterSpacing = parseFloat(letterSpacing, 10) / 16 | |
span.innerHTML = `<span style="background:#efefef;border-radius:2px;display:inline-block;font:12px/15px monospace;letter-spacing:normal;margin:0 0 4px 8px;padding:4px 8px;"> | |
font-size: ${Number.isNaN(parsedFontSize) ? fontSize : `${Math.round(parsedFontSize * 1000) / 1000}rem`}<br /> | |
letter-spacing: ${Number.isNaN(parsedLetterSpacing) ? letterSpacing : `${Math.round(parsedLetterSpacing * 1000) / 1000}rem`}</span>` |
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
var hrtime = process.hrtime; | |
function checkForProp (a) { | |
return !!a.toLowerCase | |
} | |
function checkToStringEqual (a) { | |
return a.toString() === a | |
} |
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
const _ = require('lodash') | |
const data = require('./wat.json') | |
const targets = [ | |
'drydock', | |
'handlebars', | |
'minimist', | |
'node-uuid', | |
'open', | |
'prettyjson' | |
] |
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
24012 silly extract websocket-extensions@0.1.2 | |
24013 silly extract yargs-parser@7.0.0 | |
24014 silly extract which-module@2.0.0 | |
24015 silly extract webpack-sources@1.0.1 | |
24016 silly extract read-pkg-up@2.0.0 | |
24017 silly extract read-pkg@2.0.0 | |
24018 silly extract load-json-file@2.0.0 | |
24019 silly extract strip-bom@3.0.0 | |
24020 silly extract string-width@2.1.1 | |
24021 silly extract strip-ansi@4.0.0 |
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
$ npm t | |
> chokidar@1.7.0 test /Users/creed/Sites/chokidar | |
> istanbul test node_modules/mocha/bin/_mocha | |
chokidar | |
✓ should expose public API methods | |
fsevents (native extension) |