$ parcel build --log-level verbose
@parcel/transformer-js: Non-static access of an `import` or `require`. This causes tree shaking to be disabled for the resolved module.
/home/bb8/dev/listas-web/dce-output/Affjax/foreign.js:7:67
6 | var platformSpecific = { };
> 7 | if (typeof module !== "undefined" && module.require && !(typeof process !== "undefined" && process.versions["electron"])) {
> | ^^^^^^^
8 | // We are on node.js
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
| let x = 0; | |
| const f = (n) => { | |
| if (n === 0) { | |
| x += 1; | |
| console.log("********"); | |
| 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 mergeSort = (arr) => { | |
| if (arr.length < 2) return arr; | |
| const mid = Math.floor(arr.length / 2); | |
| const l = arr.slice(0, mid); | |
| const r = arr.slice(mid); | |
| return mergeSorted(mergeSort(l), mergeSort(r)); | |
| }; |
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 binarySearchRec = (arr, from, to, target) => { | |
| if (arr.length === 0) return false; | |
| if (arr.length === 1) return arr[0] === target; | |
| const mid = Math.floor((from + to) / 2); | |
| if (arr[mid] === target) return true; | |
| if (from >= to) return false; |
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 fs = require('fs'); | |
| const { pipe, flow } = require('fp-ts/function'); | |
| const A = require('fp-ts/Array'); | |
| const R = require('fp-ts/Record'); | |
| const NEA = require('fp-ts/NonEmptyArray'); | |
| const cells = (str) => str.split(','); | |
| const lines = flow( |
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 queries = { | |
| viewed: '[name="viewed"]', | |
| fileHeader: '.file-header', | |
| fileLink: '.file-info a.link-gray-dark', | |
| }; | |
| /** | |
| * Mark ALL not viewed files as viewed | |
| */ | |
| const setAllViewed = () => |
/src
|__ components/
| |__ Button.ts
| |__ NavBar/
| |__ Foo.ts
| |__ Bar.ts
| |__ index.ts
|__ hooks/
|__ utilities/
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 * as Option from 'fp-ts/lib/Option' | |
| import * as RecordFP from 'fp-ts/lib/Record' | |
| import { pipe } from 'fp-ts/lib/pipeable' | |
| import { showString } fro 'fp-ts/lib/Show' | |
| const values = { | |
| main: { a: 'a on main', b: 'b on main' }, | |
| secondary: { b: 'b on secondary', c: 'c on secondary' }, | |
| } |
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 curry(f) { | |
| return (...args) => | |
| args.length === f.length ? f(...args) : curry(f.bind(null, ...args)); | |
| } | |
| const concat = curry((a, b) => a + b); | |
| // concat now works both ways, taking both arguments | |
| console.log(concat("dog", "cat") === "dogcat"); | |
| // or one at a time |