repo stringlengths 5 106 | file_url stringlengths 78 301 | file_path stringlengths 4 211 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:56:49 2026-01-05 02:23:25 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/src/map/Map.js | src/map/Map.js | import * as Util from '../core/Util.js';
import {Evented} from '../core/Events.js';
import {EPSG3857} from '../geo/crs/CRS.EPSG3857.js';
import {Point} from '../geometry/Point.js';
import {Bounds} from '../geometry/Bounds.js';
import {LatLng} from '../geo/LatLng.js';
import {LatLngBounds} from '../geo/LatLngBounds.js';... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | true |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/src/map/index.js | src/map/index.js | import {LeafletMap} from './Map.js';
import {BoxZoom} from './handler/Map.BoxZoom.js';
LeafletMap.BoxZoom = BoxZoom;
import {DoubleClickZoom} from './handler/Map.DoubleClickZoom.js';
LeafletMap.DoubleClickZoom = DoubleClickZoom;
import {Drag} from './handler/Map.Drag.js';
LeafletMap.Drag = Drag;
import {Keyboard} from ... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/src/map/handler/Map.ScrollWheelZoom.js | src/map/handler/Map.ScrollWheelZoom.js | import {LeafletMap} from '../Map.js';
import {Handler} from '../../core/Handler.js';
import * as DomEvent from '../../dom/DomEvent.js';
/*
* Handler.ScrollWheelZoom is used by Map to enable mouse scroll wheel zoom on the map.
*/
// @namespace LeafletMap
// @section Interaction Options
LeafletMap.mergeOptions({
// ... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/src/map/handler/Map.Keyboard.js | src/map/handler/Map.Keyboard.js | import {LeafletMap} from '../Map.js';
import {Handler} from '../../core/Handler.js';
import {on, off, stop} from '../../dom/DomEvent.js';
import {Point} from '../../geometry/Point.js';
/*
* Map.Keyboard is handling keyboard interaction with the map, enabled by default.
*/
// @namespace LeafletMap
// @section Keybo... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/src/map/handler/Map.TapHold.js | src/map/handler/Map.TapHold.js | import {LeafletMap} from '../Map.js';
import {Handler} from '../../core/Handler.js';
import * as DomEvent from '../../dom/DomEvent.js';
import {Point} from '../../geometry/Point.js';
import Browser from '../../core/Browser.js';
import * as PointerEvents from '../../dom/DomEvent.PointerEvents.js';
/*
* Map.TapHold is ... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/src/map/handler/Map.Drag.js | src/map/handler/Map.Drag.js | import {LeafletMap} from '../Map.js';
import {Handler} from '../../core/Handler.js';
import {Draggable} from '../../dom/Draggable.js';
import {LatLngBounds} from '../../geo/LatLngBounds.js';
import {Bounds} from '../../geometry/Bounds.js';
/*
* Handler.MapDrag is used to make the map draggable (with panning inertia),... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/src/map/handler/Map.PinchZoom.js | src/map/handler/Map.PinchZoom.js | import {LeafletMap} from '../Map.js';
import {Handler} from '../../core/Handler.js';
import * as DomEvent from '../../dom/DomEvent.js';
import * as PointerEvents from '../../dom/DomEvent.PointerEvents.js';
/*
* Handler.PinchZoom is used by Map to add pinch zoom on supported mobile browsers.
*/
// @namespace Leaflet... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/src/map/handler/Map.BoxZoom.js | src/map/handler/Map.BoxZoom.js | import {LeafletMap} from '../Map.js';
import {Handler} from '../../core/Handler.js';
import * as DomUtil from '../../dom/DomUtil.js';
import * as DomEvent from '../../dom/DomEvent.js';
import {LatLngBounds} from '../../geo/LatLngBounds.js';
import {Bounds} from '../../geometry/Bounds.js';
/*
* Handler.BoxZoom is used... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/src/map/handler/Map.DoubleClickZoom.js | src/map/handler/Map.DoubleClickZoom.js | import {LeafletMap} from '../Map.js';
import {Handler} from '../../core/Handler.js';
/*
* Handler.DoubleClickZoom is used to handle double-click zoom on the map, enabled by default.
*/
// @namespace LeafletMap
// @section Interaction Options
LeafletMap.mergeOptions({
// @option doubleClickZoom: Boolean|String = t... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/src/control/Control.Scale.js | src/control/Control.Scale.js |
import {Control} from './Control.js';
import * as DomUtil from '../dom/DomUtil.js';
/*
* @class Control.Scale
* @inherits Control
*
* A simple scale control that shows the scale of the current center of screen in metric (m/km) and imperial (mi/ft) systems. Extends `Control`.
*
* @example
*
* ```js
* new Cont... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/src/control/index.js | src/control/index.js | import {Control} from './Control.js';
import {Layers} from './Control.Layers.js';
import {Zoom} from './Control.Zoom.js';
import {Scale} from './Control.Scale.js';
import {Attribution} from './Control.Attribution.js';
Control.Layers = Layers;
Control.Zoom = Zoom;
Control.Scale = Scale;
Control.Attribution = Attributio... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/src/control/Control.Layers.js | src/control/Control.Layers.js |
import {Control} from './Control.js';
import * as Util from '../core/Util.js';
import * as DomEvent from '../dom/DomEvent.js';
import * as DomUtil from '../dom/DomUtil.js';
/*
* @class Control.Layers
* @inherits Control
*
* The layers control gives users the ability to switch between different base layers and swi... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/src/control/Control.Attribution.js | src/control/Control.Attribution.js |
import {Control} from './Control.js';
import {LeafletMap} from '../map/Map.js';
import * as Util from '../core/Util.js';
import * as DomEvent from '../dom/DomEvent.js';
import * as DomUtil from '../dom/DomUtil.js';
const ukrainianFlag = '<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8"... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/src/control/Control.js | src/control/Control.js |
import {Class} from '../core/Class.js';
import {LeafletMap} from '../map/Map.js';
import * as Util from '../core/Util.js';
import * as DomUtil from '../dom/DomUtil.js';
/*
* @class Control
* @inherits Class
*
* Control is a base class for implementing map controls. Handles positioning.
* All other controls exten... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/src/control/Control.Zoom.js | src/control/Control.Zoom.js |
import {Control} from './Control.js';
import {LeafletMap} from '../map/Map.js';
import * as DomUtil from '../dom/DomUtil.js';
import * as DomEvent from '../dom/DomEvent.js';
/*
* @class Control.Zoom
* @inherits Control
*
* A basic zoom control with two buttons (zoom in and zoom out). It is put on the map by defau... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/build/rollup-config.js | build/rollup-config.js | import json from '@rollup/plugin-json';
import terser from '@rollup/plugin-terser';
import {readFileSync} from 'node:fs';
import {defineConfig} from 'rollup';
import pkg from '../package.json' with {type: 'json'};
const STATIC_ASSETS = [
'leaflet.css',
'images/logo.svg',
'images/layers.svg',
'images/marker-icon.sv... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/build/docs.js | build/docs.js | import LeafDoc from 'leafdoc';
import {writeFileSync} from 'node:fs';
console.log('Building Leaflet documentation with Leafdoc ...');
const doc = new LeafDoc({
templateDir: 'build/leafdoc-templates',
showInheritancesWhenEmpty: true,
leadingCharacter: '@'
});
// Note to Vladimir: Iván's never gonna uncomment the f... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/build/integrity.js | build/integrity.js | // This script calculates the integrity hashes of the files in dist/ , and
// **overwrites** the values in the documentation.
import {readFileSync, writeFileSync} from 'node:fs';
import https from 'node:https';
import ssri from 'ssri';
import pkg from '../package.json' with {type: 'json'};
const getIntegrity = path =>... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/setup.js | spec/setup.js | import {Icon} from 'leaflet';
Icon.Default.imagePath = '/base/dist/images/';
| javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/ssr/ssr_node.js | spec/ssr/ssr_node.js | import {version} from '../../dist/leaflet-src.js';
console.log(version);
| javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/ssr/ssr_deno.js | spec/ssr/ssr_deno.js | import {version} from '../../dist/leaflet-src.js';
console.log(version);
| javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/SpecHelper.js | spec/suites/SpecHelper.js | import {Assertion, util} from 'chai';
import {LatLng, Point, DomEvent} from 'leaflet';
util.addMethod(Assertion.prototype, 'near', function (expected, delta = 1) {
expected = new Point(expected);
new Assertion(this._obj.x).to.be.within(expected.x - delta, expected.x + delta);
new Assertion(this._obj.y).to.be.withi... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/geo/LatLngBoundsSpec.js | spec/suites/geo/LatLngBoundsSpec.js | import {expect} from 'chai';
import {LatLngBounds, LatLng} from 'leaflet';
describe('LatLngBounds', () => {
let a, c;
beforeEach(() => {
a = new LatLngBounds(
new LatLng(14, 12),
new LatLng(30, 40)
);
c = new LatLngBounds();
});
describe('constructor', () => {
it('instantiates either passing two la... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/geo/LatLngSpec.js | spec/suites/geo/LatLngSpec.js | import {expect} from 'chai';
import {LatLng} from 'leaflet';
describe('LatLng', () => {
describe('constructor', () => {
it('sets lat and lng', () => {
const a = new LatLng(25, 74);
expect(a.lat).to.eql(25);
expect(a.lng).to.eql(74);
const b = new LatLng(-25, -74);
expect(b.lat).to.eql(-25);
expec... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/geo/crs/CRSSpec.js | spec/suites/geo/crs/CRSSpec.js | import {expect} from 'chai';
import {CRS, Util, LatLng, LatLngBounds, Point} from 'leaflet';
import '../../SpecHelper.js';
describe('CRS.EPSG3857', () => {
const crs = CRS.EPSG3857;
describe('#latLngToPoint', () => {
it('projects a center point', () => {
expect(crs.latLngToPoint(new LatLng(0, 0), 0)).near([128... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/geo/projection/ProjectionSpec.js | spec/suites/geo/projection/ProjectionSpec.js | import {expect} from 'chai';
import {Projection, LatLng, Point} from 'leaflet';
import '../../SpecHelper.js';
describe('Projection.Mercator', () => {
const p = Projection.Mercator;
describe('#project', () => {
it('projects a center point', () => {
// edge cases
expect(p.project(new LatLng(0, 0))).near([0, 0... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/geometry/TransformationSpec.js | spec/suites/geometry/TransformationSpec.js | import {expect} from 'chai';
import {Point, Transformation} from 'leaflet';
describe('Transformation', () => {
let t, p;
beforeEach(() => {
t = new Transformation(1, 2, 3, 4);
p = new Point(10, 20);
});
describe('#transform', () => {
it('performs a transformation', () => {
const p2 = t.transform(p, 2);
... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/geometry/BoundsSpec.js | spec/suites/geometry/BoundsSpec.js | import {expect} from 'chai';
import {Bounds, Point} from 'leaflet';
describe('Bounds', () => {
let a, b, c;
beforeEach(() => {
a = new Bounds(
[14, 12], // left, top
[30, 40]); // right, bottom
b = new Bounds([
[20, 12], // center, top
[14, 20], // left, middle
[30, 40] // right, bottom
]);
c... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/geometry/PolyUtilSpec.js | spec/suites/geometry/PolyUtilSpec.js | import {expect} from 'chai';
import {Bounds, LeafletMap, Point, PolyUtil, Polygon} from 'leaflet';
import sinon from 'sinon';
import '../SpecHelper.js';
describe('PolyUtil', () => {
describe('#clipPolygon', () => {
it('clips polygon by bounds', () => {
const bounds = new Bounds([0, 0], [10, 10]);
const point... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/geometry/LineUtilSpec.js | spec/suites/geometry/LineUtilSpec.js | import {expect} from 'chai';
import {Bounds, LineUtil, LeafletMap, LatLng, Point, Polyline} from 'leaflet';
import sinon from 'sinon';
import '../SpecHelper.js';
describe('LineUtil', () => {
describe('#clipSegment', () => {
let bounds;
beforeEach(() => {
bounds = new Bounds([5, 0], [15, 10]);
});
it('cli... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/geometry/PointSpec.js | spec/suites/geometry/PointSpec.js | import {expect} from 'chai';
import {Point} from 'leaflet';
describe('Point', () => {
describe('constructor', () => {
it('creates a point with the given x and y', () => {
const p = new Point(1.5, 2.5);
expect(p.x).to.eql(1.5);
expect(p.y).to.eql(2.5);
});
it('rounds the given x and y if the third argu... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/layer/LayerGroupSpec.js | spec/suites/layer/LayerGroupSpec.js | import {expect} from 'chai';
import {GeoJSON, Layer, Marker, LayerGroup} from 'leaflet';
describe('LayerGroup', () => {
describe('#hasLayer', () => {
it('throws when called without proper argument', () => {
const lg = new LayerGroup();
const hasLayer = lg.hasLayer.bind(lg);
expect(() => hasLayer(new Layer... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/layer/ImageOverlaySpec.js | spec/suites/layer/ImageOverlaySpec.js | import {expect} from 'chai';
import {LatLngBounds, LeafletMap, ImageOverlay} from 'leaflet';
import sinon from 'sinon';
import {createContainer, removeMapContainer} from '../SpecHelper.js';
describe('ImageOverlay', () => {
let container, map;
const imageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]];
be... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/layer/PopupSpec.js | spec/suites/layer/PopupSpec.js | import {expect} from 'chai';
import {DivIcon, DomUtil, FeatureGroup, Icon, LeafletMap, Marker, Point, Polygon, Popup} from 'leaflet';
import Hand from 'prosthetic-hand';
import sinon from 'sinon';
import UIEventSimulator from 'ui-event-simulator';
import {createContainer, removeMapContainer, pointerEventType} from '../... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/layer/GeoJSONSpec.js | spec/suites/layer/GeoJSONSpec.js | import {expect} from 'chai';
import {Circle, CircleMarker, FeatureGroup, GeoJSON, LatLng, Layer, LayerGroup, LeafletMap, Marker, Polygon, Polyline, TileLayer} from 'leaflet';
import {createContainer, removeMapContainer} from '../SpecHelper.js';
describe('GeoJSON', () => {
describe('addData', () => {
const geojson =... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/layer/TooltipSpec.js | spec/suites/layer/TooltipSpec.js | import {expect} from 'chai';
import {CircleMarker, FeatureGroup, LayerGroup, LeafletMap, Marker, Polygon, Polyline, Rectangle, Tooltip} from 'leaflet';
import Hand from 'prosthetic-hand';
import sinon from 'sinon';
import UIEventSimulator from 'ui-event-simulator';
import {createContainer, removeMapContainer} from '../... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/layer/VideoOverlaySpec.js | spec/suites/layer/VideoOverlaySpec.js | import {expect} from 'chai';
import {LatLngBounds, LeafletMap, VideoOverlay} from 'leaflet';
import {createContainer, removeMapContainer} from '../SpecHelper.js';
import Hand from 'prosthetic-hand';
describe('VideoOverlay', () => {
let container, map;
const videoBounds = new LatLngBounds([[32, -130], [13, -100]]);
... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/layer/FeatureGroupSpec.js | spec/suites/layer/FeatureGroupSpec.js | import {expect} from 'chai';
import {Marker, FeatureGroup, LayerGroup, Util} from 'leaflet';
describe('FeatureGroup', () => {
describe('#_propagateEvent', () => {
let marker;
beforeEach(() => {
marker = new Marker([0, 0]);
});
describe('when a Marker is added to multiple FeatureGroups ', () => {
it('... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/layer/marker/Marker.DragSpec.js | spec/suites/layer/marker/Marker.DragSpec.js | import {expect} from 'chai';
import {DomUtil, LeafletMap, Marker, Point} from 'leaflet';
import Hand from 'prosthetic-hand';
import {createContainer, removeMapContainer, pointerEventType} from '../../SpecHelper.js';
describe('Marker.Drag', () => {
let map,
container;
beforeEach(() => {
container = createContaine... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/layer/marker/Icon.DefaultSpec.js | spec/suites/layer/marker/Icon.DefaultSpec.js | import {expect} from 'chai';
import {Icon, LeafletMap, Marker, Browser} from 'leaflet';
import {createContainer, removeMapContainer} from '../../SpecHelper.js';
describe('Icon.Default', () => {
let container, map;
beforeEach(() => {
container = container = createContainer();
map = new LeafletMap(container);
... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/layer/marker/MarkerSpec.js | spec/suites/layer/marker/MarkerSpec.js | import {expect} from 'chai';
import {DivIcon, Icon, LatLng, LeafletMap, Marker, Point} from 'leaflet';
import sinon from 'sinon';
import UIEventSimulator from 'ui-event-simulator';
import {createContainer, removeMapContainer} from '../../SpecHelper.js';
describe('Marker', () => {
let map,
container,
icon1,
icon2;
... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/layer/tile/TileLayer.WMSSpec.js | spec/suites/layer/tile/TileLayer.WMSSpec.js | import {expect} from 'chai';
import {TileLayer} from 'leaflet';
describe('TileLayer.WMS', () => {
describe('constructor', () => {
it('sets wmsParams', () => {
const layer = new TileLayer.WMS('https://example.com/map', {opacity: 0.5, attribution: 'foo'});
expect(layer.wmsParams).to.eql({
...layer.defaultWm... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/layer/tile/TileLayerSpec.js | spec/suites/layer/tile/TileLayerSpec.js | import {expect} from 'chai';
import {Browser, CRS, LeafletMap, TileLayer, Util, LatLng} from 'leaflet';
import sinon from 'sinon';
import {createContainer, removeMapContainer} from '../../SpecHelper.js';
describe('TileLayer', () => {
let container, map;
// Placekitten via https://placekitten.com/attribution.html
/... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/layer/tile/GridLayerSpec.js | spec/suites/layer/tile/GridLayerSpec.js | import {expect} from 'chai';
import {DomUtil, GridLayer, LeafletMap, Point, Util} from 'leaflet';
import sinon from 'sinon';
import {createContainer, removeMapContainer} from '../../SpecHelper.js';
describe('GridLayer', () => {
let container, map;
const createClock = () => sinon.useFakeTimers({
toFake: ['setTimeo... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/layer/vector/PolygonSpec.js | spec/suites/layer/vector/PolygonSpec.js | import {expect} from 'chai';
import {LineUtil, LeafletMap, LatLng, Polygon} from 'leaflet';
import {createContainer, removeMapContainer} from '../../SpecHelper.js';
describe('Polygon', () => {
let map, container;
beforeEach(() => {
container = createContainer();
map = new LeafletMap(container, {center: [55.8, 3... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/layer/vector/CircleSpec.js | spec/suites/layer/vector/CircleSpec.js | import {expect} from 'chai';
import {Circle, LeafletMap, CRS, Transformation} from 'leaflet';
import {createContainer, removeMapContainer} from '../../SpecHelper.js';
describe('Circle', () => {
let map, container, circle;
beforeEach(() => {
container = container = createContainer();
map = new LeafletMap(contain... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/layer/vector/CanvasSpec.js | spec/suites/layer/vector/CanvasSpec.js | import {expect} from 'chai';
import {Canvas, Circle, DomEvent, LayerGroup, LeafletMap, Marker, Polygon, Polyline, SVG, Util} from 'leaflet';
import Hand from 'prosthetic-hand';
import sinon from 'sinon';
import UIEventSimulator from 'ui-event-simulator';
import {createContainer, removeMapContainer} from '../../SpecHelp... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/layer/vector/PolylineSpec.js | spec/suites/layer/vector/PolylineSpec.js | import {expect} from 'chai';
import {LeafletMap, LatLng, Polyline} from 'leaflet';
import {createContainer, removeMapContainer} from '../../SpecHelper.js';
describe('Polyline', () => {
let map, container;
beforeEach(() => {
container = createContainer();
map = new LeafletMap(container, {center: [55.8, 37.6], zo... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/layer/vector/CircleMarkerSpec.js | spec/suites/layer/vector/CircleMarkerSpec.js | import {expect} from 'chai';
import {CircleMarker, LatLng, LeafletMap, Point} from 'leaflet';
import {createContainer, removeMapContainer} from '../../SpecHelper.js';
describe('CircleMarker', () => {
let map, container;
beforeEach(() => {
container = container = createContainer();
map = new LeafletMap(containe... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/layer/vector/PathSpec.js | spec/suites/layer/vector/PathSpec.js | import {expect} from 'chai';
import {LayerGroup, LeafletMap, Polygon, Polyline} from 'leaflet';
import sinon from 'sinon';
import UIEventSimulator from 'ui-event-simulator';
import {createContainer, removeMapContainer} from '../../SpecHelper.js';
describe('Path', () => {
let container, map;
beforeEach(() => {
con... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/layer/vector/RectangleSpec.js | spec/suites/layer/vector/RectangleSpec.js | import {expect} from 'chai';
import {Canvas, LineUtil, LeafletMap, Polygon, LatLng, Rectangle} from 'leaflet';
import {createContainer, removeMapContainer} from '../../SpecHelper.js';
describe('Rectangle', () => {
let map, container;
beforeEach(() => {
container = createContainer();
map = new LeafletMap(contain... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/dom/DomEvent.DoubleTapSpec.js | spec/suites/dom/DomEvent.DoubleTapSpec.js | import {expect} from 'chai';
import {Control, DomEvent, DomUtil, LeafletMap} from 'leaflet';
import sinon from 'sinon';
import UIEventSimulator from 'ui-event-simulator';
import {createContainer, removeMapContainer} from '../SpecHelper.js';
describe('DomEvent.DoubleTapSpec.js', () => {
let container, clock, spy;
be... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/dom/DomEventSpec.js | spec/suites/dom/DomEventSpec.js | import {expect} from 'chai';
import {DomEvent, LeafletMap, Util} from 'leaflet';
import sinon from 'sinon';
import UIEventSimulator from 'ui-event-simulator';
describe('DomEvent', () => {
let el, listener;
beforeEach(() => {
el = document.createElement('div');
document.body.appendChild(el);
listener = sinon.s... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/dom/DomUtilSpec.js | spec/suites/dom/DomUtilSpec.js | import {expect} from 'chai';
import {DomUtil, Point} from 'leaflet';
import UIEventSimulator from 'ui-event-simulator';
describe('DomUtil', () => {
let el;
beforeEach(() => {
el = document.createElement('div');
el.style.position = 'absolute';
el.style.top = el.style.left = '0px';
document.body.appendChild(e... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/core/EventsSpec.js | spec/suites/core/EventsSpec.js | import {expect} from 'chai';
import {Class, Evented, FeatureGroup, Marker, Util} from 'leaflet';
import sinon from 'sinon';
describe('Events', () => {
describe('#fire', () => {
it('fires all listeners added through #on', () => {
const obj = new Evented(),
spy1 = sinon.spy(),
spy2 = sinon.spy(),
spy3 = s... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/core/UtilSpec.js | spec/suites/core/UtilSpec.js | import {expect} from 'chai';
import {Util} from 'leaflet';
import sinon from 'sinon';
describe('Util', () => {
describe('#stamp', () => {
it('sets a unique id on the given object and returns it', () => {
const a = {},
id = Util.stamp(a);
expect(typeof id).to.eql('number');
expect(Util.stamp(a)).to.eql(... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/core/ClassSpec.js | spec/suites/core/ClassSpec.js | import {expect} from 'chai';
import {Class} from 'leaflet';
import sinon from 'sinon';
describe('Class', () => {
describe('#extends', () => {
it('merges options instead of replacing them', () => {
class KlassWithOptions1 extends Class {
static {
this.setDefaultOptions({
foo1: 1,
foo2: 2
... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/map/MapSpec.js | spec/suites/map/MapSpec.js | import {expect} from 'chai';
import {Bounds, Canvas, CircleMarker, DivIcon, DomEvent, GridLayer, Handler, LatLngBounds, Layer, LeafletMap, Marker, Point, Polygon, TileLayer, Util, Control, LatLng} from 'leaflet';
import sinon from 'sinon';
import UIEventSimulator from 'ui-event-simulator';
import {createContainer, remo... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | true |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/map/handler/Map.DoubleClickZoomSpec.js | spec/suites/map/handler/Map.DoubleClickZoomSpec.js | import {expect} from 'chai';
import {LeafletMap} from 'leaflet';
import UIEventSimulator from 'ui-event-simulator';
import {createContainer, removeMapContainer} from '../../SpecHelper.js';
describe('LeafletMap.DoubleClickZoom', () => {
let container, map;
beforeEach(() => {
container = createContainer();
map = ... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/map/handler/Map.ScrollWheelZoomSpec.js | spec/suites/map/handler/Map.ScrollWheelZoomSpec.js | import {expect} from 'chai';
import {DomEvent, LeafletMap} from 'leaflet';
import sinon from 'sinon';
import UIEventSimulator from 'ui-event-simulator';
import {createContainer, removeMapContainer} from '../../SpecHelper.js';
describe('LeafletMap.ScrollWheelZoom', () => {
let container, map;
const wheel = 'onwheel' ... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/map/handler/Map.DragSpec.js | spec/suites/map/handler/Map.DragSpec.js | import {expect} from 'chai';
import {DomUtil, LatLng, LeafletMap, Marker, Point} from 'leaflet';
import Hand from 'prosthetic-hand';
import sinon from 'sinon';
import UIEventSimulator from 'ui-event-simulator';
import {createContainer, removeMapContainer, pointerEventType} from '../../SpecHelper.js';
describe('Leaflet... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/map/handler/Map.TapHoldSpec.js | spec/suites/map/handler/Map.TapHoldSpec.js | import {expect} from 'chai';
import {Browser, LeafletMap, Point} from 'leaflet';
import sinon from 'sinon';
import UIEventSimulator from 'ui-event-simulator';
import {createContainer, removeMapContainer} from '../../SpecHelper.js';
describe('LeafletMap.TapHoldSpec.js', () => {
let container, clock, spy, map;
const ... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/map/handler/Map.KeyboardSpec.js | spec/suites/map/handler/Map.KeyboardSpec.js | import {expect} from 'chai';
import {LeafletMap, Popup} from 'leaflet';
import sinon from 'sinon';
import UIEventSimulator from 'ui-event-simulator';
import {createContainer, removeMapContainer} from '../../SpecHelper.js';
describe('LeafletMap.Keyboard', () => {
const KEYCODE_LOWERCASE_A = 'KeyA';
const KEYCODE_ARRO... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/map/handler/Map.PinchZoomSpec.js | spec/suites/map/handler/Map.PinchZoomSpec.js | import {expect} from 'chai';
import {LatLng, LeafletMap, Polygon, Rectangle} from 'leaflet';
import Hand from 'prosthetic-hand';
import sinon from 'sinon';
import {createContainer, removeMapContainer, pointerEventType} from '../../SpecHelper.js';
import UIEventSimulator from 'ui-event-simulator';
describe('LeafletMap.... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/map/handler/Map.BoxZoom.js | spec/suites/map/handler/Map.BoxZoom.js | import {expect} from 'chai';
import {LeafletMap} from 'leaflet';
import sinon from 'sinon';
import UIEventSimulator from 'ui-event-simulator';
import {createContainer, removeMapContainer} from '../../SpecHelper.js';
describe('LeafletMap.BoxZoom', () => {
let container, map;
beforeEach(() => {
container = createCo... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/control/ControlSpec.js | spec/suites/control/ControlSpec.js | import {expect} from 'chai';
import {Control, DomUtil, LeafletMap} from 'leaflet';
import sinon from 'sinon';
import {createContainer, removeMapContainer} from '../SpecHelper.js';
describe('Control', () => {
function onAdd() {
return DomUtil.create('div', 'leaflet-test-control');
}
let map,
container,
control;... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/control/Control.LayersSpec.js | spec/suites/control/Control.LayersSpec.js | import {expect} from 'chai';
import {Control, LeafletMap, Marker, TileLayer, Util} from 'leaflet';
import sinon from 'sinon';
import UIEventSimulator from 'ui-event-simulator';
import {createContainer, pointerType, removeMapContainer} from '../SpecHelper.js';
describe('Control.Layers', () => {
let container, map;
b... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/control/Control.AttributionSpec.js | spec/suites/control/Control.AttributionSpec.js | import {LeafletMap, Control, Layer} from 'leaflet';
import {createContainer, removeMapContainer} from '../SpecHelper.js';
import {expect} from 'chai';
describe('Control.Attribution', () => {
let map, control, container, controlContainer;
beforeEach(() => {
container = container = createContainer();
map = new Le... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/spec/suites/control/Control.ScaleSpec.js | spec/suites/control/Control.ScaleSpec.js | import {LeafletMap, Control} from 'leaflet';
describe('Control.Scale', () => {
it('can be added to an unloaded map', () => {
const map = new LeafletMap(document.createElement('div'));
new Control.Scale().addTo(map);
});
});
| javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/docs/dialog/dialog.js | docs/dialog/dialog.js | const SESSION_KEY = 'dialog-session';
const ONE_DAY_MILLI_SEC = 7 * 24 * 60 * 60 * 1000;
function openDialog() {
// keep the last session timestamp in local storage to re-show after 7 days since last time
if (localStorage) {
const sessionTimestamp = localStorage.getItem(SESSION_KEY);
if (sessionTimestamp && Dat... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/docs/docs/js/reference.js | docs/docs/js/reference.js | if (document.body.className.indexOf('api-page') !== -1) {
let elems = document.querySelectorAll('h2, h3, h4, tr');
for (let i = 0, len = elems.length; i < len; i++) {
const el = elems[i];
if (el.id) {
const anchor = document.createElement('a');
anchor.setAttribute('data-anchor', el.id);
if (!el.childr... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/docs/docs/js/docs.js | docs/docs/js/docs.js | /* global hljs */
hljs.configure({tabReplace: ' '});
hljs.initHighlighting();
const tocCopy = document.createElement('div');
tocCopy.id = 'toc-copy';
const toc = document.querySelector('#toc');
if (toc) {
// top menu
let menus = document.querySelectorAll('#toc a');
for (const menu of menus) {
menu.addEventL... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/docs/docs/highlight/highlight.pack.js | docs/docs/highlight/highlight.pack.js | !function(e){"undefined"!=typeof exports?e(exports):(window.hljs=e({}),"function"==typeof define&&define.amd&&define("hljs",[],function(){return window.hljs}))}(function(e){function n(e){return e.replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">")}function t(e){return e.nodeName.toLowerCase()}function r(... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/docs/examples/map-panes/eu-countries.js | docs/examples/map-panes/eu-countries.js | const euCountries = {"type":"FeatureCollection","features":[
{"type":"Feature","properties":{"scalerank":1,"featurecla":"Admin-0 country","labelrank":6,"sovereignt":"Albania","sov_a3":"ALB","adm0_dif":0,"level":2,"type":"Sovereign country","admin":"Albania","adm0_a3":"ALB","geou_dif":0,"geounit":"Albania","gu_a3":"ALB"... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | true |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/docs/examples/choropleth/us-states.js | docs/examples/choropleth/us-states.js | const statesData = {"type":"FeatureCollection","features":[
{"type":"Feature","id":"01","properties":{"name":"Alabama","density":94.65},"geometry":{"type":"Polygon","coordinates":[[[-87.359296,35.00118],[-85.606675,34.984749],[-85.431413,34.124869],[-85.184951,32.859696],[-85.069935,32.580372],[-84.960397,32.421541],[-... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | true |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/docs/examples/geojson/sample-geojson.js | docs/examples/geojson/sample-geojson.js | const freeBus = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[-105.00341892242432, 39.75383843460583],
[-105.0008225440979, 39.7518918... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/debug/vector/geojson-sample.js | debug/vector/geojson-sample.js | export default {
type: 'FeatureCollection',
features: [
{
type: 'Feature',
geometry: {
type: 'Point',
coordinates: [102.0, 0.5]
},
properties: {
prop0: 'value0',
color: 'blue'
}
},
{
type: 'Feature',
geometry: {
type: 'LineString',
coordinates: [[102.0, 0.0], [103.0,... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | false |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/debug/vector/route.js | debug/vector/route.js | /*
Route exported from CloudMade;
Map data used is Copyright (c) OpenStreetMap contributors 2010
OpenStreetMap® is open data, licensed under the
Open Data Commons Open Database License (ODbL) by
the OpenStreetMap Foundation (OSMF).
See full license: https://www.openstreetmap.org/copyright
*/
| javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | true |
Leaflet/Leaflet | https://github.com/Leaflet/Leaflet/blob/9365d67cf9a5b648b63822960bff9aa373850941/debug/vector/us-states.js | debug/vector/us-states.js | export default {
type: 'FeatureCollection',
features: [
{
type: 'Feature',
id: '01',
properties: {name: 'Alabama', density: 94.65},
geometry: {
type: 'Polygon',
coordinates: [
[
[-87.359296, 35.00118],
[-85.606675, 34.984749],
[-85.431413, 34.124869],
[-85.184951, 32... | javascript | BSD-2-Clause | 9365d67cf9a5b648b63822960bff9aa373850941 | 2026-01-04T14:58:34.824206Z | true |
remoteintech/remote-jobs | https://github.com/remoteintech/remote-jobs/blob/59557015c56a60b9118f1f458cb02501b57c57a6/.github/scripts/validate-readme.js | .github/scripts/validate-readme.js | const fs = require('fs');
const axios = require('axios');
class ReadmeValidator {
constructor() {
this.errors = [];
this.warnings = [];
this.companies = [];
}
async validate() {
console.log('📖 Validating README.md...');
const readme = fs.readFileSync('README.md', 'utf8');
const lin... | javascript | CC0-1.0 | 59557015c56a60b9118f1f458cb02501b57c57a6 | 2026-01-04T14:59:16.811780Z | false |
remoteintech/remote-jobs | https://github.com/remoteintech/remote-jobs/blob/59557015c56a60b9118f1f458cb02501b57c57a6/.github/scripts/generate-report.js | .github/scripts/generate-report.js | const fs = require('fs');
function loadResults() {
let readmeResult = null;
let profilesResult = null;
try {
if (fs.existsSync('validation-results/readme-validation-results/readme-result.json')) {
readmeResult = JSON.parse(fs.readFileSync('validation-results/readme-validation-results/readme-result.jso... | javascript | CC0-1.0 | 59557015c56a60b9118f1f458cb02501b57c57a6 | 2026-01-04T14:59:16.811780Z | false |
remoteintech/remote-jobs | https://github.com/remoteintech/remote-jobs/blob/59557015c56a60b9118f1f458cb02501b57c57a6/.github/scripts/validate-profile.js | .github/scripts/validate-profile.js | const fs = require('fs');
const path = require('path');
class CompanyProfileValidator {
constructor() {
this.errors = [];
this.warnings = [];
this.suggestions = [];
}
async validateProfile(profilePath) {
console.log(`🔍 Validating profile: ${profilePath}`);
if (!fs.existsSync(profilePat... | javascript | CC0-1.0 | 59557015c56a60b9118f1f458cb02501b57c57a6 | 2026-01-04T14:59:16.811780Z | false |
remoteintech/remote-jobs | https://github.com/remoteintech/remote-jobs/blob/59557015c56a60b9118f1f458cb02501b57c57a6/site/assets/companies-table.js | site/assets/companies-table.js | function setupSearch() {
var table = document.querySelector('table#companies-table');
// ✅ Search Input Field
var searchInput = document.createElement('input');
searchInput.type = 'text';
searchInput.placeholder = 'Search (Name/Tech/Region)';
searchInput.id = 'search-input';
// ✅ Search Status Display
var sea... | javascript | CC0-1.0 | 59557015c56a60b9118f1f458cb02501b57c57a6 | 2026-01-04T14:59:16.811780Z | false |
remoteintech/remote-jobs | https://github.com/remoteintech/remote-jobs/blob/59557015c56a60b9118f1f458cb02501b57c57a6/bin/serve-site.js | bin/serve-site.js | #!/usr/bin/env node
const { spawnSync } = require( 'child_process' );
const path = require( 'path' );
// Build the static site
const result = spawnSync( process.execPath, [
path.join( __dirname, 'build-site.js' ),
], { stdio: 'inherit' } );
if ( result.error ) {
throw result.error;
}
if ( result.status > 0 ) {
pro... | javascript | CC0-1.0 | 59557015c56a60b9118f1f458cb02501b57c57a6 | 2026-01-04T14:59:16.811780Z | false |
remoteintech/remote-jobs | https://github.com/remoteintech/remote-jobs/blob/59557015c56a60b9118f1f458cb02501b57c57a6/bin/build-site.js | bin/build-site.js | #!/usr/bin/env node
const fs = require( 'fs' );
const path = require( 'path' );
const util = require( 'util' );
const cheerio = require( 'cheerio' );
const phin = require( 'phin' );
const rimraf = require( 'rimraf' );
const swig = require( 'swig-templates' );
const {
parseFromDirectory,
headingPropertyNames,
buil... | javascript | CC0-1.0 | 59557015c56a60b9118f1f458cb02501b57c57a6 | 2026-01-04T14:59:16.811780Z | false |
remoteintech/remote-jobs | https://github.com/remoteintech/remote-jobs/blob/59557015c56a60b9118f1f458cb02501b57c57a6/bin/validate.js | bin/validate.js | #!/usr/bin/env node
const { parseFromDirectory } = require( '../lib' );
const fs = require( 'fs' );
const path = require( 'path' );
// Accept an optional directory name where the content files live.
const contentPath = (
process.argv[ 2 ]
? path.resolve( process.argv[ 2 ] )
: path.join( __dirname, '..' )
);
//... | javascript | CC0-1.0 | 59557015c56a60b9118f1f458cb02501b57c57a6 | 2026-01-04T14:59:16.811780Z | false |
remoteintech/remote-jobs | https://github.com/remoteintech/remote-jobs/blob/59557015c56a60b9118f1f458cb02501b57c57a6/lib/index.js | lib/index.js | #!/usr/bin/env node
const fs = require( 'fs' );
const path = require( 'path' );
const util = require( 'util' );
const cheerio = require( 'cheerio' );
const lunr = require( 'lunr' );
const marked = require( 'marked' );
/**
* Constants
*/
const headingsRequired = [
'Company blurb',
];
const headingsOptional = [
... | javascript | CC0-1.0 | 59557015c56a60b9118f1f458cb02501b57c57a6 | 2026-01-04T14:59:16.811780Z | false |
angular/angular.js | https://github.com/angular/angular.js/blob/d8f77817eb5c98dec5317bc3756d1ea1812bcfbe/karma-modules.conf.js | karma-modules.conf.js | 'use strict';
var sharedConfig = require('./karma-shared.conf');
module.exports = function(config) {
sharedConfig(config, {testName: 'AngularJS: isolated module tests', logFile: 'karma-modules-isolated.log'});
config.set({
files: [
'build/angular.js',
'build/angular-mocks.js',
'test/modules... | javascript | MIT | d8f77817eb5c98dec5317bc3756d1ea1812bcfbe | 2026-01-04T14:56:54.449246Z | false |
angular/angular.js | https://github.com/angular/angular.js/blob/d8f77817eb5c98dec5317bc3756d1ea1812bcfbe/karma-shared.conf.js | karma-shared.conf.js | 'use strict';
module.exports = function(config, specificOptions) {
config.set({
frameworks: ['jasmine'],
autoWatch: true,
logLevel: config.LOG_INFO,
logColors: true,
browsers: ['Chrome'],
browserDisconnectTimeout: 10000,
browserDisconnectTolerance: 2,
browserNoActivityTimeout: 30000,
... | javascript | MIT | d8f77817eb5c98dec5317bc3756d1ea1812bcfbe | 2026-01-04T14:56:54.449246Z | false |
angular/angular.js | https://github.com/angular/angular.js/blob/d8f77817eb5c98dec5317bc3756d1ea1812bcfbe/karma-modules-ngAnimate.conf.js | karma-modules-ngAnimate.conf.js | 'use strict';
var angularFiles = require('./angularFiles');
var sharedConfig = require('./karma-shared.conf');
module.exports = function(config) {
sharedConfig(config, {testName: 'AngularJS: isolated module tests (ngAnimate)', logFile: 'karma-ngAnimate-isolated.log'});
config.set({
files: angularFiles.mergeF... | javascript | MIT | d8f77817eb5c98dec5317bc3756d1ea1812bcfbe | 2026-01-04T14:56:54.449246Z | false |
angular/angular.js | https://github.com/angular/angular.js/blob/d8f77817eb5c98dec5317bc3756d1ea1812bcfbe/karma-modules-ngMock.conf.js | karma-modules-ngMock.conf.js | 'use strict';
var angularFiles = require('./angularFiles');
var sharedConfig = require('./karma-shared.conf');
module.exports = function(config) {
sharedConfig(config, {testName: 'AngularJS: isolated module tests (ngMock)', logFile: 'karma-ngMock-isolated.log'});
config.set({
files: angularFiles.mergeFilesFo... | javascript | MIT | d8f77817eb5c98dec5317bc3756d1ea1812bcfbe | 2026-01-04T14:56:54.449246Z | false |
angular/angular.js | https://github.com/angular/angular.js/blob/d8f77817eb5c98dec5317bc3756d1ea1812bcfbe/protractor-conf.js | protractor-conf.js | 'use strict';
var config = require('./protractor-shared-conf').config;
config.specs = [
'test/e2e/tests/**/*.js',
'build/docs/ptore2e/**/*.js',
'docs/app/e2e/**/*.scenario.js'
];
config.capabilities.browserName = 'chrome';
config.directConnect = true;
exports.config = config;
| javascript | MIT | d8f77817eb5c98dec5317bc3756d1ea1812bcfbe | 2026-01-04T14:56:54.449246Z | false |
angular/angular.js | https://github.com/angular/angular.js/blob/d8f77817eb5c98dec5317bc3756d1ea1812bcfbe/karma-jqlite.conf.js | karma-jqlite.conf.js | 'use strict';
var angularFiles = require('./angularFiles');
var sharedConfig = require('./karma-shared.conf');
module.exports = function(config) {
sharedConfig(config, {testName: 'AngularJS: jqLite', logFile: 'karma-jqlite.log'});
config.set({
files: angularFiles.mergeFilesFor('karma'),
exclude: angularF... | javascript | MIT | d8f77817eb5c98dec5317bc3756d1ea1812bcfbe | 2026-01-04T14:56:54.449246Z | false |
angular/angular.js | https://github.com/angular/angular.js/blob/d8f77817eb5c98dec5317bc3756d1ea1812bcfbe/Gruntfile.js | Gruntfile.js | 'use strict';
var serveFavicon = require('serve-favicon');
var serveStatic = require('serve-static');
var serveIndex = require('serve-index');
var files = require('./angularFiles').files;
var mergeFilesFor = require('./angularFiles').mergeFilesFor;
var util = require('./lib/grunt/utils.js');
var versionInfo = require(... | javascript | MIT | d8f77817eb5c98dec5317bc3756d1ea1812bcfbe | 2026-01-04T14:56:54.449246Z | false |
angular/angular.js | https://github.com/angular/angular.js/blob/d8f77817eb5c98dec5317bc3756d1ea1812bcfbe/karma-jquery.conf-factory.js | karma-jquery.conf-factory.js | 'use strict';
var angularFiles = require('./angularFiles');
var sharedConfig = require('./karma-shared.conf');
module.exports = function(version) {
version = version || '';
return function(config) {
sharedConfig(config, {
testName: 'AngularJS: jQuery' + (version ? ' ' + version : ''),
logFile: 'k... | javascript | MIT | d8f77817eb5c98dec5317bc3756d1ea1812bcfbe | 2026-01-04T14:56:54.449246Z | false |
angular/angular.js | https://github.com/angular/angular.js/blob/d8f77817eb5c98dec5317bc3756d1ea1812bcfbe/protractor-shared-conf.js | protractor-shared-conf.js | 'use strict';
exports.config = {
allScriptsTimeout: 11000,
baseUrl: 'http://localhost:8000/',
framework: 'jasmine2',
capabilities: {
// Fix element scrolling behavior in Firefox for fixed header elements (like angularjs.org has)
'elementScrollBehavior': 1
},
onPrepare: function() {
/* globa... | javascript | MIT | d8f77817eb5c98dec5317bc3756d1ea1812bcfbe | 2026-01-04T14:56:54.449246Z | false |
angular/angular.js | https://github.com/angular/angular.js/blob/d8f77817eb5c98dec5317bc3756d1ea1812bcfbe/protractor-circleci-conf.js | protractor-circleci-conf.js | 'use strict';
var config = require('./protractor-shared-conf').config;
// Using SauceLabs.
config.capabilities = undefined;
config.sauceUser = process.env.SAUCE_USERNAME;
config.sauceKey = process.env.SAUCE_ACCESS_KEY;
config.multiCapabilities = [
capabilitiesForSauceLabs({
browserName: 'chrome',
platform:... | javascript | MIT | d8f77817eb5c98dec5317bc3756d1ea1812bcfbe | 2026-01-04T14:56:54.449246Z | false |
angular/angular.js | https://github.com/angular/angular.js/blob/d8f77817eb5c98dec5317bc3756d1ea1812bcfbe/karma-jquery.conf.js | karma-jquery.conf.js | 'use strict';
var karmaConfigFactory = require('./karma-jquery.conf-factory');
module.exports = karmaConfigFactory();
| javascript | MIT | d8f77817eb5c98dec5317bc3756d1ea1812bcfbe | 2026-01-04T14:56:54.449246Z | false |
angular/angular.js | https://github.com/angular/angular.js/blob/d8f77817eb5c98dec5317bc3756d1ea1812bcfbe/karma-jquery-2.1.conf.js | karma-jquery-2.1.conf.js | 'use strict';
var karmaConfigFactory = require('./karma-jquery.conf-factory');
module.exports = karmaConfigFactory('2.1');
| javascript | MIT | d8f77817eb5c98dec5317bc3756d1ea1812bcfbe | 2026-01-04T14:56:54.449246Z | false |
angular/angular.js | https://github.com/angular/angular.js/blob/d8f77817eb5c98dec5317bc3756d1ea1812bcfbe/angularFiles.js | angularFiles.js | 'use strict';
var angularFiles = {
'angularSrc': [
'src/minErr.js',
'src/Angular.js',
'src/loader.js',
'src/shallowCopy.js',
'src/stringify.js',
'src/AngularPublic.js',
'src/jqLite.js',
'src/apis.js',
'src/auto/injector.js',
'src/ng/anchorScroll.js',
'src/ng/animate.js',... | javascript | MIT | d8f77817eb5c98dec5317bc3756d1ea1812bcfbe | 2026-01-04T14:56:54.449246Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.