import fetch, { ABORT_ERROR } from 'custom-fetch'
const abortableFetch = makeAbortable(fetch) // Defaults to `window.fetch` if no fetch is passed
const request = abortableFetch('/URL') // Returns an object with a `promise` and an `abort` property
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Text data vs nodeValue #jsbench #jsperf</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
This file contains hidden or 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
{ | |
"magic": "nassh-prefs", | |
"version": 1, | |
"nassh": { "profile-ids": [] }, | |
"hterm": { | |
"chesterish": { | |
"background-color": "rgba(41, 51, 64, 1)", | |
"cursor-blink": true, | |
"cursor-color": "rgba(44, 133, 247, 0.5)", | |
"font-family": "\"Fira Code\", \"DejaVu Sans Mono\", \"Noto Sans Mono\", \"Everson Mono\", FreeMono, Menlo, Terminal, monospace", |
- Download and extract zip from here
- Press
Windows + x
- Press
a
(Selects PowerShell (Admin)) - Navigate to directory where fonts were extracted to (
cd ${HOME}\Downloads\fonts-master\fonts-master
) - Set Execution Policy
Set-ExecutionPolicy RemoteSigned
[1] - Press
y
thenEnter
to accept
This file contains hidden or 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 App, { Container } from 'next/app' | |
import React from 'react' | |
class MyApp extends App { | |
render() { | |
const { | |
Component, pageProps | |
} = this.props | |
return ( |
This file contains hidden or 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 express = require('express') | |
const bodyParser = require('body-parser') | |
const next = require('next') | |
const cookieParser = require('cookie-parser') | |
const routes = require('../universal/routes') | |
const dev = process.env.NODE_ENV !== 'production' | |
const app = next({ dev }) | |
const handle = app.getRequestHandler() | |
const routeHandler = routes.getRequestHandler(app) |
This file contains hidden or 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
Show hidden characters
{ | |
"env": { | |
"development": { | |
"presets": ["next/babel"] | |
}, | |
"production": { | |
"presets": ["next/babel"] | |
}, | |
"test": { | |
"presets": [ |
This file contains hidden or 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
<!-- | |
@license | |
Copyright (c) 2016 The Polymer Project Authors. All rights reserved. | |
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | |
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | |
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | |
Code distributed by Google as part of the polymer project is also | |
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | |
--> |
This is a simplified version of https://www.polymer-project.org/2.0/docs/upgrade. It also lists what warnings and fixes are available for each upgrade task.
<dom-module>
usingis
orname
should be replaced to useid
- Warns
- Fixable: Except
dom-module
s that contain bothname
andis