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 { writeFile } from 'fs/promises'; | |
| import { resolve } from 'path'; | |
| import glob from 'fast-glob'; | |
| const cwd = process.env.PWD; | |
| async function outputConfigJson(file) { | |
| const outputFile = file.replace(/\.js$/, '.json'); | |
| // use import() so both CJS and ESM work | |
| let config = await import(resolve(cwd, file)); |
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
| export function compose(...fns) { | |
| const [fn0, ...rest] = fns.reverse(); | |
| return (...args) => rest.reduce((acc, fn) => fn(acc), fn0(...args)); | |
| } | |
| export function mapValue(obj, fn) { | |
| return Object.keys(obj).reduce((acc, key) => { | |
| acc[key] = fn(obj[key]); | |
| return acc; | |
| }, {}); |
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 React, { useState, useCallback } from 'react'; | |
| // import PropTypes from 'prop-types'; | |
| import { Confirm } from 'semantic-ui-react'; | |
| const PureConfirm = React.memo(Confirm); | |
| const CLOSE = [false, undefined, undefined, undefined]; | |
| export const Context = React.createContext(CLOSE); |
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 React from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import { Provider, connect } from 'react-redux'; | |
| import { api } from '../../util/stores'; | |
| export const Context = React.createContext(); | |
| function mapDispatchToProps(dispatch, {action}) { | |
| return { | |
| api: api(action, dispatch) |
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 combine() { | |
| return Array.prototype.slice.call(arguments) | |
| .reverse() | |
| .reduce(function(acc, m) { | |
| return function(left, right, next) { | |
| return m(left, right, function(l, r) { | |
| return acc(l, r, next); | |
| }); | |
| }; | |
| }); |
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 io.vertx.core.Vertx; | |
| import io.vertx.core.http.HttpClient; | |
| import io.vertx.core.http.HttpClientOptions; | |
| import io.vertx.core.http.HttpMethod; | |
| import io.vertx.ext.unit.TestContext; | |
| import io.vertx.ext.unit.junit.VertxUnitRunner; | |
| import org.junit.After; | |
| import org.junit.Before; | |
| import org.junit.Test; | |
| import org.junit.runner.RunWith; |
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
| time cost: 6905ms | |
| { | |
| AdjacentStrings: 64 | |
| Annotation: 408 | |
| ArgumentList: 13635 | |
| AsExpression: 142 | |
| AssertStatement: 90 | |
| AssignmentExpression: 2390 | |
| BinaryExpression: 3989 | |
| Block: 4737 |
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
| class A extends B { | |
| A(); | |
| factory A.x() => new A(); | |
| factory A.y() = A.x; | |
| } |
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
| time cost: 6509ms | |
| { | |
| CompilationUnit: 278, | |
| ImportDirective: 940, | |
| SimpleStringLiteral: 6238, | |
| SimpleIdentifier: 90616, | |
| FunctionDeclaration: 1006, | |
| TypeName: 19521, | |
| FunctionExpression: 3160, | |
| FormalParameterList: 5409, |
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
| 乾豆類: 11 | |
| 亞洲棕櫚: 3 | |
| 亞麻: 5 | |
| 亞麻園: 2 | |
| 仙草: 10 | |
| 休閒地: 1 | |
| 倉庫: 2 | |
| 冬瓜: 3 | |
| 刺桐屬植物: 2 | |
| 包葉菜類: 30 |
NewerOlder