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 |
|---|---|---|---|---|---|---|---|---|
usebruno/bruno | https://github.com/usebruno/bruno/blob/b6a27bc66c93946b93ea736674830f700dbccb6e/packages/bruno-cli/src/runner/interpolate-vars.js | packages/bruno-cli/src/runner/interpolate-vars.js | const { interpolate } = require('@usebruno/common');
const { each, forOwn, cloneDeep, find } = require('lodash');
const FormData = require('form-data');
const getContentType = (headers = {}) => {
let contentType = '';
forOwn(headers, (value, key) => {
if (key && key.toLowerCase() === 'content-type') {
co... | javascript | MIT | b6a27bc66c93946b93ea736674830f700dbccb6e | 2026-01-04T14:59:20.022123Z | false |
usebruno/bruno | https://github.com/usebruno/bruno/blob/b6a27bc66c93946b93ea736674830f700dbccb6e/packages/bruno-cli/src/runner/prepare-request.js | packages/bruno-cli/src/runner/prepare-request.js | const get = require('lodash/get');
const each = require('lodash/each');
const filter = require('lodash/filter');
const find = require('lodash/find');
const decomment = require('decomment');
const crypto = require('node:crypto');
const fs = require('node:fs');
const { mergeHeaders, mergeScripts, mergeVars, mergeAuth, ge... | javascript | MIT | b6a27bc66c93946b93ea736674830f700dbccb6e | 2026-01-04T14:59:20.022123Z | false |
usebruno/bruno | https://github.com/usebruno/bruno/blob/b6a27bc66c93946b93ea736674830f700dbccb6e/packages/bruno-cli/src/reporters/junit.js | packages/bruno-cli/src/reporters/junit.js | const os = require('os');
const fs = require('fs');
const xmlbuilder = require('xmlbuilder');
const makeJUnitOutput = async (results, outputPath) => {
const output = {
testsuites: {
testsuite: []
}
};
results.forEach((result) => {
const assertionTestCount = result.assertionResults ? result.ass... | javascript | MIT | b6a27bc66c93946b93ea736674830f700dbccb6e | 2026-01-04T14:59:20.022123Z | false |
usebruno/bruno | https://github.com/usebruno/bruno/blob/b6a27bc66c93946b93ea736674830f700dbccb6e/packages/bruno-cli/src/reporters/html.js | packages/bruno-cli/src/reporters/html.js | const fs = require('fs');
const { generateHtmlReport } = require('@usebruno/common/runner');
const { CLI_VERSION } = require('../constants');
const makeHtmlOutput = async (results, outputPath, runCompletionTime, environment = null) => {
let runnerResults = results;
if (!results) {
runnerResults = [];
} else ... | javascript | MIT | b6a27bc66c93946b93ea736674830f700dbccb6e | 2026-01-04T14:59:20.022123Z | false |
usebruno/bruno | https://github.com/usebruno/bruno/blob/b6a27bc66c93946b93ea736674830f700dbccb6e/packages/bruno-cli/tests/utils/parse-environment-json.spec.js | packages/bruno-cli/tests/utils/parse-environment-json.spec.js | const { describe, it, expect } = require('@jest/globals');
const { getEnvVars } = require('../../src/utils/bru');
const { parseEnvironmentJson } = require('../../src/utils/environment');
describe('parseEnvironmentJson', () => {
it('normalizes single environment object', () => {
const input = {
name: 'My En... | javascript | MIT | b6a27bc66c93946b93ea736674830f700dbccb6e | 2026-01-04T14:59:20.022123Z | false |
usebruno/bruno | https://github.com/usebruno/bruno/blob/b6a27bc66c93946b93ea736674830f700dbccb6e/packages/bruno-cli/tests/utils/common.spec.js | packages/bruno-cli/tests/utils/common.spec.js | const { describe, it, expect } = require('@jest/globals');
const { hasExecutableTestInScript } = require('../../src/utils/request');
describe('hasExecutableTestInScript', () => {
describe('should return true for valid test() calls', () => {
it('should detect basic test calls', () => {
const script = `
... | javascript | MIT | b6a27bc66c93946b93ea736674830f700dbccb6e | 2026-01-04T14:59:20.022123Z | false |
usebruno/bruno | https://github.com/usebruno/bruno/blob/b6a27bc66c93946b93ea736674830f700dbccb6e/packages/bruno-cli/tests/utils/filesystem.spec.js | packages/bruno-cli/tests/utils/filesystem.spec.js | const { isLargeFile } = require('../../src/utils/filesystem');
const fs = require('fs-extra');
describe('isLargeFile', () => {
let existsSyncSpy;
let lstatSyncSpy;
let statSyncSpy;
beforeEach(() => {
existsSyncSpy = jest.spyOn(fs, 'existsSync');
lstatSyncSpy = jest.spyOn(fs, 'lstatSync');
statSync... | javascript | MIT | b6a27bc66c93946b93ea736674830f700dbccb6e | 2026-01-04T14:59:20.022123Z | false |
usebruno/bruno | https://github.com/usebruno/bruno/blob/b6a27bc66c93946b93ea736674830f700dbccb6e/packages/bruno-cli/tests/utils/collection/get-call-stack.spec.js | packages/bruno-cli/tests/utils/collection/get-call-stack.spec.js | const { describe, it, expect, beforeEach } = require('@jest/globals');
const { getCallStack } = require('../../../src/utils/collection');
const collection = {
brunoConfig: {
version: '1',
name: 'multirun-cli',
type: 'collection',
ignore: ['node_modules', '.git']
},
root: {
request: {
he... | javascript | MIT | b6a27bc66c93946b93ea736674830f700dbccb6e | 2026-01-04T14:59:20.022123Z | false |
usebruno/bruno | https://github.com/usebruno/bruno/blob/b6a27bc66c93946b93ea736674830f700dbccb6e/packages/bruno-cli/tests/runner/prepare-request.spec.js | packages/bruno-cli/tests/runner/prepare-request.spec.js | const { describe, it, expect, beforeEach } = require('@jest/globals');
jest.mock('../../src/utils/filesystem', () => ({
isLargeFile: jest.fn()
}));
const filesystemUtils = require('../../src/utils/filesystem');
const prepareRequest = require('../../src/runner/prepare-request');
describe('prepare-request: prepareRequ... | javascript | MIT | b6a27bc66c93946b93ea736674830f700dbccb6e | 2026-01-04T14:59:20.022123Z | false |
usebruno/bruno | https://github.com/usebruno/bruno/blob/b6a27bc66c93946b93ea736674830f700dbccb6e/packages/bruno-cli/tests/runner/report-metadata.spec.js | packages/bruno-cli/tests/runner/report-metadata.spec.js | const { describe, it, expect } = require('@jest/globals');
const { generateHtmlReport } = require('@usebruno/common/runner');
describe('HTML Report Generation', () => {
it('should include all metadata in the HTML report', async () => {
// Sample test results
const mockResults = [
{
iterationInd... | javascript | MIT | b6a27bc66c93946b93ea736674830f700dbccb6e | 2026-01-04T14:59:20.022123Z | false |
usebruno/bruno | https://github.com/usebruno/bruno/blob/b6a27bc66c93946b93ea736674830f700dbccb6e/packages/bruno-cli/tests/runner/collection-json-from-pathname.spec.js | packages/bruno-cli/tests/runner/collection-json-from-pathname.spec.js | const path = require('node:path');
const { describe, it, expect } = require('@jest/globals');
const constants = require('../../src/constants');
const { createCollectionJsonFromPathname } = require('../../src/utils/collection');
describe('create collection json from pathname', () => {
it('should throw an error when t... | javascript | MIT | b6a27bc66c93946b93ea736674830f700dbccb6e | 2026-01-04T14:59:20.022123Z | false |
usebruno/bruno | https://github.com/usebruno/bruno/blob/b6a27bc66c93946b93ea736674830f700dbccb6e/packages/bruno-cli/tests/reporters/html.spec.js | packages/bruno-cli/tests/reporters/html.spec.js | const { describe, it, expect } = require('@jest/globals');
const fs = require('fs');
const mockGenerateHtmlReport = jest.fn(() => '<html>Mock HTML</html>');
jest.mock('@usebruno/common/runner', () => ({
generateHtmlReport: mockGenerateHtmlReport
}));
const makeHtmlOutput = require('../../src/reporters/html');
des... | javascript | MIT | b6a27bc66c93946b93ea736674830f700dbccb6e | 2026-01-04T14:59:20.022123Z | false |
usebruno/bruno | https://github.com/usebruno/bruno/blob/b6a27bc66c93946b93ea736674830f700dbccb6e/packages/bruno-cli/tests/reporters/junit.spec.js | packages/bruno-cli/tests/reporters/junit.spec.js | const { describe, it, expect } = require('@jest/globals');
const xmlbuilder = require('xmlbuilder');
const fs = require('fs');
const makeJUnitOutput = require('../../src/reporters/junit');
describe('makeJUnitOutput', () => {
let createStub = jest.fn();
beforeEach(() => {
jest.spyOn(xmlbuilder, 'create').mock... | javascript | MIT | b6a27bc66c93946b93ea736674830f700dbccb6e | 2026-01-04T14:59:20.022123Z | false |
usebruno/bruno | https://github.com/usebruno/bruno/blob/b6a27bc66c93946b93ea736674830f700dbccb6e/packages/bruno-cli/bin/bru.js | packages/bruno-cli/bin/bru.js | #!/usr/bin/env node
require('../src').run();
| javascript | MIT | b6a27bc66c93946b93ea736674830f700dbccb6e | 2026-01-04T14:59:20.022123Z | false |
usebruno/bruno | https://github.com/usebruno/bruno/blob/b6a27bc66c93946b93ea736674830f700dbccb6e/packages/bruno-filestore/babel.config.js | packages/bruno-filestore/babel.config.js | module.exports = {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-typescript',
],
}; | javascript | MIT | b6a27bc66c93946b93ea736674830f700dbccb6e | 2026-01-04T14:59:20.022123Z | false |
usebruno/bruno | https://github.com/usebruno/bruno/blob/b6a27bc66c93946b93ea736674830f700dbccb6e/packages/bruno-filestore/rollup.config.js | packages/bruno-filestore/rollup.config.js | const { nodeResolve } = require('@rollup/plugin-node-resolve');
const commonjs = require('@rollup/plugin-commonjs');
const typescript = require('@rollup/plugin-typescript');
const json = require('@rollup/plugin-json');
const { terser } = require('rollup-plugin-terser');
const peerDepsExternal = require('rollup-plugin-p... | javascript | MIT | b6a27bc66c93946b93ea736674830f700dbccb6e | 2026-01-04T14:59:20.022123Z | false |
usebruno/bruno | https://github.com/usebruno/bruno/blob/b6a27bc66c93946b93ea736674830f700dbccb6e/packages/bruno-filestore/jest.config.js | packages/bruno-filestore/jest.config.js | module.exports = {
testEnvironment: 'node',
transform: {
'^.+\\.(js|ts)$': 'babel-jest',
},
moduleFileExtensions: ['js', 'ts'],
testMatch: ['**/__tests__/**/*.(js|ts)', '**/*.(test|spec).(js|ts)'],
collectCoverageFrom: [
'src/**/*.(js|ts)',
'!src/**/*.d.ts',
],
setupFilesAfterEnv: [],
}; | javascript | MIT | b6a27bc66c93946b93ea736674830f700dbccb6e | 2026-01-04T14:59:20.022123Z | false |
usebruno/bruno | https://github.com/usebruno/bruno/blob/b6a27bc66c93946b93ea736674830f700dbccb6e/packages/bruno-filestore/src/formats/bru/tests/request-parse-and-redact-body-data.spec.js | packages/bruno-filestore/src/formats/bru/tests/request-parse-and-redact-body-data.spec.js | const fs = require('node:fs');
const path = require('node:path');
const { bruRequestParseAndRedactBodyData } = require("../utils/request-parse-and-redact-body-data");
describe("parse and redact body data", () => {
it("should redact body blocks from the bru file string", () => {
const fixturesPath = `/fixtures/re... | javascript | MIT | b6a27bc66c93946b93ea736674830f700dbccb6e | 2026-01-04T14:59:20.022123Z | false |
usebruno/bruno | https://github.com/usebruno/bruno/blob/b6a27bc66c93946b93ea736674830f700dbccb6e/packages/bruno-filestore/src/formats/bru/tests/oauth2-additional-params.spec.js | packages/bruno-filestore/src/formats/bru/tests/oauth2-additional-params.spec.js | const { getOauth2AdditionalParameters } = require('../utils/oauth2-additional-params');
const { parseBruRequest, parseBruCollection } = require('../index');
const { getBruJsonWithAdditionalParams } = require('./fixtures/oauth2-additional-params');
describe('getOauth2AdditionalParameters', () => {
it('authorization_c... | javascript | MIT | b6a27bc66c93946b93ea736674830f700dbccb6e | 2026-01-04T14:59:20.022123Z | false |
usebruno/bruno | https://github.com/usebruno/bruno/blob/b6a27bc66c93946b93ea736674830f700dbccb6e/packages/bruno-filestore/src/formats/bru/tests/fixtures/oauth2-additional-params.js | packages/bruno-filestore/src/formats/bru/tests/fixtures/oauth2-additional-params.js | const getBruJsonWithAdditionalParams = (grantType) => ({
"meta": {
"name": "OAuth2 Additional Params Test",
"type": "http",
"seq": 1
},
"http": {
"method": "get",
"url": "https://api.usebruno.com/protected"
},
"auth": {
"oauth2": {
"grantType": grantType,
},
},
"oauth2_ad... | javascript | MIT | b6a27bc66c93946b93ea736674830f700dbccb6e | 2026-01-04T14:59:20.022123Z | false |
usebruno/bruno | https://github.com/usebruno/bruno/blob/b6a27bc66c93946b93ea736674830f700dbccb6e/packages/bruno-graphql-docs/rollup.config.js | packages/bruno-graphql-docs/rollup.config.js | const { nodeResolve } = require('@rollup/plugin-node-resolve');
const commonjs = require('@rollup/plugin-commonjs');
const typescript = require('@rollup/plugin-typescript');
const dts = require('rollup-plugin-dts');
const postcss = require('rollup-plugin-postcss');
const { terser } = require('rollup-plugin-terser');
co... | javascript | MIT | b6a27bc66c93946b93ea736674830f700dbccb6e | 2026-01-04T14:59:20.022123Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/index.js | index.js | const fs = require('fs');
const md = new require('markdown-it')('commonmark');
const jsdom = require('jsdom');
const { JSDOM } = jsdom;
const minify = require('html-minifier').minify;
const editHead = require('./docs/modules/editHead');
const addIDsForHeadings = require('./docs/modules/addIDsForHeadings');
const addLi... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/server.js | docs/server.js | const http = require('http');
const path = require('path');
const fs = require('fs');
http.createServer((req, res) => {
page(req, res, 'index');
}).listen(8001, '127.0.0.1');
function page(req, res, name) {
fs.readFile(name + '.html', function (err, data) {
res.writeHead(200, {'Content-Type': 'text/html', 'Conten... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/js/script.js | docs/js/script.js | const chooseMd = document.location.href
.split('/')
.pop()
.includes('plugin')
? 'Plugins'
: 'Tools';
function toggleMenuChange() {
document.querySelector('.nav').classList.toggle('nav--visible');
document
.querySelector('.hamburger-menu')
.classList.toggle('hamburger-menu--change');
}
document.... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/tweakToolContainer.js | docs/modules/tweakToolContainer.js | const capitalizeFirstLetter = (string) => (
string.charAt(0).toUpperCase() + string.slice(1)
);
const removeEmojis = string => {
const regex = /(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud8... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/createPromoBanner.js | docs/modules/createPromoBanner.js | const Templates = require('./Templates');
const createPromoBanner = ({ document }, link = 'https://flawlessapp.io/feedback') => {
const banner = document.createElement('a');
const { promoFlawlessFeedbackBanner } = Templates;
banner.classList.add('promo-banner');
banner.classList.add('promo-banner--flaw... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/Templates.js | docs/modules/Templates.js | const getCssFile = require('./helpers/getCssFile');
const CONFIG = require('./config/tools');
const normalizeCss = getCssFile('normalize');
const mainCss = getCssFile('design-tools-style');
const {
promoFlawlessFeedbackBanner__title,
promoFlawlessFeedbackBanner__description,
promoFlawlessFeedbackBanner__li... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/addHeader.js | docs/modules/addHeader.js | const addHeader = (
{ document },
title = 'Awesome Design Tools',
logo,
nav,
isTool = false,
isPlugin = false,
isKit = false
) => {
const header = document.querySelector('.header-top');
header.classList.add('header-top--hide-banner');
const { loop } = nav;
const defineProductName = () =>
(isT... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/addContributeButtonForAddendum.js | docs/modules/addContributeButtonForAddendum.js | const addContributeButtonForAddendum = ({ document }) => {
const article = document.querySelector('#addendum');
const button = document.createElement('a');
button.href = 'https://github.com/LisaDziuba/Awesome-Design-Tools';
const classNames = ['btn', 'btn-contribute', 'image-gh'];
classNames.map(className => butto... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/addAllPromoBanners.js | docs/modules/addAllPromoBanners.js | const promotionBanner = require('./view/promotionBanner');
const addAllPromoBanners = (window) => {
// promotionBanner(
// window,
// {
// className: '-supernova',
// logo: '-supernova',
// title: 'Supernova',
// description: 'Convert any mobile desig... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/addIDsForHeadings.js | docs/modules/addIDsForHeadings.js | const createLinkForID = require('./helpers/createLinkForID');
const addIDsForHeadings = ({ document }) => {
const categoryTitles = document.querySelectorAll('body > h3');
categoryTitles.forEach(title => title.id = createLinkForID(title.innerHTML));
}
module.exports = addIDsForHeadings;
| javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/addScripts.js | docs/modules/addScripts.js | const fs = require('fs');
const path = require('path');
const getJS = () => (
fs.readFileSync(path.normalize(`${__dirname}/../js/script.js`), 'utf8')
)
const addScripts = ({ document }) => {
const scriptTag = document.createElement('script');
scriptTag.innerHTML = getJS();
document.querySelector('body').appendChi... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/addWelcomeArticle.js | docs/modules/addWelcomeArticle.js | const addWelcomeArticle = (
{ document },
{
logoClassName,
title,
description,
button,
}
) => {
const main = document.querySelector('body > main');
const article = document.createElement('article');
article.classList.add('welcome');
article.innerHTML = `
<div class="welcome__asset ${logoClassName}"></d... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/addBackgroundColorToLogo.js | docs/modules/addBackgroundColorToLogo.js | const tinycolor = require('tinycolor2');
const addBackgroundColorToLogo = ({ document }) => {
const backgroundColorsHSL = [
'240,78.8%,87.1%', '270,78.8%,87.1%', '340.5,76.9%,89.8%', '0,78.8%,87.1%', '30,79.6%,80.8%',
'150,79.6%,80.8%', '176.3,38%,74.7%', '253.3,94.7%,92.5%', '15.7,86.7%,8... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/removeListInAddendum.js | docs/modules/removeListInAddendum.js | const removeListInAddendum = ({ document }) => {
const article = document.querySelector('#addendum');
if (article) {
const lists = article.querySelectorAll('ul');
lists.forEach((list) =>
list.innerHTML.includes('undefined') &&
list.parentNode.removeChild(list)
);
}
}
module.exports = removeListInAddend... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/addLinksToNavigationElements.js | docs/modules/addLinksToNavigationElements.js | const addLinksToNavigationElements = ({ document }) => {
const navListLinks = document.querySelectorAll('.nav li a');
navListLinks.forEach((item) => {
const oldHref = item.href;
item.href = `#${oldHref.split(`#`)[1]}`;
});
}
module.exports = addLinksToNavigationElements;
| javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/tweakDescriptionOfArticleTopic.js | docs/modules/tweakDescriptionOfArticleTopic.js | const createLinkForID = require('./helpers/createLinkForID');
const tweakDescriptionOfArticleTopic = ({ document }) => {
const topics = document.querySelectorAll('main > article');
topics.forEach((topic) => {
const splittedHeader = topic.innerHTML.split('<ul>');
const toolTitle = splittedHeader[0].split('</h3>')... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/editHead.js | docs/modules/editHead.js | const Templates = require('./Templates');
const editHead = ({ document }, title, meta, icons, isProduction) => {
const head = document.querySelector('head');
const {
createTitle,
createMeta,
createIcons,
fonts,
styleInner,
styleExternal,
analytics,
} = T... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/addHamburgerMenu.js | docs/modules/addHamburgerMenu.js | const addHamburgerMenu = ({ document }) => {
const parent = document.querySelector('.header-inner');
const hamburger = document.createElement('div');
hamburger.classList.add('hamburger-menu');
hamburger.innerHTML = `
<div class="bar1"></div>
<div class="bar2"></div>
<div class="bar3"></div>
`;
parent.append... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/favicon/favicon-adt.js | docs/modules/favicon/favicon-adt.js | const image = {
favicon16: `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAApVJREFUOBE1UztPVEEU/mbm3t3l4WZXkLWAxFdCYqKRGKMFpbGgsbEhJlT+ADt/kbG0o7SxMGIBMRZaiBLBiLIQL8Lex8wcvzMLk8zcu+ee73HOmTU4W1eef+s1Epdh7bxxaEFg6guT1clct4CzQA4xzjW5dfuui62Dx+ZYoUaPl8/+rnwdjV5tlMPutj8BwfySDhzdmE... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | true |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/favicon/favicon-adp.js | docs/modules/favicon/favicon-adp.js | const image = {
favicon16: `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAdpJREFUOBF9U7FOG0EQnRnv7t357IM7GzsEqnwBBQVS+AK6lFTJp+Q7IoRERUlHS0VBEYkvcKRIETIKssA4GJ/ZzczZvrstzBR78+bNvtudnUFY2t7Vt83J7OUQHO4CggHnsBEE0zDQY0nBBjpwkCPCMMrt7fXh6SIuZPJ9/wib+jzoxQmFWkKltbMNaLbjEovDIk+8Ht... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | true |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/favicon/favicon-adk.js | docs/modules/favicon/favicon-adk.js | const image = {
favicon16: `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAbVJREFUOBF1U71OAkEQntm9veVH4QQCZ0LlE1hoYkFnh40tFe/DW1AQay3sjK/gE1CqmKgJmgty3I07K3tkMTfN/H7f7s7OIGzl8foxWifrASH1iTBEJAykXtWU/rIlKMlIGgAuUkqfBncDG0dOTs4mw1BUbpoqaoQy3FL+qValBYfhoRdDwCVJGA1uL+5xejltP38u5k... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | true |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/helpers/getJS.js | docs/modules/helpers/getJS.js | // const getJS = () => (
// fs.readFileSync(path.normalize(`${__dirname}/docs/js/script.js`), 'utf8')
// )
// const addScripts = ({ document }) => {
// const scriptTag = document.createElement('script');
// scriptTag.innerHTML = getJS();
// document.querySelector('body').appendChild(scriptTag);
// }
// module.exp... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/helpers/getCssFile.js | docs/modules/helpers/getCssFile.js | const fs = require('fs');
const path = require('path');
const getCssFile = (file) => (
fs.readFileSync(path.normalize(`${__dirname}/../../css/${file}.css`), 'utf8')
)
module.exports = getCssFile;
| javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/helpers/createLinkForID.js | docs/modules/helpers/createLinkForID.js | const createLinkForID = (str) => (
str.toLowerCase().split(' ').join('-')
)
module.exports = createLinkForID;
| javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/helpers/deleteAllIconsInDescription.js | docs/modules/helpers/deleteAllIconsInDescription.js | const deleteAllIconsInDescription = ({ document }) => {
const toolDescription = document.querySelectorAll('.tool__description p img');
toolDescription.forEach((image) => image.parentNode.removeChild(image));
}
module.exports = deleteAllIconsInDescription;
| javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/helpers/removeAllImages.js | docs/modules/helpers/removeAllImages.js | const removeAllImages = ({ document }) => {
for (let i= document.images.length; i-->0;)
document.images[i].parentNode.removeChild(document.images[i]);
}
module.exports = removeAllImages;
| javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/view/promotionBanner.js | docs/modules/view/promotionBanner.js | const PromotionBanner = (modifier) => `
<a class="promotion-banner ${modifier.className}" href="${modifier.link.href}">
<div class="promotion-banner__logo ${modifier.logo}">
${
modifier.hasImage ? `
<img src="https://flawlessapp.io/images/designtools/porkbun/po... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/config/tools.js | docs/modules/config/tools.js | const {
favicon196,
favicon160,
favicon152,
favicon144,
favicon120,
favicon114,
favicon96,
favicon76,
favicon72,
favicon60,
favicon57,
favicon32,
favicon16,
} = require('../favicon/favicon-adt');
const CONFIG = {
markdownFile: `./README.md`,
index: `./docs/index.h... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/config/plugins.js | docs/modules/config/plugins.js | const {
favicon196,
favicon160,
favicon152,
favicon144,
favicon120,
favicon114,
favicon96,
favicon76,
favicon72,
favicon60,
favicon57,
favicon32,
favicon16,
} = require('../favicon/favicon-adp');
const CONFIG = {
markdownFile: `./Awesome-Design-Plugins.md`,
ind... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
goabstract/Awesome-Design-Tools | https://github.com/goabstract/Awesome-Design-Tools/blob/dc60e63c248c44acb42f09fb0c985b77b5fe4bf5/docs/modules/config/ui-kits.js | docs/modules/config/ui-kits.js | const {
favicon196,
favicon160,
favicon152,
favicon144,
favicon120,
favicon114,
favicon96,
favicon76,
favicon72,
favicon60,
favicon57,
favicon32,
favicon16,
} = require('../favicon/favicon-adk');
const CONFIG = {
markdownFile: `./Awesome-Design-UI-Kits.md`,
ind... | javascript | MIT | dc60e63c248c44acb42f09fb0c985b77b5fe4bf5 | 2026-01-04T14:59:39.810021Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/babel.config.js | babel.config.js | module.exports = function (api) {
api.cache(true);
const noModules = String(process.env.BABEL_NO_MODULES) === 'true';
const rename = {};
const mangle = require('./mangle.json');
for (let prop in mangle.props.props) {
let name = prop;
if (name[0] === '$') {
name = name.slice(1);
}
rename[name] = mangl... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/vitest.setup.js | vitest.setup.js | import { expect, describe } from 'vitest';
globalThis.context = describe;
window.addEventListener('error', () => {});
// Something that's loaded before this file polyfills Symbol object.
// We need to verify that it works in IE without that.
if (/Trident/.test(window.navigator.userAgent)) {
window.Symbol = undefine... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/sizereport.config.js | sizereport.config.js | module.exports = {
repo: 'preactjs/preact',
path: ['./{compat,debug,hooks,}/dist/**/!(*.map)'],
branch: 'main'
};
| javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/scripts/release/create-gh-release.js | scripts/release/create-gh-release.js | /**
* @typedef {import('@octokit/openapi-types').components["schemas"]["release"]} Release
*
* @typedef Params
* @property {ReturnType<typeof import("@actions/github").getOctokit>} github
* @property {typeof import("@actions/github").context} context
*
* @param {Params} params
* @returns {Promise<Release>}
*/
... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/scripts/release/upload-gh-asset.js | scripts/release/upload-gh-asset.js | /**
* @typedef {import('@octokit/openapi-types').components["schemas"]["release"]} Release
*
* @typedef Params
* @property {typeof require} require
* @property {ReturnType<typeof import("@actions/github").getOctokit>} github
* @property {typeof import("@actions/github").context} context
* @property {typeof impor... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/jsx-dev-runtime.js | compat/jsx-dev-runtime.js | require('preact/compat');
module.exports = require('preact/jsx-runtime');
| javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/jsx-runtime.js | compat/jsx-runtime.js | require('preact/compat');
module.exports = require('preact/jsx-runtime');
| javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/server.browser.js | compat/server.browser.js | import { renderToString } from 'preact-render-to-string';
export {
renderToString,
renderToString as renderToStaticMarkup
} from 'preact-render-to-string';
export default {
renderToString,
renderToStaticMarkup: renderToString
};
| javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/scheduler.js | compat/scheduler.js | // see scheduler.mjs
function unstable_runWithPriority(priority, callback) {
return callback();
}
module.exports = {
unstable_ImmediatePriority: 1,
unstable_UserBlockingPriority: 2,
unstable_NormalPriority: 3,
unstable_LowPriority: 4,
unstable_IdlePriority: 5,
unstable_runWithPriority,
unstable_now: performan... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/client.js | compat/client.js | const { render, hydrate, unmountComponentAtNode } = require('preact/compat');
function createRoot(container) {
return {
// eslint-disable-next-line
render: function (children) {
render(children, container);
},
// eslint-disable-next-line
unmount: function () {
unmountComponentAtNode(container);
}
}... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test-utils.js | compat/test-utils.js | module.exports = require('preact/test-utils');
| javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/server.js | compat/server.js | /* eslint-disable */
var renderToString;
try {
const mod = require('preact-render-to-string');
renderToString = mod.default || mod.renderToString || mod;
} catch (e) {
throw Error(
'renderToString() error: missing "preact-render-to-string" dependency.'
);
}
var renderToReadableStream;
try {
const mod = require(... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/src/Children.js | compat/src/Children.js | import { toChildArray } from 'preact';
const mapFn = (children, fn, context) => {
if (children == null) return null;
return toChildArray(toChildArray(children).map(fn.bind(context)));
};
// This API is completely unnecessary for Preact, so it's basically passthrough.
export const Children = {
map: mapFn,
forEach:... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/src/forwardRef.js | compat/src/forwardRef.js | import { assign } from './util';
export const REACT_FORWARD_SYMBOL = Symbol.for('react.forward_ref');
/**
* Pass ref down to a child. This is mainly used in libraries with HOCs that
* wrap components. Using `forwardRef` there is an easy way to get a reference
* of the wrapped component instead of one of the wrappe... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/src/PureComponent.js | compat/src/PureComponent.js | import { Component } from 'preact';
import { shallowDiffers } from './util';
/**
* Component class with a predefined `shouldComponentUpdate` implementation
*/
export function PureComponent(p, c) {
this.props = p;
this.context = c;
}
PureComponent.prototype = new Component();
// Some third-party libraries check if ... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/src/index.js | compat/src/index.js | import {
createElement,
render as preactRender,
cloneElement as preactCloneElement,
createRef,
Component,
createContext,
Fragment
} from 'preact';
import {
useState,
useId,
useReducer,
useEffect,
useLayoutEffect,
useRef,
useImperativeHandle,
useMemo,
useCallback,
useContext,
useDebugValue
} from 'prea... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/src/memo.js | compat/src/memo.js | import { createElement } from 'preact';
import { shallowDiffers } from './util';
/**
* Memoize a component, so that it only updates when the props actually have
* changed. This was previously known as `React.pure`.
* @param {import('./internal').FunctionComponent} c functional component
* @param {(prev: object, ne... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/src/suspense.js | compat/src/suspense.js | import { Component, createElement, options, Fragment } from 'preact';
import {
MODE_HYDRATE,
FORCE_PROPS_REVALIDATE,
COMPONENT_FORCE
} from '../../src/constants';
import { assign } from './util';
const oldCatchError = options._catchError;
options._catchError = function (error, newVNode, oldVNode, errorInfo) {
if (... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/src/portals.js | compat/src/portals.js | import { createElement, render } from 'preact';
/**
* @param {import('../../src/index').RenderableProps<{ context: any }>} props
*/
function ContextProvider(props) {
this.getChildContext = () => props.context;
return props.children;
}
/**
* Portal component
* @this {import('./internal').Component}
* @param {ob... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/src/hooks.js | compat/src/hooks.js | import { useState, useLayoutEffect, useEffect } from 'preact/hooks';
/**
* This is taken from https://github.com/facebook/react/blob/main/packages/use-sync-external-store/src/useSyncExternalStoreShimClient.js#L84
* on a high level this cuts out the warnings, ... and attempts a smaller implementation
* @typedef {{ _... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/src/render.js | compat/src/render.js | import {
render as preactRender,
hydrate as preactHydrate,
options,
toChildArray,
Component
} from 'preact';
import {
useCallback,
useContext,
useDebugValue,
useEffect,
useId,
useImperativeHandle,
useLayoutEffect,
useMemo,
useReducer,
useRef,
useState
} from 'preact/hooks';
import {
useDeferredValue,
... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/src/util.js | compat/src/util.js | export const assign = Object.assign;
/**
* Check if two objects have a different shape
* @param {object} a
* @param {object} b
* @returns {boolean}
*/
export function shallowDiffers(a, b) {
for (let i in a) if (i !== '__source' && !(i in b)) return true;
for (let i in b) if (i !== '__source' && a[i] !== b[i]) r... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/createElement.test.jsx | compat/test/browser/createElement.test.jsx | import { createElement, render } from 'preact/compat';
import { setupScratch, teardown } from '../../../test/_util/helpers';
import { getSymbol } from './testUtils';
describe('compat createElement()', () => {
/** @type {HTMLDivElement} */
let scratch;
beforeEach(() => {
scratch = setupScratch();
});
afterEach... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/suspense-utils.js | compat/test/browser/suspense-utils.js | import React, { Component, lazy } from 'preact/compat';
import { vi } from 'vitest';
const h = React.createElement;
/**
* Create a Lazy component whose promise is controlled by by the test. This
* function returns 3 values: The Lazy component to render, a `resolve`
* function, and a `reject` function. Call `resolv... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/unmountComponentAtNode.test.jsx | compat/test/browser/unmountComponentAtNode.test.jsx | import React, { createElement, unmountComponentAtNode } from 'preact/compat';
import { setupScratch, teardown } from '../../../test/_util/helpers';
describe('unmountComponentAtNode', () => {
/** @type {HTMLDivElement} */
let scratch;
beforeEach(() => {
scratch = setupScratch();
});
afterEach(() => {
teardow... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/unstable_batchedUpdates.test.js | compat/test/browser/unstable_batchedUpdates.test.js | import { unstable_batchedUpdates } from 'preact/compat';
describe('unstable_batchedUpdates', () => {
it('should execute & return cb', () => {
expect(unstable_batchedUpdates(() => false)).to.equal(false);
expect(unstable_batchedUpdates(arg => arg, true)).to.equal(true);
});
});
| javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/Children.test.jsx | compat/test/browser/Children.test.jsx | import {
setupScratch,
teardown,
serializeHtml
} from '../../../test/_util/helpers';
import { div, span } from '../../../test/_util/dom';
import React, { createElement, Children, render } from 'preact/compat';
import { vi } from 'vitest';
describe('Children', () => {
/** @type {HTMLDivElement} */
let scratch;
b... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/textarea.test.jsx | compat/test/browser/textarea.test.jsx | import React, { createElement, render, hydrate, useState } from 'preact/compat';
import ReactDOMServer from 'preact/compat/server';
import { setupScratch, teardown } from '../../../test/_util/helpers';
import { act } from 'preact/test-utils';
describe('Textarea', () => {
/** @type {HTMLElement} */
let scratch;
bef... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/useSyncExternalStore.test.jsx | compat/test/browser/useSyncExternalStore.test.jsx | import React, {
createElement,
Fragment,
useSyncExternalStore,
render,
useState,
useCallback,
useEffect,
useLayoutEffect
} from 'preact/compat';
import { setupRerender, act } from 'preact/test-utils';
import { setupScratch, teardown } from '../../../test/_util/helpers';
import { vi } from 'vitest';
const React... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/events.test.jsx | compat/test/browser/events.test.jsx | import { render } from 'preact';
import {
setupScratch,
teardown,
createEvent,
supportsPassiveEvents
} from '../../../test/_util/helpers';
import { createElement } from 'preact/compat';
import { vi } from 'vitest';
describe('preact/compat events', () => {
/** @type {HTMLDivElement} */
let scratch;
let proto;
... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/svg.test.jsx | compat/test/browser/svg.test.jsx | import React, { createElement } from 'preact/compat';
import {
setupScratch,
teardown,
serializeHtml,
sortAttributes
} from '../../../test/_util/helpers';
describe('svg', () => {
/** @type {HTMLDivElement} */
let scratch;
beforeEach(() => {
scratch = setupScratch();
});
afterEach(() => {
teardown(scratc... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/context.test.jsx | compat/test/browser/context.test.jsx | import { setupRerender } from 'preact/test-utils';
import { setupScratch, teardown } from '../../../test/_util/helpers';
import {
render,
createElement,
Fragment,
createContext,
Component,
useState,
useContext
} from 'preact/compat';
describe('components', () => {
/** @type {HTMLDivElement} */
let scratch;
... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/isValidElement.test.js | compat/test/browser/isValidElement.test.js | import { createElement as preactCreateElement } from 'preact';
import React, { isValidElement } from 'preact/compat';
describe('isValidElement', () => {
it('should check return false for invalid arguments', () => {
expect(isValidElement(null)).to.equal(false);
expect(isValidElement(false)).to.equal(false);
expe... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/scheduler.test.js | compat/test/browser/scheduler.test.js | import {
unstable_runWithPriority,
unstable_NormalPriority,
unstable_LowPriority,
unstable_IdlePriority,
unstable_UserBlockingPriority,
unstable_ImmediatePriority,
unstable_now
} from 'preact/compat/scheduler';
import { vi } from 'vitest';
describe('scheduler', () => {
describe('runWithPriority', () => {
it(... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/forwardRef.test.jsx | compat/test/browser/forwardRef.test.jsx | import {
createElement,
render,
createRef,
forwardRef,
hydrate,
memo,
useState,
useRef,
useImperativeHandle,
createPortal,
Component
} from 'preact/compat';
import { setupScratch, teardown } from '../../../test/_util/helpers';
import { setupRerender, act } from 'preact/test-utils';
import { getSymbol } from ... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/hydrate.test.jsx | compat/test/browser/hydrate.test.jsx | import { createElement, hydrate } from 'preact/compat';
import { setupScratch, teardown } from '../../../test/_util/helpers';
import { vi } from 'vitest';
describe('compat hydrate', () => {
/** @type {HTMLDivElement} */
let scratch;
beforeEach(() => {
scratch = setupScratch();
});
afterEach(() => {
teardown... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/portals.test.jsx | compat/test/browser/portals.test.jsx | import React, {
createElement,
render,
createPortal,
useState,
Component,
useEffect,
Fragment,
useId
} from 'preact/compat';
import { setupScratch, teardown } from '../../../test/_util/helpers';
import { setupRerender, act } from 'preact/test-utils';
import { expect } from 'chai';
import { vi } from 'vitest';
... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/memo.test.jsx | compat/test/browser/memo.test.jsx | import { setupRerender } from 'preact/test-utils';
import {
createEvent,
setupScratch,
teardown
} from '../../../test/_util/helpers';
import React, {
createElement,
Component,
render,
memo,
useState
} from 'preact/compat';
import { vi, expect } from 'vitest';
const h = React.createElement;
describe('memo()', ... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/findDOMNode.test.jsx | compat/test/browser/findDOMNode.test.jsx | import React, { createElement, findDOMNode } from 'preact/compat';
import { setupScratch, teardown } from '../../../test/_util/helpers';
describe('findDOMNode()', () => {
/** @type {HTMLDivElement} */
let scratch;
class Helper extends React.Component {
render({ something }) {
if (something == null) return nul... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/component.test.jsx | compat/test/browser/component.test.jsx | import { setupRerender } from 'preact/test-utils';
import { setupScratch, teardown } from '../../../test/_util/helpers';
import React, { createElement, Component, createRef } from 'preact/compat';
import { vi } from 'vitest';
describe('components', () => {
/** @type {HTMLDivElement} */
let scratch;
/** @type {() =... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/cloneElement.test.jsx | compat/test/browser/cloneElement.test.jsx | import { createElement as preactH } from 'preact';
import { createElement, render, cloneElement } from 'preact/compat';
import { setupScratch, teardown } from '../../../test/_util/helpers';
describe('compat cloneElement', () => {
/** @type {HTMLDivElement} */
let scratch;
beforeEach(() => {
scratch = setupScratc... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/exports.test.js | compat/test/browser/exports.test.js | import Compat from 'preact/compat';
import CompatClient from 'preact/compat/client';
// eslint-disable-next-line no-duplicate-imports
import * as Named from 'preact/compat';
// eslint-disable-next-line no-duplicate-imports
import * as NamedClient from 'preact/compat/client';
describe('compat exports', () => {
describ... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/render.test.jsx | compat/test/browser/render.test.jsx | import React, {
createElement,
render,
Component,
hydrate,
createContext
} from 'preact/compat';
import { setupRerender, act } from 'preact/test-utils';
import {
setupScratch,
teardown,
serializeHtml,
createEvent,
sortAttributes
} from '../../../test/_util/helpers';
import { vi } from 'vitest';
describe('com... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/suspense.test.jsx | compat/test/browser/suspense.test.jsx | import { act, setupRerender } from 'preact/test-utils';
import React, {
createElement,
render,
Component,
Suspense,
lazy,
Fragment,
createContext,
useState,
useEffect,
useLayoutEffect,
memo
} from 'preact/compat';
import { setupScratch, teardown } from '../../../test/_util/helpers';
import { createLazy, crea... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | true |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/isFragment.test.js | compat/test/browser/isFragment.test.js | import { createElement as preactCreateElement, Fragment } from 'preact';
import React, { isFragment } from 'preact/compat';
describe('isFragment', () => {
it('should check return false for invalid arguments', () => {
expect(isFragment(null)).to.equal(false);
expect(isFragment(false)).to.equal(false);
expect(isF... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/suspense-hydration.test.jsx | compat/test/browser/suspense-hydration.test.jsx | import { setupRerender } from 'preact/test-utils';
import React, {
createElement,
hydrate,
Fragment,
Suspense,
memo,
useState
} from 'preact/compat';
import { logCall, getLog, clearLog } from '../../../test/_util/logCall';
import {
createEvent,
setupScratch,
teardown
} from '../../../test/_util/helpers';
impor... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/isMemo.test.jsx | compat/test/browser/isMemo.test.jsx | import { createElement as preactCreateElement, Fragment } from 'preact';
import React, { createElement, isMemo, memo } from 'preact/compat';
describe('isMemo', () => {
it('should check return false for invalid arguments', () => {
expect(isMemo(null)).to.equal(false);
expect(isMemo(false)).to.equal(false);
expec... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/select.test.jsx | compat/test/browser/select.test.jsx | import { setupScratch, teardown } from '../../../test/_util/helpers';
import { createElement, render } from 'preact/compat';
describe('Select', () => {
let scratch;
beforeEach(() => {
scratch = setupScratch();
});
afterEach(() => {
teardown(scratch);
});
it('should work with multiple selected (array of va... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
preactjs/preact | https://github.com/preactjs/preact/blob/bf7a195ac4b1706468e876e41b27428e3d8a08f3/compat/test/browser/createFactory.test.jsx | compat/test/browser/createFactory.test.jsx | import { render, createElement, createFactory } from 'preact/compat';
import { setupScratch, teardown } from '../../../test/_util/helpers';
describe('createFactory', () => {
/** @type {HTMLDivElement} */
let scratch;
beforeEach(() => {
scratch = setupScratch();
});
afterEach(() => {
teardown(scratch);
});
... | javascript | MIT | bf7a195ac4b1706468e876e41b27428e3d8a08f3 | 2026-01-04T14:59:51.617528Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.