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
<script> | |
export default { | |
props: { | |
span: { | |
type: String, | |
default: null | |
} | |
}, | |
render: function (createElement) { | |
return createElement( |
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
/** Converts destructured parameters with default values to non-shorthand syntax, fixing Edge 16 & 17. */ | |
module.exports = (babel, options = {}) => { | |
const { types: t } = babel; | |
const isArrowParent = p => p.parentKey=='params' && p.parentPath && p.parentPath.isArrowFunctionExpression(); | |
return { | |
name: "transform-edge-default-parameters", | |
visitor: { | |
AssignmentPattern(path) { |
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
// Create a Worker we want to share memory with: | |
let w = new Worker(`data:text/javascript, | |
onmessage = ({data: memory}) => { | |
// Got WebAssembly.Memory once, log same instance forever with no further postMessages: | |
setInterval(() => console.log('Current buffer in worker:', memory.buffer), 5_000); | |
} | |
`); | |
// Create a shared growable memory: | |
let m = new WebAssembly.Memory({ initial:1, maximum: 65536, shared: true }); | |
// Send memory to the worker: |
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 { SubscribeFunction, Observable } from 'relay-runtime'; | |
import { SubscriptionClient } from 'subscriptions-transport-ws'; | |
import config from '../config'; | |
import { getToken } from '../components/auth/security'; | |
export const setupSubscription: SubscribeFunction = (request, variables) => { | |
const query = request.text; | |
const authorization = getToken(); |
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 { createServer } = require('http'); | |
createServer((req, res) => { | |
res.writeHead(200, { | |
Connection: 'Transfer-Encoding', | |
'Content-Type': 'text/html; charset=utf-8', | |
'Transfer-Encoding': 'chunked' | |
}); | |
res.write(` |
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 responseParserTypes = { | |
json: (response) => response.json(), | |
text: (response) => response.text(), | |
blob: (response) => response.blob(), | |
formData: (response) => response.formData(), | |
arrayBuffer: (response) => response.arrayBuffer(), | |
}; | |
const parseResponse = (response, type) => { | |
if (!Object.keys(responseParserTypes).includes(type)) { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<server xmlns="urn:jboss:domain:4.0"> | |
<extensions> | |
<extension module="org.jboss.as.clustering.infinispan"/> | |
<extension module="org.jboss.as.clustering.jgroups"/> | |
<extension module="org.jboss.as.connector"/> | |
<extension module="org.jboss.as.deployment-scanner"/> | |
<extension module="org.jboss.as.ee"/> | |
<extension module="org.jboss.as.ejb3"/> | |
<extension module="org.jboss.as.jaxrs"/> |
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
export const map = <T, O>(map: (input: T) => Promise<O> | O) => | |
async function* mapGenerator(asyncIterable: AsyncIterableIterator<T>) { | |
for await (const value of asyncIterable) { | |
yield map(value); | |
} | |
}; | |
export const filter = <T, U extends T>(filter: (input: T) => input is U) => | |
async function* filterGenerator(asyncIterable: AsyncIterableIterator<T>) { |
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
// This code is untested. It may new some minor modifications to work | |
import RelayQueryResponseCache from "relay-runtime/lib/RelayQueryResponseCache"; | |
import { | |
Environment, | |
Network, | |
RecordSource, | |
Store, | |
Observable |
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
/* | |
Makes your remote containers low level API accessible via: | |
import accessFederatedContainer from "access-federated-containers"; | |
accessFederatedContainer("app2") | |
*/ | |
/** @typedef {import("webpack").Compiler} Compiler */ | |
/** @typedef {import("webpack").Compilation} Compilation */ |
OlderNewer