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
| 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 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
| 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 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
| 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 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
| // 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 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 $$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 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
| /* 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 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
| 'use strict' | |
| const IPFS = require('ipfs') | |
| function App() { | |
| let node | |
| create() |
NewerOlder