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
'use strict' | |
const IPFS = require('ipfs') | |
function App() { | |
let node | |
create() |
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
/* eslint-disable */ | |
function md5cycle(x, k) { | |
let a = x[0]; | |
let b = x[1]; | |
let c = x[2]; | |
let d = x[3]; | |
a = ff(a, b, c, d, k[0], 7, -680876936); | |
d = ff(d, a, b, c, k[1], 12, -389564586); |
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 $$observable from 'symbol-observable' | |
import ActionTypes from './utils/actionTypes' | |
import isPlainObject from './utils/isPlainObject' | |
import combineReducers from './combineReducers' | |
/** | |
* Creates a Redux store that holds the state tree. | |
* The only way to change the data in the store is to call `dispatch()` on it. | |
* |
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
// https://developer.mozilla.org/en-US/docs/Web/API/window.setTimeout | |
var timeoutID; | |
delayedAlert(); | |
function delayedAlert() { | |
timeoutID = window.setTimeout(slowAlert, 2000); | |
} | |
function slowAlert() { |
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
compilation.mainTemplate.hooks.renderManifest.tap( | |
'URLImportPlugin', | |
(result, { chunk }) => { | |
console.log(chunk); | |
const renderedModules = Array.from(chunk.modulesIterable).filter( | |
(module) => module.type === MODULE_TYPE | |
); | |
if (renderedModules.length > 0) { | |
result.push({ |
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
function mergeDeep(...objects) { | |
const isObject = obj => obj && typeof obj === 'object'; | |
return objects.reduce((prev, obj) => { | |
Object.keys(obj).forEach(key => { | |
const pVal = prev[key]; | |
const oVal = obj[key]; | |
if (Array.isArray(pVal) && Array.isArray(oVal)) { | |
prev[key] = pVal.concat(...oVal); |
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
function hasExternalizedModule(module) { | |
const moduleSource = module?.originalSource?.()?.source?.() || ''; | |
// dead simple way to check if the magic export comment is in a file | |
if (moduleSource?.indexOf('externalize') > -1 || false) { | |
return moduleSource; | |
} | |
return false; | |
} | |
const interleaveConfig = test => ({ |
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
// Menu.js | |
import React from 'react'; | |
const Nav = ({items}) => { | |
return (<nav><ul>{items.map(Item=><Item/>)}</ul></nav>) | |
} | |
export const alert = (message) => { | |
alert(message) |
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 createHash = require('webpack/lib/util/createHash'); | |
const usedIds = new Set(); | |
compilation.hooks.beforeModuleIds.tap('URLImportPlugin', (modules) => { | |
for (const module of modules) { | |
// if the module has an id, and its got a path to a real file | |
if (module.id === null && module.resource) { | |
const hash = createHash(this.opts.hashFunction || 'md4'); | |
// grab the resource path, without any loader queries |
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
if(!window.entryManifest) {window.entryManifest = {}}; | |
window.entryManifest["some-namespace"] = { | |
"commons.js": { | |
"path": "static/chunks/commons.7343b2658e7f703389c2.js", | |
"isInitial": true | |
}, | |
"static/runtime/webpack.js.js": { | |
"path": "static/runtime/webpack-035ac2b14bde147cb4a8.js", | |
"isInitial": true |
OlderNewer