Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
export function loadConfigModule(filename) { | |
// sub your own | |
return require(filename); | |
} | |
/** | |
* Modify a Webpack configuration by applying a mutator module/function. | |
* @param {Object} options | |
* @param {Object} options.config Webpack configuration object to modify in-place |
import ReactDOM from "react-dom"; | |
export default ReactDOM.unstable_batchedUpdates; |
I did some research into the package.json
"module"
field. I wrote some code to download all the the package.json
files from all the public packages in the NPM registry. Here are some findings:
941 public NPM packages use the "module"
field as of 2018-10-22.
Here are the top 30 packages, as ranked by number of public dependents (or see the full list):
Dependents | Package Name | "module" Field Value |
---|---|---|
16,286 | should | ./es6/should.js |
15,472 | sinon | ./pkg/sinon-esm.js |
export x = 42
db.getCollection('list').aggregate([ | |
{ | |
$facet: { | |
"events":[{ | |
$match: { | |
'type': 'Event' | |
} | |
}], | |
"tasks": [{ | |
$match: { |
Here are the main breaking changes between the 0.x and 1.0 versions of Apollo Client.
The structure of fetchMoreResult
has been changed. Previously fetchMoreResult
used to contain data
and loading
fields, now fetchMoreResult
is what fetchMoreResult.data
used to be. This means your updateQueries
function has to change as follows:
updateQuery: (prev, { fetchMoreResult }) => {
<hash>
with your gist's hash):
# with ssh
git clone [email protected]:<hash>.git mygist
# with https
git clone https://gist.github.com/.git mygist
Original article: https://scotch.io/tutorials/authenticate-a-node-js-api-with-json-web-tokens
mkdir au