Skip to content

Instantly share code, notes, and snippets.

View hf-header.user.js
// ==UserScript==
// @name HammerfestHeader
// @namespace hammerfest.fr
// @description Choix de la banniere Hammerfest
// @version 2
// @include http://www.hammerfest.fr/*
// @match http://www.hammerfest.fr/*
// ==/UserScript==
//Cacher les sites amis pendant une partie
View color-space.ts
interface LinearRgb {
r: number;
g: number;
b: number;
}
interface Srgb {
r: number;
g: number;
View gist:d7b6d9317735dec7be828b479f1c8382
--A---------------------------
[a---------------)
+
--B---------------------------
[b-----)
+
--C---------------------------
[c--------------)
View merge.md

Merge

This document describes the merge algorithm.

The merge algorithm takes a list of process coverages (or smaller items) and outputs a single object combining the information in the inputs. The goal is to simulate the result V8 would have returned if the coverages were executed sequentially inside the same process instead of their own processes (so the counts are summed).

View fromRanges.ts
function fromSortedRanges(ranges: ReadonlyArray<RangeCov>): RangeTree | undefined {
let root: RangeTree | undefined;
const stack: RangeTree[] = [];
for (const range of ranges) {
const node: RangeTree = new RangeTree(range.startOffset, range.endOffset, range.count, [], 0, 0);
if (root === undefined) {
root = node;
stack.push(node);
continue;
}
View hello.json
{
"path": "/data/projects/web/yargs/index.js",
"statementMap": {
"0": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
View input.json
{
"scriptId": "1",
"url": "/test/fixtures/hello-world/lib.js",
"functions": [
{
"functionName": "",
"ranges": [
{
"startOffset": 0,
"endOffset": 130,
View hello-world.mjs
export function helloWorld () {
console.log('Hello, World!')
}
View url.json
[
"/data/projects/web/v8-to-istanbul/src/test/fixtures/esm-hello-world/main.js",
"_stream_duplex.js",
"_stream_passthrough.js",
"_stream_readable.js",
"_stream_transform.js",
"_stream_writable.js",
"assert.js",
"buffer.js",
"cjs-facade:file:///data/projects/web/v8-to-istanbul/src/test/fixtures/esm-hello-world/main.js",
View istanbul.json
{
"/main.js": {
"path": "/main.js",
"statementMap": {
"s0": {
"start": {
"line": 1,
"column": 0
},
"end": {
You can’t perform that action at this time.