text stringlengths 1 2.83M | id stringlengths 16 152 | metadata dict | __index_level_0__ int64 0 949 |
|---|---|---|---|
const REGEXP_WHITESPACE = /\s/;
function getDynamicImportStartAndEnd(str: string, codeStart: number) {
let start = -1;
let end = -1;
for (let i = 0; i < str.length; i += 1) {
const isWhitespace = REGEXP_WHITESPACE.test(str[i]);
if (start === -1) {
if (!isWhitespace) {
start = i;
}
... | modernweb-dev/web/packages/dev-server-core/src/plugins/parseDynamicImport.ts/0 | {
"file_path": "modernweb-dev/web/packages/dev-server-core/src/plugins/parseDynamicImport.ts",
"repo_id": "modernweb-dev",
"token_count": 594
} | 180 |
<p>Hello world</p>
| modernweb-dev/web/packages/dev-server-core/test/fixtures/basic/html-fragment-b.html/0 | {
"file_path": "modernweb-dev/web/packages/dev-server-core/test/fixtures/basic/html-fragment-b.html",
"repo_id": "modernweb-dev",
"token_count": 9
} | 181 |
import { expect } from 'chai';
import path from 'path';
import { createTestServer } from '../helpers.js';
describe('serveFilesMiddleware', () => {
it('can serve files outside of the root directory', async () => {
const { host, server } = await createTestServer({
plugins: [{ name: 'test' }],
rootDir:... | modernweb-dev/web/packages/dev-server-core/test/middleware/serveFilesMiddleware.test.ts/0 | {
"file_path": "modernweb-dev/web/packages/dev-server-core/test/middleware/serveFilesMiddleware.test.ts",
"repo_id": "modernweb-dev",
"token_count": 323
} | 182 |
{
"name": "dev-server-esbuild-demo",
"version": "1.0.0",
"license": "ISC",
"scripts": {
"start": "wds --node-resolve --open --watch"
},
"devDependencies": {
"@web/dev-server": "^0.1.30"
}
}
| modernweb-dev/web/packages/dev-server-esbuild/demo/ts/package.json/0 | {
"file_path": "modernweb-dev/web/packages/dev-server-esbuild/demo/ts/package.json",
"repo_id": "modernweb-dev",
"token_count": 100
} | 183 |
/**
* Based on: https://github.com/Polymer/lit-element/pull/802
*/
const implMap = new Map();
function isHotReloadableElementClass(maybe) {
return 'hotReplaceCallback' in maybe;
}
const originalDefine = customElements.define;
function hotDefine(tagname, classObj) {
if (!('hotReplaceCallback' in classObj)) {
... | modernweb-dev/web/packages/dev-server-hmr/demo/lit-html/hot-elements/patch-custom-element.js/0 | {
"file_path": "modernweb-dev/web/packages/dev-server-hmr/demo/lit-html/hot-elements/patch-custom-element.js",
"repo_id": "modernweb-dev",
"token_count": 218
} | 184 |
export { hmrPlugin } from './hmrPluginFactory.js';
| modernweb-dev/web/packages/dev-server-hmr/src/index.ts/0 | {
"file_path": "modernweb-dev/web/packages/dev-server-hmr/src/index.ts",
"repo_id": "modernweb-dev",
"token_count": 17
} | 185 |
<html>
<head>
<script type="importmap">
{
"imports": {
"../src/postData.js": "./mocks/postData.js"
}
}
</script>
</head>
<body>
<script type="module">
import { runTests } from '@web/test-runner-mocha';
import { expect } from '@esm-bundle/chai';
... | modernweb-dev/web/packages/dev-server-import-maps/test-browser/test/import-map-a.test.html/0 | {
"file_path": "modernweb-dev/web/packages/dev-server-import-maps/test-browser/test/import-map-a.test.html",
"repo_id": "modernweb-dev",
"token_count": 683
} | 186 |
import { transformAsync, TransformOptions } from '@babel/core';
export const es5Config: TransformOptions = {
caller: {
name: '@web/dev-server-legacy',
supportsStaticESM: true,
},
sourceType: 'module',
babelrc: false,
configFile: false,
presets: [
[
require.resolve('@babel/preset-env'),
... | modernweb-dev/web/packages/dev-server-legacy/src/babelTransform.ts/0 | {
"file_path": "modernweb-dev/web/packages/dev-server-legacy/src/babelTransform.ts",
"repo_id": "modernweb-dev",
"token_count": 665
} | 187 |
'use strict';
exports.__esModule = true;
exports.default = void 0;
var _default = 'bar';
exports.default = _default;
| modernweb-dev/web/packages/dev-server-rollup/test/node/fixtures/commonjs/modules/compiled-esm-default-exports.js/0 | {
"file_path": "modernweb-dev/web/packages/dev-server-rollup/test/node/fixtures/commonjs/modules/compiled-esm-default-exports.js",
"repo_id": "modernweb-dev",
"token_count": 42
} | 188 |
{
"name": "module-a"
} | modernweb-dev/web/packages/dev-server-rollup/test/node/fixtures/resolve-outside-dir/node_modules/module-a/package.json/0 | {
"file_path": "modernweb-dev/web/packages/dev-server-rollup/test/node/fixtures/resolve-outside-dir/node_modules/module-a/package.json",
"repo_id": "modernweb-dev",
"token_count": 13
} | 189 |
declare module '@rollup/plugin-url' {
import { Plugin } from 'rollup';
export default function rollupPluginUrl(options?: any): Plugin;
}
| modernweb-dev/web/packages/dev-server-rollup/types/rollup__plugin-url/index.d.ts/0 | {
"file_path": "modernweb-dev/web/packages/dev-server-rollup/types/rollup__plugin-url/index.d.ts",
"repo_id": "modernweb-dev",
"token_count": 43
} | 190 |
```js script
import { Button } from '../src/Button.js';
export default {
title: 'MDJS Docs/Button',
component: 'my-button',
};
const Template = args => Button(args);
```
# Button
This is a demo showing the button component
```js preview-story
export const Primary = Template.bind({});
Primary.args = { primary: ... | modernweb-dev/web/packages/dev-server-storybook/demo/wc/stories/Button-mdx-docs.stories.md/0 | {
"file_path": "modernweb-dev/web/packages/dev-server-storybook/demo/wc/stories/Button-mdx-docs.stories.md",
"repo_id": "modernweb-dev",
"token_count": 277
} | 191 |
import path from 'path';
import fs from 'fs';
import { pathToFileURL } from 'url';
import { StorybookPluginConfig } from './StorybookPluginConfig.js';
import { createError } from '../utils.js';
import { MainJs, StorybookConfig } from './StorybookConfig.js';
const defaultConfigDir = path.join(process.cwd(), '.storyboo... | modernweb-dev/web/packages/dev-server-storybook/src/shared/config/readStorybookConfig.ts/0 | {
"file_path": "modernweb-dev/web/packages/dev-server-storybook/src/shared/config/readStorybookConfig.ts",
"repo_id": "modernweb-dev",
"token_count": 974
} | 192 |
/* eslint-disable */
export const foo = () => 'module b foo';
console.log('module b');
window.__moduleBLoaded = true;
| modernweb-dev/web/packages/dev-server/demo/base-path/module-b.js/0 | {
"file_path": "modernweb-dev/web/packages/dev-server/demo/base-path/module-b.js",
"repo_id": "modernweb-dev",
"token_count": 40
} | 193 |
import { html, render } from 'lit-html';
window.__extensionPriority = true; | modernweb-dev/web/packages/dev-server/demo/node-resolve/extension-priority.mjs/0 | {
"file_path": "modernweb-dev/web/packages/dev-server/demo/node-resolve/extension-priority.mjs",
"repo_id": "modernweb-dev",
"token_count": 24
} | 194 |
console.log(
'dynamically importing stage 3 features, these should throw errors on browsers that dont support them but it should not crash babel parsing',
);
import('./stage-3-class-fields.js');
import('./stage-3-private-class-fields.js');
| modernweb-dev/web/packages/dev-server/demo/syntax/stage-3-features.js/0 | {
"file_path": "modernweb-dev/web/packages/dev-server/demo/syntax/stage-3-features.js",
"repo_id": "modernweb-dev",
"token_count": 70
} | 195 |
import { DevServerConfig } from '../config/DevServerConfig';
import { Logger } from '@web/dev-server-core';
import ip from 'ip';
import { bold, cyan, white } from 'nanocolors';
const createAddress = (config: DevServerConfig, host: string, path: string) =>
`http${config.http2 ? 's' : ''}://${host}:${config.port}${pat... | modernweb-dev/web/packages/dev-server/src/logger/logStartMessage.ts/0 | {
"file_path": "modernweb-dev/web/packages/dev-server/src/logger/logStartMessage.ts",
"repo_id": "modernweb-dev",
"token_count": 425
} | 196 |
const VERSION = Symbol.for('msw-integration-layer::version');
/**
* This wrapper was made to be forward/backward compatible with potential future versions
* of the underlying mocking library. It's api should not change, it should not have dependencies,
* and it's import should be pure and non-sideeffectful.
*/
exp... | modernweb-dev/web/packages/mocks/http.js/0 | {
"file_path": "modernweb-dev/web/packages/mocks/http.js",
"repo_id": "modernweb-dev",
"token_count": 744
} | 197 |
export interface Mock {
method: string;
endpoint: string;
handler: handler;
[key: symbol]: string;
}
export type handler = ({
request,
cookies,
params,
}: {
request: Request;
cookies: Record<string, unknown>;
params: Record<string, unknown>;
}) => Response | Promise<Response>;
| modernweb-dev/web/packages/mocks/types.ts/0 | {
"file_path": "modernweb-dev/web/packages/mocks/types.ts",
"repo_id": "modernweb-dev",
"token_count": 94
} | 198 |
import {
PolyfillsLoaderConfig,
File,
GeneratedFile,
PolyfillFile,
PolyfillsLoader,
LegacyEntrypoint,
} from './types.js';
import { transformAsync } from '@babel/core';
import { minify } from 'terser';
import { fileTypes, hasFileOfType, cleanImportPath } from './utils.js';
import { createPolyfillsData } fr... | modernweb-dev/web/packages/polyfills-loader/src/createPolyfillsLoader.ts/0 | {
"file_path": "modernweb-dev/web/packages/polyfills-loader/src/createPolyfillsLoader.ts",
"repo_id": "modernweb-dev",
"token_count": 2852
} | 199 |
(function () {
function loadScript(src, type, attributes) {
return new Promise(function (resolve) {
var script = document.createElement('script');
script.fetchPriority = 'high';
function onLoaded() {
if (script.parentElement) {
script.parentElement.removeChild(script);
... | modernweb-dev/web/packages/polyfills-loader/test/snapshots/createPolyfillsLoader/module-resources.js/0 | {
"file_path": "modernweb-dev/web/packages/polyfills-loader/test/snapshots/createPolyfillsLoader/module-resources.js",
"repo_id": "modernweb-dev",
"token_count": 591
} | 200 |
<html><head>
<script type="importmap">{ "imports": { "foo": "bar" } }</script>
</head>
<body><div>before</div>
<script type="module" src="./module-a.js"></script>
<div>after</div>
<script>(function () {
function loadScript(src, type, attributes) {
return new Promise(function (r... | modernweb-dev/web/packages/polyfills-loader/test/snapshots/injectPolyfillsLoader/no-importmap-polyfill.html/0 | {
"file_path": "modernweb-dev/web/packages/polyfills-loader/test/snapshots/injectPolyfillsLoader/no-importmap-polyfill.html",
"repo_id": "modernweb-dev",
"token_count": 473
} | 201 |
export function mySubFunction() {
return 'mySubFunction';
}
| modernweb-dev/web/packages/rollup-plugin-copy/test/fixture/sub/mySubFunction.js/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-copy/test/fixture/sub/mySubFunction.js",
"repo_id": "modernweb-dev",
"token_count": 18
} | 202 |
import './shared.js';
console.log('page-c.js');
| modernweb-dev/web/packages/rollup-plugin-html/demo/mpa/pages/page-c.js/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-html/demo/mpa/pages/page-c.js",
"repo_id": "modernweb-dev",
"token_count": 20
} | 203 |
import { ScriptModuleTag } from '../RollupPluginHTMLOptions';
export interface InputAsset {
filePath: string;
hashed: boolean;
content: Buffer;
}
export interface InputData {
html: string;
name: string;
moduleImports: ScriptModuleTag[];
inlineModules: ScriptModuleTag[];
assets: InputAsset[];
filePat... | modernweb-dev/web/packages/rollup-plugin-html/src/input/InputData.ts/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-html/src/input/InputData.ts",
"repo_id": "modernweb-dev",
"token_count": 103
} | 204 |
import './modules/module-c.js';
console.log('entrypoint-c.js');
| modernweb-dev/web/packages/rollup-plugin-html/test/fixtures/rollup-plugin-html/entrypoint-c.js/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-html/test/fixtures/rollup-plugin-html/entrypoint-c.js",
"repo_id": "modernweb-dev",
"token_count": 25
} | 205 |
<html>
<body>
<p>page-c.html</p>
<script type="module" src="./page-c.js"></script>
<script type="module" src="./shared.js"></script>
</body>
</html>
| modernweb-dev/web/packages/rollup-plugin-html/test/fixtures/rollup-plugin-html/pages/page-c.html/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-html/test/fixtures/rollup-plugin-html/pages/page-c.html",
"repo_id": "modernweb-dev",
"token_count": 75
} | 206 |
# @web/rollup-plugin-import-meta-assets
## 2.2.1
### Patch Changes
- 1c0088de: Update Rollup to version 4.
## 2.2.0
### Minor Changes
- c185cbaa: Set minimum node version to 18
## 2.1.0
### Minor Changes
- a8039a46: Enabled using dynamic import vars when importing assets
## 2.0.2
### Patch Changes
- db02e2d... | modernweb-dev/web/packages/rollup-plugin-import-meta-assets/CHANGELOG.md/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-import-meta-assets/CHANGELOG.md",
"repo_id": "modernweb-dev",
"token_count": 529
} | 207 |
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<rect x="10" y="10" height="100" width="100"
style="stroke:#000000; fill: #ff0000"/>
</svg>
| modernweb-dev/web/packages/rollup-plugin-import-meta-assets/test/fixtures/one.svg/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-import-meta-assets/test/fixtures/one.svg",
"repo_id": "modernweb-dev",
"token_count": 97
} | 208 |
const nameOne = 'one-name';
const imageOne = new URL(new URL('assets/one-deep-ZInu4dBJ.svg', import.meta.url).href, import.meta.url).href;
const nameTwo = 'two-name';
const imageTwo = new URL(new URL('assets/two-deep--yckvrYd.svg', import.meta.url).href, import.meta.url).href;
const nameThree = 'three-name';
const im... | modernweb-dev/web/packages/rollup-plugin-import-meta-assets/test/snapshots/different-asset-levels-bundle.js/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-import-meta-assets/test/snapshots/different-asset-levels-bundle.js",
"repo_id": "modernweb-dev",
"token_count": 256
} | 209 |
const justUrlObject = new URL(new URL('assets/one-PkYUFgN1.svg', import.meta.url).href, import.meta.url);
const href = new URL(new URL('assets/two-mXcSFMIh.svg', import.meta.url).href, import.meta.url).href;
const pathname = new URL(new URL('assets/three-LRYckR_0.svg', import.meta.url).href, import.meta.url).pathname;
... | modernweb-dev/web/packages/rollup-plugin-import-meta-assets/test/snapshots/transform-bundle-ignored.js/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-import-meta-assets/test/snapshots/transform-bundle-ignored.js",
"repo_id": "modernweb-dev",
"token_count": 223
} | 210 |
import './shared.js';
| modernweb-dev/web/packages/rollup-plugin-polyfills-loader/test/fixtures/entrypoint-a.js/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-polyfills-loader/test/fixtures/entrypoint-a.js",
"repo_id": "modernweb-dev",
"token_count": 8
} | 211 |
<html><head>
<link rel="preload" href="./entrypoint-b.js" as="script" />
<link rel="preload" href="./entrypoint-a.js" as="script" />
</head><body><script>(function () {
function loadScript(src, type, attributes) {
return new Promise(function (resolve) {
var script = document.createElement('scri... | modernweb-dev/web/packages/rollup-plugin-polyfills-loader/test/snapshots/systemjs.html/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-polyfills-loader/test/snapshots/systemjs.html",
"repo_id": "modernweb-dev",
"token_count": 627
} | 212 |
{
"compilerOptions": {
"lib": ["webworker"]
},
"exclude": ["dist", "demo"]
} | modernweb-dev/web/packages/rollup-plugin-workbox/tsconfig.override.json/0 | {
"file_path": "modernweb-dev/web/packages/rollup-plugin-workbox/tsconfig.override.json",
"repo_id": "modernweb-dev",
"token_count": 38
} | 213 |
import { stringifyProcessEnvs } from '@storybook/core-common';
import { build } from 'esbuild';
import { join } from 'path';
import type { Plugin } from 'rollup';
import { esbuildPluginCommonjsNamedExports } from './esbuild-plugin-commonjs-named-exports.js';
import { getNodeModuleDir } from './get-node-module-dir.js';
... | modernweb-dev/web/packages/storybook-builder/src/rollup-plugin-prebundle-modules.ts/0 | {
"file_path": "modernweb-dev/web/packages/storybook-builder/src/rollup-plugin-prebundle-modules.ts",
"repo_id": "modernweb-dev",
"token_count": 1625
} | 214 |
// this file is autogenerated with the generate-mjs-dts-entrypoints script
import cjsEntrypoint from './dist/preset.js';
const { core } = cjsEntrypoint;
export { core };
| modernweb-dev/web/packages/storybook-framework-web-components/preset.mjs/0 | {
"file_path": "modernweb-dev/web/packages/storybook-framework-web-components/preset.mjs",
"repo_id": "modernweb-dev",
"token_count": 56
} | 215 |
// Don't edit this file directly. It is generated by generate-ts-configs script
{
"extends": "../../tsconfig.browser-base.json",
"compilerOptions": {
"module": "ESNext",
"outDir": "./dist",
"rootDir": "./src",
"composite": true,
"allowJs": true,
"checkJs": true,
"emitDeclarationOnly": t... | modernweb-dev/web/packages/storybook-utils/tsconfig.json/0 | {
"file_path": "modernweb-dev/web/packages/storybook-utils/tsconfig.json",
"repo_id": "modernweb-dev",
"token_count": 195
} | 216 |
import { Page, JSCoverageEntry } from 'puppeteer-core';
import { TestRunnerCoreConfig } from '@web/test-runner-core';
import { v8ToIstanbul } from '@web/test-runner-coverage-v8';
import { SessionResult } from '@web/test-runner-core';
import { Mutex } from 'async-mutex';
const mutex = new Mutex();
declare global {
i... | modernweb-dev/web/packages/test-runner-chrome/src/ChromeLauncherPage.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-chrome/src/ChromeLauncherPage.ts",
"repo_id": "modernweb-dev",
"token_count": 1882
} | 217 |
# Test Runner Commands
Commands for executing code server-side during your tests in the browser. To control the browser page, access the file system, or execute NodeJS libraries.
Built-in commands can change the viewport, emulate media queries or set the user agent. You can create custom commands to implement your ow... | modernweb-dev/web/packages/test-runner-commands/README.md/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-commands/README.md",
"repo_id": "modernweb-dev",
"token_count": 100
} | 218 |
import { TestRunnerPlugin } from '@web/test-runner-core';
import type { ChromeLauncher } from '@web/test-runner-chrome';
import type { PlaywrightLauncher } from '@web/test-runner-playwright';
export interface Viewport {
width: number;
height: number;
// puppeteer only
deviceScaleFactor?: number;
isLandscape... | modernweb-dev/web/packages/test-runner-commands/src/setViewportPlugin.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-commands/src/setViewportPlugin.ts",
"repo_id": "modernweb-dev",
"token_count": 721
} | 219 |
import path from 'path';
import { runTests } from '@web/test-runner-core/test-helpers';
import { chromeLauncher } from '@web/test-runner-chrome';
import { playwrightLauncher } from '@web/test-runner-playwright';
import { selectOptionPlugin } from '../../src/selectOptionPlugin.js';
describe('selectOptionPlugin', funct... | modernweb-dev/web/packages/test-runner-commands/test/select-option/selectOptionPlugin.test.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-commands/test/select-option/selectOptionPlugin.test.ts",
"repo_id": "modernweb-dev",
"token_count": 351
} | 220 |
# @web/test-runner-core
## 0.13.1
### Patch Changes
- e657791f: Vulnerability fix in `ip` package.
For more info, see:
- https://github.com/advisories/GHSA-78xj-cgh5-2h22
- https://github.com/indutny/node-ip/issues/136#issuecomment-1952083593
## 0.13.0
### Minor Changes
- c185cbaa: Set minimum node version... | modernweb-dev/web/packages/test-runner-core/CHANGELOG.md/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-core/CHANGELOG.md",
"repo_id": "modernweb-dev",
"token_count": 6367
} | 221 |
import reports from 'istanbul-reports';
import libReport from 'istanbul-lib-report';
import { CoverageConfig } from '../config/TestRunnerCoreConfig';
import { TestCoverage } from '../coverage/getTestCoverage';
export function writeCoverageReport(testCoverage: TestCoverage, config: CoverageConfig) {
// create a cont... | modernweb-dev/web/packages/test-runner-core/src/cli/writeCoverageReport.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-core/src/cli/writeCoverageReport.ts",
"repo_id": "modernweb-dev",
"token_count": 289
} | 222 |
import { Middleware } from '@web/dev-server-core';
import path from 'path';
export function cacheMiddleware(cachedPatterns: string[], watch: boolean): Middleware {
return async (context, next) => {
await next();
if (
path.extname(context.path) &&
(!watch || cachedPatterns.some(pattern => context... | modernweb-dev/web/packages/test-runner-core/src/server/middleware/cacheMiddleware.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-core/src/server/middleware/cacheMiddleware.ts",
"repo_id": "modernweb-dev",
"token_count": 155
} | 223 |
import { BrowserLauncher } from '../browser-launcher/BrowserLauncher';
import { TestRunnerCoreConfig } from '../config/TestRunnerCoreConfig';
import { TestRunnerGroupConfig } from '../config/TestRunnerGroupConfig';
export interface TestSessionGroup {
name: string;
testFiles: string[];
browsers: BrowserLauncher[]... | modernweb-dev/web/packages/test-runner-core/src/test-session/TestSessionGroup.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-core/src/test-session/TestSessionGroup.ts",
"repo_id": "modernweb-dev",
"token_count": 143
} | 224 |
# Test Runner Mocha
Test framework implementation of [Mocha](https://mochajs.org/) for web test runner.
See [our website](https://modern-web.dev/docs/test-runner/test-frameworks/mocha/) for full documentation.
| modernweb-dev/web/packages/test-runner-mocha/README.md/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-mocha/README.md",
"repo_id": "modernweb-dev",
"token_count": 65
} | 225 |
/**
* Import a mockable version of a module to change its implementation.
* @param {string} moduleSpecifier The specifier of the module. Bare module specifiers and server relative specifiers are supported. Regular relative paths are not supported
* @returns {Promise<Record<string, func> | void >} Object with reassig... | modernweb-dev/web/packages/test-runner-module-mocking/browser/index.d.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-module-mocking/browser/index.d.ts",
"repo_id": "modernweb-dev",
"token_count": 149
} | 226 |
import { getCurrentHour } from './time-library.js';
export function getTimeOfDay() {
const hour = getCurrentHour();
if (hour < 6 || hour > 18) {
return 'night';
}
return 'day';
}
| modernweb-dev/web/packages/test-runner-module-mocking/test/fixtures/server-relative/fixture/getTimeOfDay.js/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-module-mocking/test/fixtures/server-relative/fixture/getTimeOfDay.js",
"repo_id": "modernweb-dev",
"token_count": 67
} | 227 |
# Test runner selenium
Run tests using [selenium-webdriver](https://www.npmjs.com/package/selenium-webdriver).
See [our website](https://modern-web.dev/docs/test-runner/browser-launchers/selenium/) for full documentation.
| modernweb-dev/web/packages/test-runner-selenium/README.md/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-selenium/README.md",
"repo_id": "modernweb-dev",
"token_count": 70
} | 228 |
// this file is autogenerated with the generate-mjs-dts-entrypoints script
import cjsEntrypoint from './dist/index.js';
const { visualRegressionPlugin } = cjsEntrypoint;
export { visualRegressionPlugin };
| modernweb-dev/web/packages/test-runner-visual-regression/plugin.mjs/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-visual-regression/plugin.mjs",
"repo_id": "modernweb-dev",
"token_count": 61
} | 229 |
import path from 'path';
import { runTests } from '@web/test-runner-core/test-helpers';
import { expect } from 'chai';
import { chromeLauncher } from '@web/test-runner-chrome';
import { visualRegressionPlugin } from '../src/visualRegressionPlugin.js';
import { fileExists } from '../src/fs.js';
import { playwrightLaunc... | modernweb-dev/web/packages/test-runner-visual-regression/test/visualRegressionPlugin.test.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner-visual-regression/test/visualRegressionPlugin.test.ts",
"repo_id": "modernweb-dev",
"token_count": 1388
} | 230 |
import { fromRollup } from '@web/dev-server-rollup';
import * as babelModule from '@rollup/plugin-babel';
const babel = fromRollup(babelModule.babel);
export default /** @type {import('@web/test-runner').TestRunnerConfig} */ ({
nodeResolve: true,
files: ['demo/coverage-babel/test/**/*.test.js'],
coverage: true,... | modernweb-dev/web/packages/test-runner/demo/coverage-babel/config.mjs/0 | {
"file_path": "modernweb-dev/web/packages/test-runner/demo/coverage-babel/config.mjs",
"repo_id": "modernweb-dev",
"token_count": 228
} | 231 |
export function a() {
throw new Error('error thrown in a.js')
} | modernweb-dev/web/packages/test-runner/demo/source-maps/bundled/src/a.js/0 | {
"file_path": "modernweb-dev/web/packages/test-runner/demo/source-maps/bundled/src/a.js",
"repo_id": "modernweb-dev",
"token_count": 20
} | 232 |
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(gene... | modernweb-dev/web/packages/test-runner/demo/source-maps/virtual/virtual-files/MyClass.js/0 | {
"file_path": "modernweb-dev/web/packages/test-runner/demo/source-maps/virtual/virtual-files/MyClass.js",
"repo_id": "modernweb-dev",
"token_count": 1600
} | 233 |
import { expect } from './chai.js';
import './fail-error-module-exec.js';
it('test 1', () => {
expect(true).to.be.true;
});
| modernweb-dev/web/packages/test-runner/demo/test/fail-error-module-exec.test.js/0 | {
"file_path": "modernweb-dev/web/packages/test-runner/demo/test/fail-error-module-exec.test.js",
"repo_id": "modernweb-dev",
"token_count": 51
} | 234 |
export default {
name: 'group-b',
files: 'b.test.js',
};
| modernweb-dev/web/packages/test-runner/demo/test/groups/b.test.config.mjs/0 | {
"file_path": "modernweb-dev/web/packages/test-runner/demo/test/groups/b.test.config.mjs",
"repo_id": "modernweb-dev",
"token_count": 26
} | 235 |
module.exports = {
rootDir: '../..',
files: ['demo/test/mocha-options/a.test.js'],
testFramework: {
config: { ui: 'tdd' },
},
};
| modernweb-dev/web/packages/test-runner/demo/test/mocha-options/config.js/0 | {
"file_path": "modernweb-dev/web/packages/test-runner/demo/test/mocha-options/config.js",
"repo_id": "modernweb-dev",
"token_count": 66
} | 236 |
import { expect } from './chai.js';
it('test 404 request', async () => {
try {
await fetch('/non-existing.png');
} catch {}
expect(true).to.be.true;
});
| modernweb-dev/web/packages/test-runner/demo/test/pass-404-request.test.js/0 | {
"file_path": "modernweb-dev/web/packages/test-runner/demo/test/pass-404-request.test.js",
"repo_id": "modernweb-dev",
"token_count": 62
} | 237 |
import './shared-a.js';
for (let i = 0; i < 5; i += 1) {
it(`test ${i}`, async () => {
// await new Promise((r) => setTimeout(r, Math.floor(Math.random() * 200) + 200));
});
}
| modernweb-dev/web/packages/test-runner/demo/test/pass-slow.test.js/0 | {
"file_path": "modernweb-dev/web/packages/test-runner/demo/test/pass-slow.test.js",
"repo_id": "modernweb-dev",
"token_count": 78
} | 238 |
export { expect } from '@esm-bundle/chai';
//# sourceMappingURL=chai.js.map | modernweb-dev/web/packages/test-runner/demo/tsc/dist/test/chai.js/0 | {
"file_path": "modernweb-dev/web/packages/test-runner/demo/tsc/dist/test/chai.js",
"repo_id": "modernweb-dev",
"token_count": 29
} | 239 |
import './shared-a.js';
| modernweb-dev/web/packages/test-runner/demo/tsc/dist/test/pass-18.test.d.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner/demo/tsc/dist/test/pass-18.test.d.ts",
"repo_id": "modernweb-dev",
"token_count": 10
} | 240 |
{
"compilerOptions": {
"target": "es2018",
"module": "esnext",
"moduleResolution": "node",
"noEmitOnError": true,
"lib": ["es2017", "dom"],
"strict": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"experimentalDecorators": true,
"importHelpers": true,
... | modernweb-dev/web/packages/test-runner/demo/tsc/tsconfig.json/0 | {
"file_path": "modernweb-dev/web/packages/test-runner/demo/tsc/tsconfig.json",
"repo_id": "modernweb-dev",
"token_count": 210
} | 241 |
import type { Reporter, ReporterArgs, TestSuiteResult } from '@web/test-runner-core';
import { reportTestsErrors } from './reportTestsErrors.js';
import { reportTestFileErrors } from './reportTestFileErrors.js';
import { TestRunnerLogger } from '../logger/TestRunnerLogger.js';
const color =
([x, y]: [number, numbe... | modernweb-dev/web/packages/test-runner/src/reporter/dotReporter.ts/0 | {
"file_path": "modernweb-dev/web/packages/test-runner/src/reporter/dotReporter.ts",
"repo_id": "modernweb-dev",
"token_count": 718
} | 242 |
// Don't edit this file directly. It is generated by generate-ts-configs script
{
"extends": "../../tsconfig.node-base.json",
"compilerOptions": {
"module": "commonjs",
"outDir": "./dist",
"rootDir": "./src",
"composite": true,
"allowJs": true
},
"references": [
{
"path": "../pars... | modernweb-dev/web/packages/test-runner/tsconfig.json/0 | {
"file_path": "modernweb-dev/web/packages/test-runner/tsconfig.json",
"repo_id": "modernweb-dev",
"token_count": 727
} | 243 |
<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
<path fill="#006a4e" d="M0 0h640v480H0z"/>
<circle cx="280" cy="240" r="160" fill="#f42a41"/>
</svg>
| odota/web/public/assets/images/flags/bd.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/bd.svg",
"repo_id": "odota",
"token_count": 89
} | 244 |
<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
<g fill-rule="evenodd">
<path fill="#00cbff" d="M0 0h640v480H0z"/>
<path fill="#fff" d="M0 160h640v160H0z"/>
<path fill="#000" d="M0 185.97h640v108.05H0z"/>
</g>
</svg>
| odota/web/public/assets/images/flags/bw.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/bw.svg",
"repo_id": "odota",
"token_count": 133
} | 245 |
<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
<defs>
<clipPath id="a">
<path fill-opacity=".67" d="M-32 0h682.67v512H-32z"/>
</clipPath>
</defs>
<g fill-rule="evenodd" clip-path="url(#a)" transform="translate(30) scale(.94)">
<path fill="#0050f0" d="M-32... | odota/web/public/assets/images/flags/cu.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/cu.svg",
"repo_id": "odota",
"token_count": 344
} | 246 |
<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
<defs>
<clipPath id="a">
<path fill-opacity=".67" d="M-85.333 0h682.67v512h-682.67z"/>
</clipPath>
</defs>
<g clip-path="url(#a)" transform="translate(80) scale(.94)">
<g stroke-width="1pt">
<path fill=... | odota/web/public/assets/images/flags/gb.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/gb.svg",
"repo_id": "odota",
"token_count": 507
} | 247 |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="480" width="640" viewBox="0 0 640 480">
<path fill="#ce1126" d="M0 0h320v480H0z"/>
<path fill="#fcd116" d="M320 0h320v240H320z"/>
<path fill="#009e49" d="M320 240h320v240H320z"/>
<g id="b" transform="matrix(80 0 0 80 160 ... | odota/web/public/assets/images/flags/gw.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/gw.svg",
"repo_id": "odota",
"token_count": 335
} | 248 |
<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
<defs>
<clipPath id="a">
<path fill-opacity=".67" d="M0 0h640v480H0z"/>
</clipPath>
</defs>
<g fill-rule="evenodd" stroke-width="0" clip-path="url(#a)">
<path fill="#003897" d="M0 0h666.67v480H0z"/>
<path... | odota/web/public/assets/images/flags/is.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/is.svg",
"repo_id": "odota",
"token_count": 287
} | 249 |
<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
<g fill-rule="evenodd" stroke-width="1pt">
<path fill="#fff" d="M0 0h640v480H0z"/>
<path fill="#00267f" d="M0 0h213.337v480H0z"/>
<path fill="#f31830" d="M426.662 0H640v480H426.662z"/>
</g>
</svg>
| odota/web/public/assets/images/flags/mf.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/mf.svg",
"repo_id": "odota",
"token_count": 144
} | 250 |
<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
<defs>
<clipPath id="a">
<path fill-opacity=".67" d="M0 0h640v480H0z"/>
</clipPath>
</defs>
<g clip-path="url(#a)">
<path fill="#fff" d="M0 0h640v480H0z"/>
<path fill-rule="evenodd" fill="#fff" d="M92.462... | odota/web/public/assets/images/flags/pa.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/pa.svg",
"repo_id": "odota",
"token_count": 439
} | 251 |
<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
<g fill-rule="evenodd" stroke-width="1pt">
<path fill="#00319c" d="M0 0h213.333v480H0z"/>
<path fill="#ffde00" d="M213.333 0h213.333v480H213.333z"/>
<path fill="#de2110" d="M426.666 0H640v480H426.666z"/>
</g>
</svg>
| odota/web/public/assets/images/flags/ro.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/ro.svg",
"repo_id": "odota",
"token_count": 152
} | 252 |
<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
<g fill-rule="evenodd" stroke-width="1pt">
<path fill="#0b7226" d="M-.006 0h213.328v480H-.006z"/>
<path fill="#ff0" d="M213.322 0H426.65v480H213.322z"/>
<path fill="#bc0000" d="M426.65 0h213.328v480H426.65z"/>
</g>
... | odota/web/public/assets/images/flags/sn.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/sn.svg",
"repo_id": "odota",
"token_count": 240
} | 253 |
<svg xmlns="http://www.w3.org/2000/svg" height="480" width="640" viewBox="0 0 640 480">
<defs>
<clipPath id="a">
<path fill-opacity=".67" d="M0 0h682.67v512H0z"/>
</clipPath>
</defs>
<g clip-path="url(#a)" fill-rule="evenodd" transform="scale(.9375)">
<path fill="#cb000f" d="M0 0h1031.2v512H0z"/... | odota/web/public/assets/images/flags/tl.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/tl.svg",
"repo_id": "odota",
"token_count": 341
} | 254 |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="480" width="640" viewBox="0 0 640 480">
<path fill="#1eb53a" d="M0 320h640v160H0z"/>
<path fill="#0099b5" d="M0 0h640v160H0z"/>
<path fill="#ce1126" d="M0 153.6h640v172.8H0z"/>
<path fill="#fff" d="M0 163.2h640v153.6H0z"/... | odota/web/public/assets/images/flags/uz.svg/0 | {
"file_path": "odota/web/public/assets/images/flags/uz.svg",
"repo_id": "odota",
"token_count": 706
} | 255 |
const TOGGLE_SHOW_FORM = 'form/TOGGLE_SHOW_FORM';
export const formActions = {
TOGGLE_SHOW_FORM,
};
export const toggleShowForm = formName => ({
type: TOGGLE_SHOW_FORM,
formName,
});
| odota/web/src/actions/formActions.js/0 | {
"file_path": "odota/web/src/actions/formActions.js",
"repo_id": "odota",
"token_count": 78
} | 256 |
import React from 'react';
import styled from 'styled-components';
import PropTypes from 'prop-types';
import constants from '../constants';
import { formatSkillOrAttributeValues } from '../../utility';
const Ability = styled.div`
margin-left: 8px;
color: rgb(176, 198, 212);
max-width: 85%;
.ability-text {
... | odota/web/src/components/AghsTooltip/AghsTooltipBody.jsx/0 | {
"file_path": "odota/web/src/components/AghsTooltip/AghsTooltipBody.jsx",
"repo_id": "odota",
"token_count": 1460
} | 257 |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import CircularProgress from 'material-ui/CircularProgress';
import styled from 'styled-components';
import Spinner from '../Spinner';
import Error from '../Error';
import { IconCheese } from '../Icons';
const Progres... | odota/web/src/components/Cheese/CheeseCircle.jsx/0 | {
"file_path": "odota/web/src/components/Cheese/CheeseCircle.jsx",
"repo_id": "odota",
"token_count": 863
} | 258 |
import React from 'react';
import PropTypes from 'prop-types';
import RaisedButton from 'material-ui/RaisedButton';
const ExplorerOutputButton = ({
defaultSelected, label, format, href, download, onClick, context,
}) => {
let clickFn;
if (onClick) {
clickFn = onClick;
} else if (format) {
clickFn = () ... | odota/web/src/components/Explorer/ExplorerOutputButton.jsx/0 | {
"file_path": "odota/web/src/components/Explorer/ExplorerOutputButton.jsx",
"repo_id": "odota",
"token_count": 355
} | 259 |
import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import Clear from 'material-ui/svg-icons/content/clear';
import Filter from 'material-ui/svg-icons/content/filter-list';
import FlatButton from 'material-ui/FlatButton';
import styled from 'styled-components';
import c... | odota/web/src/components/Form/ShowFormToggle.jsx/0 | {
"file_path": "odota/web/src/components/Form/ShowFormToggle.jsx",
"repo_id": "odota",
"token_count": 475
} | 260 |
import React from 'react';
import { shape, bool, node } from 'prop-types';
import styled from 'styled-components';
const Wrapper = styled.span`
background: rgba(0, 0, 0, .05);
display: flex;
flex-direction: row;
align-items: center;
padding: 8px;
&:nth-child(2n) {
background: rgba(0, 0, 0, .15);
}
`... | odota/web/src/components/Hero/Attribute.jsx/0 | {
"file_path": "odota/web/src/components/Hero/Attribute.jsx",
"repo_id": "odota",
"token_count": 210
} | 261 |
import React from 'react';
import styled from 'styled-components';
import nanoid from 'nanoid';
import propTypes from 'prop-types';
import TalentsTooltip from '../TalentsTooltip';
import constants from '../constants';
const Wrapper = styled.div`
background: linear-gradient(to bottom, ${constants.colorBlueMuted}, ${... | odota/web/src/components/Hero/Talents.jsx/0 | {
"file_path": "odota/web/src/components/Hero/Talents.jsx",
"repo_id": "odota",
"token_count": 433
} | 262 |
import React from 'react';
export default props => (
<svg {...props} viewBox="0 0 300 300">
<path
d="M236.2,152.7L166.8,10.5c-6.8-14-26.9-14-33.7,0L76.4,126.7l0,0l-12.6,25.9c-1.6,3.5-3.1,7-4.4,10.6
c-1.1,3-2.1,6.1-3,9.2c-3.2,11.3-4.8,23.1-4.8,34.7c0,1.8,0,3.6,0.1,5.4c0,0.4,0.1,0.8,0.1,1.3c0.1,1.3,0.2... | odota/web/src/components/Icons/BloodDrop.jsx/0 | {
"file_path": "odota/web/src/components/Icons/BloodDrop.jsx",
"repo_id": "odota",
"token_count": 1577
} | 263 |
import React from 'react';
export default props => (
<svg {...props} viewBox="0 0 96 96">
<g>
<path d="M66.3,50.3v-4.6c0-0.6-0.2-1.2-0.7-1.6c-0.5-0.5-1-0.7-1.6-0.7H52.6V32c0-0.6-0.2-1.2-0.7-1.6
c-0.5-0.5-1-0.7-1.6-0.7h-4.6c-0.6,0-1.2,0.2-1.6,0.7c-0.5,0.5-0.7,1-0.7,1.6v11.5H32c-0.6,0-1.2,0.2-1.6,0.7
... | odota/web/src/components/Icons/PlusSquare.jsx/0 | {
"file_path": "odota/web/src/components/Icons/PlusSquare.jsx",
"repo_id": "odota",
"token_count": 669
} | 264 |
export default [
// Radiant
{
id: 't4br',
style: { top: '82%', left: '12%' },
},
{
id: 't4tr',
style: { top: '79%', left: '8%' },
},
{
id: 't3br',
style: { top: '83.5%', left: '23%' },
},
{
id: 't2br',
style: { top: '85%', left: '46%' },
},
{
id: 't1br',
style... | odota/web/src/components/Match/BuildingMap/buildingData733.js/0 | {
"file_path": "odota/web/src/components/Match/BuildingMap/buildingData733.js",
"repo_id": "odota",
"token_count": 1382
} | 265 |
import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ReactTooltip from 'react-tooltip';
import heroes from 'dotaconstants/build/heroes.json';
import styled from 'styled-components';
import {
formatSeconds,
isRadiant,
jsonFn,
getTeamName,
} from '../../../u... | odota/web/src/components/Match/Overview/Timeline.jsx/0 | {
"file_path": "odota/web/src/components/Match/Overview/Timeline.jsx",
"repo_id": "odota",
"token_count": 8806
} | 266 |
import React from 'react';
import PropTypes from 'prop-types';
import heroes from 'dotaconstants/build/heroes.json';
import Heading from '../Heading';
import Table from '../Table';
import TeamfightMap from '../Match/TeamfightMap';
import Purchases from '../Match/Purchases';
import Timeline from '../Match/Overview/Timel... | odota/web/src/components/Match/matchPages.jsx/0 | {
"file_path": "odota/web/src/components/Match/matchPages.jsx",
"repo_id": "odota",
"token_count": 6100
} | 267 |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import ActivityCalendar from './ActivityCalendar';
import { getPlayerMatches } from '../../../../actions';
import Container from '../../../Container';
const defaultOptions = {
limit: null,
};
const Activity = ({
... | odota/web/src/components/Player/Pages/Activity/Activity.jsx/0 | {
"file_path": "odota/web/src/components/Player/Pages/Activity/Activity.jsx",
"repo_id": "odota",
"token_count": 600
} | 268 |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { getPlayerPeers } from '../../../../actions';
import Table from '../../../Table';
import Container from '../../../Container';
import { playerPeersColumns } from './playerPeersColumns';
const Peers = ({
data,... | odota/web/src/components/Player/Pages/Peers/Peers.jsx/0 | {
"file_path": "odota/web/src/components/Player/Pages/Peers/Peers.jsx",
"repo_id": "odota",
"token_count": 593
} | 269 |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import styled from 'styled-components';
import Button from '@material-ui/core/Button';
import LockIcon from '@material-ui/icons/Lock';
import config from '../../../config';
const Styled = styled.div`
text-align: cente... | odota/web/src/components/Player/PlayerProfilePrivate/index.jsx/0 | {
"file_path": "odota/web/src/components/Player/PlayerProfilePrivate/index.jsx",
"repo_id": "odota",
"token_count": 609
} | 270 |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Helmet from 'react-helmet';
import fuzzy from 'fuzzy';
import { withRouter } from 'react-router-dom';
import { getSearchResultAndPros } from '../../actions';
import SearchResult from './SearchResult';
const ext... | odota/web/src/components/Search/Search.jsx/0 | {
"file_path": "odota/web/src/components/Search/Search.jsx",
"repo_id": "odota",
"token_count": 547
} | 271 |
import Spinner from './Spinner';
export default Spinner;
| odota/web/src/components/Spinner/index.js/0 | {
"file_path": "odota/web/src/components/Spinner/index.js",
"repo_id": "odota",
"token_count": 17
} | 272 |
import React from 'react';
import NavigationArrowUpward from 'material-ui/svg-icons/navigation/arrow-upward';
import NavigationArrowDownward from 'material-ui/svg-icons/navigation/arrow-downward';
const getTotalWidth = columns => columns.reduce((prev, current) => prev + current.width, 0);
const getWidthStyle = (colum... | odota/web/src/components/Table/tableHelpers.jsx/0 | {
"file_path": "odota/web/src/components/Table/tableHelpers.jsx",
"repo_id": "odota",
"token_count": 273
} | 273 |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import {
ReferenceArea,
XAxis,
YAxis,
Tooltip,
Line,
LineChart,
CartesianGrid,
ReferenceLine,
Legend,
ResponsiveContainer,
} from 'recharts';
import heroes from 'dotaconstants/build/heroes.json';
im... | odota/web/src/components/Visualizations/Graph/MatchGraph.jsx/0 | {
"file_path": "odota/web/src/components/Visualizations/Graph/MatchGraph.jsx",
"repo_id": "odota",
"token_count": 3841
} | 274 |
export default {
defaultPrimaryColor: 'rgba(0, 0, 0, 0.4)',
defaultPrimaryColorSolid: 'rgba(0, 0, 0, 0.37)',
darkPrimaryColor: 'rgba(0, 0, 0, 0.6)',
almostBlack: 'rgba(0, 0, 0, 0.9)',
colorSuccess: '#66BB6A',
colorDanger: '#ff4c4c',
colorGreen: '#66BB6A',
colorRed: '#ff4c4c',
colorBlue: '#6BF',
colo... | odota/web/src/components/constants.js/0 | {
"file_path": "odota/web/src/components/constants.js",
"repo_id": "odota",
"token_count": 1514
} | 275 |
{
"yes": "Igen",
"no": "Nem",
"abbr_thousand": "k",
"abbr_million": "M",
"abbr_billion": "B",
"abbr_trillion": "T",
"abbr_quadrillion": "Q",
"abbr_not_available": "N/A",
"abbr_pick": "V",
"abbr_win": "NY",
"abbr_number": "No.",
"analysis_eff": "Vonal hatékonyság",
"analysis_farm_drought": "Leg... | odota/web/src/lang/hu-HU.json/0 | {
"file_path": "odota/web/src/lang/hu-HU.json",
"repo_id": "odota",
"token_count": 24953
} | 276 |
{
"yes": "ใช่",
"no": "ไม่",
"abbr_thousand": "k",
"abbr_million": "m",
"abbr_billion": "b",
"abbr_trillion": "t",
"abbr_quadrillion": "q",
"abbr_not_available": "ไม่มี",
"abbr_pick": "เลือก",
"abbr_win": "ชนะ",
"abbr_number": "ลำดับ",
"analysis_eff": "ประสิทธิภาพในเลน",
"analysis_farm_drought... | odota/web/src/lang/th-TH.json/0 | {
"file_path": "odota/web/src/lang/th-TH.json",
"repo_id": "odota",
"token_count": 45435
} | 277 |
import heroes from 'dotaconstants/build/heroes.json';
import itemIds from 'dotaconstants/build/item_ids.json';
import patch from 'dotaconstants/build/patch.json';
import xpLevel from 'dotaconstants/build/xp_level.json';
import curry from 'lodash/fp/curry';
import findLast from 'lodash/fp/findLast';
import inRange from ... | odota/web/src/utility/index.jsx/0 | {
"file_path": "odota/web/src/utility/index.jsx",
"repo_id": "odota",
"token_count": 11628
} | 278 |
[
{
"match_id": 1609407252,
"player_slot": 129,
"radiant_win": false,
"duration": 2402,
"game_mode": 1,
"lobby_type": 0,
"kills": 37,
"hero_id": 44,
"start_time": 1436112424,
"version": null,
"deaths": 4,
"assists": 12,
"skill": null,
"leaver_status": 0,
"party_size": null
},
{
"match... | odota/web/testcafe/cachedAjax/players_101695162_matches_sort=kills&limit=20.json/0 | {
"file_path": "odota/web/testcafe/cachedAjax/players_101695162_matches_sort=kills&limit=20.json",
"repo_id": "odota",
"token_count": 3131
} | 279 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.