function spec(form, {gen} = {}) { const lookup = [ [_.isArray, createArraySpec], [_.isPlainObject, createObjectSpec], [_.isString, getSpec], [_.isSymbol, getSpec], [_.isFunction, createFunctionSpec]]; const [, action] = _.find(lookup, ([match]) => match(form)); return action(form, gen); }
function getSpec(p) { if (_.isString(p) || _.isSymbol(p)) { return defs[p]; } else if (_.isObject(p) && !_.isArray(p)) { return p; } else { return undefined; } }
} else if (_.isUndefined(val)) { type += `undefined`; } else if (_.isSymbol(val)) { type += `symbol`; } else if (_.isFunction(val)) {
if (RESULT && _.isSymbol(RESULT['__httpresponse_tm_19790905'])) { const WEB_VIEW = new ego_http.HttpResponseWebView(RESULT); } else if (RESULT && _.isSymbol(RESULT['__markdown_tm_19790905'])) { const WEB_VIEW = new ego_markdown.MarkdownWebView({ fullWidth: ego_helpers.toBooleanSafe(RESULT.fullWidth), } else if (RESULT && _.isSymbol(RESULT['__neweditor_tm_19790905'])) { const DOC = await vscode.workspace.openTextDocument({ content: RESULT.text, DOC, RESULT.column, ); } else if (RESULT && _.isSymbol(RESULT['__map_tm_19790905'])) { await ego_geo.openMapView( context, } else if (RESULT && _.isSymbol(RESULT['__csv_tm_19790905'])) { const WEB_VIEW = new ego_data.CsvTableWebView( RESULT.data, } else if (RESULT && _.isSymbol(RESULT['__clipboard_tm_19790905'])) { await vscode.env.clipboard.writeText( ego_helpers.toStringSafe( 'Value has been copied to clipboard.' ); } else if (RESULT && _.isSymbol(RESULT['__georoute_tm_19790905'])) { let md = `# Geo Route\n\n`;