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
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/src/core/laytpl.js
src/core/laytpl.js
/** * laytpl * 轻量级通用模板引擎 */ // 实例接口 var thisModule = function () { var that = this; var options = that.config; return { config: options, /** * 渲染模板 * @param {Object} data - 模板数据 * @param {Function} callback - 回调函数 * @returns {string} 渲染后的模板 */ render: function (data, cal...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/src/core/i18n.js
src/core/i18n.js
/** * i18n * 国际化 */ import { layui } from './layui.js'; import { lay } from './lay.js'; var hint = layui.hint(); // var MOD_NAME = 'i18n'; // 识别预先可能定义的指定全局对象 var GLOBAL = window.LAYUI_GLOBAL || {}; // 简体中文 var zhCN = { code: { copy: '复制代码', copied: '已复制', copyError: '复制失败', maximize: '最大化显示', ...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/src/core/component.js
src/core/component.js
/** * component * Layui 2 组件构建器 */ import { layui } from './layui.js'; import { lay } from './lay.js'; import $ from 'jquery'; // export export function component(settings) { // 默认设置 settings = $.extend( true, { isDeepReload: false, // 是否默认为深度重载 }, settings, ); // 组件名 var MOD_NAME ...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/src/core/layui.js
src/core/layui.js
/** * Layui * MIT Licensed */ // 便于打包时的字符压缩 var document = window.document; var location = window.location; // 基础配置 var config = { timeout: 10, // 符合规范的模块请求最长等待秒数 debug: false, // 是否开启调试模式 version: false, // 是否在模块请求时加入版本号参数(以更新模块缓存) }; // 模块加载缓存信息 var cache = { modules: {}, // 模块物理路径 status: {}, // 模块加载...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/tests/visual/assets/i18n/zh-HK.js
tests/visual/assets/i18n/zh-HK.js
/** * 繁體中文 (zh-HK) */ export default { code: { copy: '複製代碼', copied: '已複製', copyError: '複製失敗', maximize: '最大化顯示', restore: '還原顯示', preview: '在新視窗預覽', }, colorpicker: { clear: '清除', confirm: '確定', }, dropdown: { noData: '暫無資料', }, flow: { loadMore: '載入更多', noM...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/tests/visual/assets/i18n/en.js
tests/visual/assets/i18n/en.js
/** * English (en) */ // Common English internationalization message object export default { code: { copy: 'Copy Code', copied: 'Copied', copyError: 'Copy Failed', maximize: 'Maximize', restore: 'Restore', preview: 'Preview in New Window', }, colorpicker: { clear: 'Clear', confi...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/tests/visual/assets/i18n/fr.js
tests/visual/assets/i18n/fr.js
/** * Français (fr) */ export default { code: { copy: 'Copier le code', copied: 'Copié', copyError: 'Échec de la copie', maximize: 'Afficher en plein écran', restore: 'Restaurer l’affichage', preview: 'Aperçu dans une nouvelle fenêtre', }, colorpicker: { clear: 'Effacer', confir...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/tests/visual/assets/modules/extends/mod2.js
tests/visual/assets/modules/extends/mod2.js
/** 扩展模块,只依赖内置模块 **/ layui.define((exports) => { console.log('mod2.js'); exports('mod2', { name: 'mod2', }); });
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/tests/visual/assets/modules/extends/index.js
tests/visual/assets/modules/extends/index.js
layui.define((exports) => { exports('index', { title: 'index 扩展模块', }); });
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/tests/visual/assets/modules/extends/test.js
tests/visual/assets/modules/extends/test.js
/** * test */ layui.define((exports) => { exports('test', { title: 'test 扩展模块', }); });
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/tests/visual/assets/modules/extends/mod1.js
tests/visual/assets/modules/extends/mod1.js
/** 扩展模块,且依赖 mod2 **/ layui.define('mod2', (exports) => { var $ = layui.jquery; console.log(layui.mod2, layui.layer, layui.form); exports('mod1', { name: 'mod1', }); });
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/tests/visual/assets/modules/extends/test/test2.js
tests/visual/assets/modules/extends/test/test2.js
/** * test2 */ layui.define((exports) => { exports('test2', { title: 'test2 扩展模块', }); });
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/tests/visual/assets/modules/extends/test/test1.js
tests/visual/assets/modules/extends/test/test1.js
/** * test1 */ layui.define((exports) => { exports('test1', { title: 'test1 扩展模块', }); });
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/tests/visual/assets/modules/test/test.js
tests/visual/assets/modules/test/test.js
/** * test * Layui 可视化简易单元测试 */ const { lay, code: layCode } = layui; class Test { constructor(options) { lay.extend(this.options, options); this.#init(); this.#render(); } static stats = { total: 0, passes: 0, failures: 0, }; options = { elem: '#root', sideWidth: '160px...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/tests/visual/assets/dist/layui.esm.js
tests/visual/assets/dist/layui.esm.js
/** * Layui * MIT Licensed */ // 便于打包时的字符压缩 var document$2 = window.document; var location$1 = window.location; // 基础配置 var config$3 = { timeout: 10, // 符合规范的模块请求最长等待秒数 debug: false, // 是否开启调试模式 version: false // 是否在模块请求时加入版本号参数(以更新模块缓存) }; // 模块加载缓存信息 var cache$1 = { modules: {}, // 模块物理路径 status...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
true
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/tests/visual/assets/dist/layui.js
tests/visual/assets/dist/layui.js
var layui = (function () { 'use strict'; /** * Layui * MIT Licensed */ // 便于打包时的字符压缩 var document$2 = window.document; var location$1 = window.location; // 基础配置 var config$3 = { timeout: 10, // 符合规范的模块请求最长等待秒数 debug: false, // 是否开启调试模式 version: false // 是否在模块请求时加入版本号参数(以更新模...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
true
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/tests/visual/template/pr-preview/index.js
tests/visual/template/pr-preview/index.js
layui.use(() => { var $ = layui.$; var layer = layui.layer; layer.msg(layui.v); });
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/tests/unit/core.test.js
tests/unit/core.test.js
/** * Core Unit Tests */ // 单元测试将在 Layui 3 开发接近完成阶段完善 describe('Test Demo', () => { test('Hello, Layui!', () => { const greet = (name) => `Hello, ${name}!`; expect(greet('Layui')).toBe('Hello, Layui!'); expect(greet('World')).toBe('Hello, World!'); }); });
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/layui.esm.js
dist/layui.esm.js
/** 3.0.0-alpha.1 | MIT Licensed */var e,t=window.document,n=window.location,i={timeout:10,debug:!1,version:!1},a={modules:{},status:{},event:{},callback:{}},r=function(){this.v="3.0.0-alpha.1"},o=window.LAYUI_GLOBAL||{},l=(e=t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()?t.currentScript.src:function...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
true
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/index.js
dist/index.js
export { layui } from './core/layui.js'; export { lay } from './core/lay.js'; export { laytpl } from './core/laytpl.js'; export { i18n } from './core/i18n.js'; export { default as $, default as jquery } from 'jquery'; export { component, component as componentBuilder } from './core/component.js'; export { laypage } fro...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/layui.js
dist/layui.js
/** 3.0.0-alpha.1 | MIT Licensed */var layui=function(){"use strict";var e,t=window.document,n=window.location,i={timeout:10,debug:!1,version:!1},a={modules:{},status:{},event:{},callback:{}},r=function(){this.v="3.0.0-alpha.1"},o=window.LAYUI_GLOBAL||{},l=(e=t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperC...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
true
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/tree.js
dist/components/tree.js
import { layui } from '../core/layui.js'; import { lay } from '../core/lay.js'; import { i18n } from '../core/i18n.js'; import $ from 'jquery'; import { component as component$1 } from '../core/component.js'; import { layer } from './layer.js'; import { form } from './form.js'; /** * tree 树组件 */ // 创建组件 var compon...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/breadcrumb.js
dist/components/breadcrumb.js
import $ from 'jquery'; import { component as component$1 } from '../core/component.js'; /** * breadcrumb * 面包屑导航组件 */ // 创建组件 var component = component$1({ name: 'breadcrumb', // 组件名 // 默认配置 config: { elem: '.layui-breadcrumb' }, render: function () { var that = this; var options = that....
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/tabs.js
dist/components/tabs.js
import { layui } from '../core/layui.js'; import $ from 'jquery'; import { component as component$1 } from '../core/component.js'; /** * tabs * 标签页组件 */ // 创建组件 var component = component$1({ name: 'tabs', // 组件名 // 默认配置 config: { elem: '.layui-tabs', trigger: 'click', // 标签切换的触发事件 headerM...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/tab.js
dist/components/tab.js
import { layui } from '../core/layui.js'; import $ from 'jquery'; import { component as component$1 } from '../core/component.js'; /** * tab * 选项卡组件(已被 tabs 平替,仅为兼容保留) */ var SUPER_MOD_NAME = 'element'; // 所属的超级模块名,确保向下兼容 // 创建组件 var component = component$1({ name: 'tab', // 组件名 // 默认配置 config: { ele...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/form.js
dist/components/form.js
import { layui } from '../core/layui.js'; import { lay } from '../core/lay.js'; import { i18n } from '../core/i18n.js'; import $ from 'jquery'; import { util } from './util.js'; import { layer } from './layer.js'; /** * form 表单组件 */ var hint = layui.hint(); // var device = layui.device(); var MOD_NAME = 'form'; va...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
true
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/nav.js
dist/components/nav.js
import { layui } from '../core/layui.js'; import $ from 'jquery'; import { component as component$1 } from '../core/component.js'; /** * nav * 导航菜单组件 */ var device = layui.device(); var SUPER_MOD_NAME = 'element'; // 所属的超级模块名,确保向下兼容 // 创建组件 var component = component$1({ name: 'nav', // 组件名 // 默认配置 config...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/progress.js
dist/components/progress.js
import $ from 'jquery'; import { component as component$1 } from '../core/component.js'; /** * progress * 进度条组件 */ // 创建组件 var component = component$1({ name: 'progress', // 组件名 // 默认配置 config: { elem: '.layui-progress' }, CONST: { ELEM: 'layui-progress' }, render: function () { var t...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/slider.js
dist/components/slider.js
import { lay } from '../core/lay.js'; import $ from 'jquery'; import { component as component$1 } from '../core/component.js'; /** * slider 滑块组件 */ var component = component$1({ name: 'slider', config: { type: 'default', // 滑块类型,垂直:vertical min: 0, // 最小值 max: 100, // 最大值,默认100 value...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/treeTable.js
dist/components/treeTable.js
import { layui } from '../core/layui.js'; import $ from 'jquery'; import { form } from './form.js'; import { table } from './table.js'; /** * layui.treeTable * 树表组件 */ var hint = layui.hint(); // api var treeTable = { config: {}, // 事件 on: table.on, // 遍历字段 eachCols: table.eachCols, index: table.index...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
true
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/carousel.js
dist/components/carousel.js
import { layui } from '../core/layui.js'; import { lay } from '../core/lay.js'; import $ from 'jquery'; import { component as component$1 } from '../core/component.js'; /** * carousel * 轮播 */ // 创建组件 var component = component$1({ name: 'carousel', // 默认配置 config: { width: '600px', height: '280px', ...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/upload.js
dist/components/upload.js
import { layui } from '../core/layui.js'; import { lay } from '../core/lay.js'; import { i18n } from '../core/i18n.js'; import $ from 'jquery'; import { layer } from './layer.js'; /** * upload * 上传组件 */ var device = layui.device(); var hint = layui.hint(); // 模块名 var MOD_NAME = 'upload'; var MOD_INDEX = 'layui_' ...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/element.js
dist/components/element.js
import { layui } from '../core/layui.js'; import $ from 'jquery'; import { component as component$1 } from '../core/component.js'; import { tab as component$3 } from './tab.js'; import { nav as component$6 } from './nav.js'; import { breadcrumb as component$5 } from './breadcrumb.js'; import { progress as component$2 }...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/rate.js
dist/components/rate.js
import { lay } from '../core/lay.js'; import $ from 'jquery'; import { component as component$1 } from '../core/component.js'; /** * rate * 评分组件 */ // 创建组件 var component = component$1({ name: 'rate', // 默认配置 config: { length: 5, // 评分的最大长度值 value: 0, // 评分的初始值 half: false, // 是否可以选择半...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/table.js
dist/components/table.js
import { layui } from '../core/layui.js'; import { lay } from '../core/lay.js'; import { i18n } from '../core/i18n.js'; import $ from 'jquery'; import { laytpl } from '../core/laytpl.js'; import { laypage } from './laypage.js'; import { util } from './util.js'; import { layer } from './layer.js'; import { form } from '...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
true
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/transfer.js
dist/components/transfer.js
import { layui } from '../core/layui.js'; import { i18n } from '../core/i18n.js'; import $ from 'jquery'; import { component as component$1 } from '../core/component.js'; import { laytpl } from '../core/laytpl.js'; import { form } from './form.js'; /** * transfer * 穿梭框组件 */ var component = component$1({ name: 't...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/dropdown.js
dist/components/dropdown.js
import { layui } from '../core/layui.js'; import { lay } from '../core/lay.js'; import { i18n } from '../core/i18n.js'; import $ from 'jquery'; import { laytpl } from '../core/laytpl.js'; import { util } from './util.js'; /** * dropdown * 下拉菜单组件 */ var device = layui.device(); var clickOrMousedown = device.mobile ...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/laypage.js
dist/components/laypage.js
import { layui } from '../core/layui.js'; import { lay } from '../core/lay.js'; import { i18n } from '../core/i18n.js'; /** * laypage 分页组件 */ var doc = document; var id = 'getElementById'; var tag = 'getElementsByTagName'; // 字符常量 // var MOD_NAME = 'laypage'; var DISABLED = 'layui-disabled'; // 构造器 var Class = fu...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/laydate.js
dist/components/laydate.js
import { layui } from '../core/layui.js'; import { lay } from '../core/lay.js'; import { i18n } from '../core/i18n.js'; /** * laydate * 日期与时间组件 */ // 模块名 var MOD_NAME = 'laydate'; var MOD_ID = 'lay-' + MOD_NAME + '-id'; // 已渲染过的索引标记名 var zhCN = 'zh-CN'; // 简体中文语言码 var YearBeforeMonthLocale = ['eu-ES', 'ja-JP', 'k...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
true
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/colorpicker.js
dist/components/colorpicker.js
import { layui } from '../core/layui.js'; import { lay } from '../core/lay.js'; import { i18n } from '../core/i18n.js'; import $ from 'jquery'; import { component as component$1 } from '../core/component.js'; /** * colorpicker * 颜色选择组件 */ var device = layui.device(); var clickOrMousedown = device.mobile ? 'click' ...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/flow.js
dist/components/flow.js
import { layui } from '../core/layui.js'; import { i18n } from '../core/i18n.js'; import $ from 'jquery'; import { component as component$1 } from '../core/component.js'; /** * flow * 流加载组件 */ // 创建组件 var component = component$1({ name: 'flow', CONST: { ELEM_LOAD: '<i class="layui-anim layui-anim-rotate l...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/layer.js
dist/components/layer.js
import { layui } from '../core/layui.js'; import { lay } from '../core/lay.js'; import { i18n } from '../core/i18n.js'; import $ from 'jquery'; /** * layer * 通用 Web 弹出层组件 */ var win; var ready = { config: { removeFocus: true }, end: {}, beforeEnd: {}, events: { resize: {} }, minStackIndex: 0,...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
true
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/util.js
dist/components/util.js
import { layui } from '../core/layui.js'; import { lay } from '../core/lay.js'; import { i18n } from '../core/i18n.js'; import $ from 'jquery'; /** * util 工具组件 */ var hint = layui.hint(); // 引用自 dayjs // https://github.com/iamkun/dayjs/blob/v1.11.9/src/constant.js#L30 var REGEX_FORMAT = /\[([^\]]+)]|y{1,4}|M{1,2}|...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/code.js
dist/components/code.js
import { layui } from '../core/layui.js'; import { lay } from '../core/lay.js'; import { i18n } from '../core/i18n.js'; import $ from 'jquery'; import { util } from './util.js'; import { element as component } from './element.js'; import { layer } from './layer.js'; import { form } from './form.js'; import { tabs as co...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/components/collapse.js
dist/components/collapse.js
import { layui } from '../core/layui.js'; import $ from 'jquery'; import { component as component$1 } from '../core/component.js'; /** * collapse * 折叠面板组件 */ var SUPER_MOD_NAME = 'element'; // 所属的超级模块名,确保向下兼容 // 创建组件 var component = component$1({ name: 'collapse', // 组件名 // 默认配置 config: { elem: '.lay...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/core/lay.js
dist/core/lay.js
import { layui } from './layui.js'; /** * lay * 基础模块 */ var document = window.document; /** * 元素查找 * @param {string | HTMLElement | JQuery} selector */ var lay = function (selector) { return new Class(selector); }; // 构造器 var Class = function (selector) { var that = this; var elem = typeof selector === ...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
true
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/core/laytpl.js
dist/core/laytpl.js
/** * laytpl * 轻量级通用模板引擎 */ // 实例接口 var thisModule = function () { var that = this; var options = that.config; return { config: options, /** * 渲染模板 * @param {Object} data - 模板数据 * @param {Function} callback - 回调函数 * @returns {string} 渲染后的模板 */ render: function (data, callb...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/core/i18n.js
dist/core/i18n.js
import { layui } from './layui.js'; import { lay } from './lay.js'; /** * i18n * 国际化 */ var hint = layui.hint(); // var MOD_NAME = 'i18n'; // 识别预先可能定义的指定全局对象 var GLOBAL = window.LAYUI_GLOBAL || {}; // 简体中文 var zhCN = { code: { copy: '复制代码', copied: '已复制', copyError: '复制失败', maximize: '最大化显示', ...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/core/component.js
dist/core/component.js
import { layui } from './layui.js'; import { lay } from './lay.js'; import $ from 'jquery'; /** * component * Layui 2 组件构建器 */ // export function component(settings) { // 默认设置 settings = $.extend(true, { isDeepReload: false // 是否默认为深度重载 }, settings); // 组件名 var MOD_NAME = settings.name; var MOD_I...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
layui/layui
https://github.com/layui/layui/blob/abdb748b5cc792c394fbdf56daa2727af1846488/dist/core/layui.js
dist/core/layui.js
/** * Layui * MIT Licensed */ // 便于打包时的字符压缩 var document = window.document; var location = window.location; // 基础配置 var config = { timeout: 10, // 符合规范的模块请求最长等待秒数 debug: false, // 是否开启调试模式 version: false // 是否在模块请求时加入版本号参数(以更新模块缓存) }; // 模块加载缓存信息 var cache = { modules: {}, // 模块物理路径 status: {}, ...
javascript
MIT
abdb748b5cc792c394fbdf56daa2727af1846488
2026-01-04T15:01:36.946040Z
false
standard/standard
https://github.com/standard/standard/blob/753309b21bfd7c98e208e3fb45910ffd1bb95409/index.js
index.js
/*! standard. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ import { StandardEngine } from 'standard-engine' import options from './lib/options.js' export default new StandardEngine(options)
javascript
MIT
753309b21bfd7c98e208e3fb45910ffd1bb95409
2026-01-04T15:01:55.160608Z
false
standard/standard
https://github.com/standard/standard/blob/753309b21bfd7c98e208e3fb45910ffd1bb95409/tools/test-exists.js
tools/test-exists.js
/** * Sanity check that all repos in test.json actually exist on GitHub */ import { readFileSync } from 'node:fs' import get from 'simple-get' import series from 'run-series' const testPkgs = JSON.parse(readFileSync(new URL('../test/external/test.json', import.meta.url), 'utf8')) series(testPkgs.map(function (pkg)...
javascript
MIT
753309b21bfd7c98e208e3fb45910ffd1bb95409
2026-01-04T15:01:55.160608Z
false
standard/standard
https://github.com/standard/standard/blob/753309b21bfd7c98e208e3fb45910ffd1bb95409/test/validate-config.js
test/validate-config.js
import test from 'tape' import standard from '../index.js' test('load config in eslint to validate all rule syntax is correct', async function (t) { t.plan(1) const code = 'const foo = 1\nconst bar = function () {}\nbar(foo)\n' const [result] = await standard.lintText(code) t.equal(result.errorCount, 0) }) te...
javascript
MIT
753309b21bfd7c98e208e3fb45910ffd1bb95409
2026-01-04T15:01:55.160608Z
false
standard/standard
https://github.com/standard/standard/blob/753309b21bfd7c98e208e3fb45910ffd1bb95409/test/cmd.js
test/cmd.js
import { fileURLToPath } from 'node:url' import test from 'tape' import crossSpawn from 'cross-spawn' const CMD_PATH = fileURLToPath(new URL('../bin/cmd.cjs', import.meta.url)) test('command line usage: --help', t => { t.plan(1) const child = crossSpawn(CMD_PATH, ['--help']) child.on('error', err => { t.fa...
javascript
MIT
753309b21bfd7c98e208e3fb45910ffd1bb95409
2026-01-04T15:01:55.160608Z
false
standard/standard
https://github.com/standard/standard/blob/753309b21bfd7c98e208e3fb45910ffd1bb95409/test/api.js
test/api.js
import test from 'tape' import standard from '../index.js' test('api: lintFiles', async (t) => { t.plan(2) const [result] = await standard.lintFiles(['bin/cmd.cjs']) t.equal(typeof result, 'object', 'result is an object') t.equal(result.errorCount, 0) }) test('api: lintText', async (t) => { t.plan(2) cons...
javascript
MIT
753309b21bfd7c98e208e3fb45910ffd1bb95409
2026-01-04T15:01:55.160608Z
false
standard/standard
https://github.com/standard/standard/blob/753309b21bfd7c98e208e3fb45910ffd1bb95409/test/external/clone.js
test/external/clone.js
/** * Clones several projects that are known to follow "JavaScript Standard Style" and runs * the `standard` style checker to verify that it passes without warnings. This helps * ensure we don't accidentally introduce new style rules that cause previously "good" * code to start failing with new warnings! (And if we...
javascript
MIT
753309b21bfd7c98e208e3fb45910ffd1bb95409
2026-01-04T15:01:55.160608Z
false
standard/standard
https://github.com/standard/standard/blob/753309b21bfd7c98e208e3fb45910ffd1bb95409/lib/cli.js
lib/cli.js
import { cli } from 'standard-engine' import options from './options.js' cli(options)
javascript
MIT
753309b21bfd7c98e208e3fb45910ffd1bb95409
2026-01-04T15:01:55.160608Z
false
standard/standard
https://github.com/standard/standard/blob/753309b21bfd7c98e208e3fb45910ffd1bb95409/lib/options.js
lib/options.js
import { readFileSync } from 'node:fs' import { fileURLToPath } from 'node:url' import eslint from 'eslint' // eslintConfig.overrideConfigFile have problem reading URLs and file:/// const overrideConfigFile = fileURLToPath(new URL('../eslintrc.json', import.meta.url)) const pkgURL = new URL('../package.json', import.m...
javascript
MIT
753309b21bfd7c98e208e3fb45910ffd1bb95409
2026-01-04T15:01:55.160608Z
false
elsewhencode/project-guidelines
https://github.com/elsewhencode/project-guidelines/blob/87c9014ec4f96f8469984538ec5c6601e6f09e7e/configWithTest.sample.js
configWithTest.sample.js
const joi = require('joi') const envVarsSchema = joi.object({ NODE_ENV: joi.string() .valid(['development', 'production', 'test', 'provision']) .required(), PORT: joi.number() .required(), LOGGER_LEVEL: joi.string() .valid(['error', 'warn', 'info', 'verbose', 'debug', 'silly']) .default('in...
javascript
MIT
87c9014ec4f96f8469984538ec5c6601e6f09e7e
2026-01-04T15:01:51.833624Z
false
elsewhencode/project-guidelines
https://github.com/elsewhencode/project-guidelines/blob/87c9014ec4f96f8469984538ec5c6601e6f09e7e/config.sample.js
config.sample.js
// required environment variables [ 'NODE_ENV', 'PORT' ].forEach((name) => { if (!process.env[name]) { throw new Error(`Environment variable ${name} is missing`) } }) const config = { env: process.env.NODE_ENV, logger: { level: process.env.LOG_LEVEL || 'info', enabled: process.env.BOOLEAN ? p...
javascript
MIT
87c9014ec4f96f8469984538ec5c6601e6f09e7e
2026-01-04T15:01:51.833624Z
false
gchq/CyberChef
https://github.com/gchq/CyberChef/blob/2a1294f1c089bb8e68d38d1803d08858907f352a/postcss.config.js
postcss.config.js
module.exports = { plugins: [ require("postcss-import"), require("autoprefixer"), require("postcss-css-variables")({ preserve: true }), ] };
javascript
Apache-2.0
2a1294f1c089bb8e68d38d1803d08858907f352a
2026-01-04T15:00:39.182885Z
false
gchq/CyberChef
https://github.com/gchq/CyberChef/blob/2a1294f1c089bb8e68d38d1803d08858907f352a/babel.config.js
babel.config.js
module.exports = function(api) { api.cache.forever(); return { "presets": [ ["@babel/preset-env", { "modules": false, "useBuiltIns": "entry", "corejs": 3 }] ], "plugins": [ "dynamic-import-node", ...
javascript
Apache-2.0
2a1294f1c089bb8e68d38d1803d08858907f352a
2026-01-04T15:00:39.182885Z
false
gchq/CyberChef
https://github.com/gchq/CyberChef/blob/2a1294f1c089bb8e68d38d1803d08858907f352a/Gruntfile.js
Gruntfile.js
"use strict"; const webpack = require("webpack"); const HtmlWebpackPlugin = require("html-webpack-plugin"); const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin; const glob = require("glob"); const path = require("path"); const nodeFlags = "--experimental-modules --experimental-json-mo...
javascript
Apache-2.0
2a1294f1c089bb8e68d38d1803d08858907f352a
2026-01-04T15:00:39.182885Z
false
gchq/CyberChef
https://github.com/gchq/CyberChef/blob/2a1294f1c089bb8e68d38d1803d08858907f352a/webpack.config.js
webpack.config.js
const webpack = require("webpack"); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const CompressionPlugin = require("compression-webpack-plugin"); const CopyWebpackPlugin = require("copy-webpack-plugin"); const { ModifySourcePlugin, ReplaceOperation } = require("modify-source-webpack-plugin"); const ...
javascript
Apache-2.0
2a1294f1c089bb8e68d38d1803d08858907f352a
2026-01-04T15:00:39.182885Z
false
gchq/CyberChef
https://github.com/gchq/CyberChef/blob/2a1294f1c089bb8e68d38d1803d08858907f352a/src/node/wrapper.js
src/node/wrapper.js
/** * Export the main ESM module as CommonJS * * * @author d98762656 [d98762625@gmail.com] * @copyright Crown Copyright 2019 * @license Apache-2.0 */ module.exports = (async () => await import("./index.mjs"))(); module.exports.File = (async () => await import("./File.mjs"))();
javascript
Apache-2.0
2a1294f1c089bb8e68d38d1803d08858907f352a
2026-01-04T15:00:39.182885Z
false
gchq/CyberChef
https://github.com/gchq/CyberChef/blob/2a1294f1c089bb8e68d38d1803d08858907f352a/src/core/ChefWorker.js
src/core/ChefWorker.js
/** * Web Worker to handle communications between the front-end and the core. * * @author n1474335 [n1474335@gmail.com] * @copyright Crown Copyright 2017 * @license Apache-2.0 */ import Chef from "./Chef.mjs"; import OperationConfig from "./config/OperationConfig.json" assert {type: "json"}; import OpModules fro...
javascript
Apache-2.0
2a1294f1c089bb8e68d38d1803d08858907f352a
2026-01-04T15:00:39.182885Z
false
gchq/CyberChef
https://github.com/gchq/CyberChef/blob/2a1294f1c089bb8e68d38d1803d08858907f352a/src/web/index.js
src/web/index.js
/** * @author n1474335 [n1474335@gmail.com] * @copyright Crown Copyright 2016 * @license Apache-2.0 */ // Styles import "./stylesheets/index.js"; // Libs import "arrive"; import "snackbarjs"; import "bootstrap-material-design/js/index"; import "bootstrap-colorpicker"; import moment from "moment-timezone"; import ...
javascript
Apache-2.0
2a1294f1c089bb8e68d38d1803d08858907f352a
2026-01-04T15:00:39.182885Z
false
gchq/CyberChef
https://github.com/gchq/CyberChef/blob/2a1294f1c089bb8e68d38d1803d08858907f352a/src/web/workers/LoaderWorker.js
src/web/workers/LoaderWorker.js
/** * Web Worker to load large amounts of data without locking up the UI. * * @author n1474335 [n1474335@gmail.com] * @copyright Crown Copyright 2017 * @license Apache-2.0 */ import loglevelMessagePrefix from "loglevel-message-prefix"; loglevelMessagePrefix(log, { prefixes: [], staticPrefixes: ["LoaderW...
javascript
Apache-2.0
2a1294f1c089bb8e68d38d1803d08858907f352a
2026-01-04T15:00:39.182885Z
false
gchq/CyberChef
https://github.com/gchq/CyberChef/blob/2a1294f1c089bb8e68d38d1803d08858907f352a/src/web/stylesheets/index.js
src/web/stylesheets/index.js
/** * Styles index * * @author n1474335 [n1474335@gmail.com] * @copyright Crown Copyright 2017 * @license Apache-2.0 */ /* Libraries */ import "highlight.js/styles/vs.css"; /* Frameworks */ import "bootstrap-material-design/dist/css/bootstrap-material-design.css"; import "bootstrap-colorpicker/dist/css/bootstra...
javascript
Apache-2.0
2a1294f1c089bb8e68d38d1803d08858907f352a
2026-01-04T15:00:39.182885Z
false
gchq/CyberChef
https://github.com/gchq/CyberChef/blob/2a1294f1c089bb8e68d38d1803d08858907f352a/tests/node/consumers/cjs-consumer.js
tests/node/consumers/cjs-consumer.js
/** * Tests to ensure that a consuming app can use CJS require * * @author d98762625 [d98762625@gmail.com] * @copyright Crown Copyright 2019 * @license Apache-2.0 */ const assert = require("assert"); require("cyberchef").then(chef => { const d = chef.bake("Testing, 1 2 3", [ chef.toHex, che...
javascript
Apache-2.0
2a1294f1c089bb8e68d38d1803d08858907f352a
2026-01-04T15:00:39.182885Z
false
gchq/CyberChef
https://github.com/gchq/CyberChef/blob/2a1294f1c089bb8e68d38d1803d08858907f352a/tests/browser/00_nightwatch.js
tests/browser/00_nightwatch.js
/** * Tests to ensure that the app loads correctly in a reasonable time and that operations can be run. * * @author n1474335 [n1474335@gmail.com] * @copyright Crown Copyright 2018 * @license Apache-2.0 */ const utils = require("./browserUtils.js"); module.exports = { before: browser => { browser ...
javascript
Apache-2.0
2a1294f1c089bb8e68d38d1803d08858907f352a
2026-01-04T15:00:39.182885Z
false
gchq/CyberChef
https://github.com/gchq/CyberChef/blob/2a1294f1c089bb8e68d38d1803d08858907f352a/tests/browser/01_io.js
tests/browser/01_io.js
/** * Tests for input and output of various types to ensure the editors work as expected * and retain data integrity, especially when it comes to special characters. * * @author n1474335 [n1474335@gmail.com] * @copyright Crown Copyright 2023 * @license Apache-2.0 */ // import { // clear, // utils.setInp...
javascript
Apache-2.0
2a1294f1c089bb8e68d38d1803d08858907f352a
2026-01-04T15:00:39.182885Z
true
gchq/CyberChef
https://github.com/gchq/CyberChef/blob/2a1294f1c089bb8e68d38d1803d08858907f352a/tests/browser/browserUtils.js
tests/browser/browserUtils.js
/** * Utility functions for browser tests. * * @author n1474335 [n1474335@gmail.com] * @copyright Crown Copyright 2023 * @license Apache-2.0 */ /** @function * Clears the recipe and input * * @param {Browser} browser - Nightwatch client */ function clear(browser) { browser .useCss() .clic...
javascript
Apache-2.0
2a1294f1c089bb8e68d38d1803d08858907f352a
2026-01-04T15:00:39.182885Z
false
gchq/CyberChef
https://github.com/gchq/CyberChef/blob/2a1294f1c089bb8e68d38d1803d08858907f352a/tests/browser/02_ops.js
tests/browser/02_ops.js
/** * Tests for operations. * The primary purpose for these test is to ensure that the operations * output something vaguely expected (i.e. they aren't completely broken * after a dependency update or changes to the UI), rather than to confirm * that this output is actually accurate. Accuracy of output and testing...
javascript
Apache-2.0
2a1294f1c089bb8e68d38d1803d08858907f352a
2026-01-04T15:00:39.182885Z
true
kenwheeler/slick
https://github.com/kenwheeler/slick/blob/ecb6ea2345650a5769e81aee46bec10504ac2a36/slick/slick.min.js
slick/slick.min.js
(function(n){"use strict";typeof define=="function"&&define.amd?define(["jquery"],n):typeof module=="object"&&module.exports?module.exports=function(r,e){return e===void 0&&(typeof window<"u"?e=require("jquery"):e=require("jquery")(r)),n(e),e}:n(jQuery)})(function(n){"use strict";var r=window.Slick||{};r=(function(){va...
javascript
MIT
ecb6ea2345650a5769e81aee46bec10504ac2a36
2026-01-04T15:02:03.341171Z
true
kenwheeler/slick
https://github.com/kenwheeler/slick/blob/ecb6ea2345650a5769e81aee46bec10504ac2a36/slick/slick.js
slick/slick.js
/* _ _ _ _ ___| (_) ___| | __ (_)___ / __| | |/ __| |/ / | / __| \__ \ | | (__| < _ | \__ \ |___/_|_|\___|_|\_(_)/ |___/ |__/ Version: 1.8.1 Author: Ken Wheeler Website: http://kenwheeler.github.io Docs: http://kenwheeler.github.io/slick Repo: http://github.com/kenwh...
javascript
MIT
ecb6ea2345650a5769e81aee46bec10504ac2a36
2026-01-04T15:02:03.341171Z
true
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/index.js
index.js
/*! webtorrent. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */ import EventEmitter from 'events' import path from 'path' import createTorrent, { parseInput } from 'create-torrent' import debugFactory from 'debug' import { Client as DHT } from 'bittorrent-dht' // browser exclude import loadIPSet from ...
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/scripts/browser.webpack.js
scripts/browser.webpack.js
import webpack from 'webpack' import TerserPlugin from 'terser-webpack-plugin' import info from '../package.json' assert { type: 'json' } /** @type {import('webpack').Configuration} */ export default { entry: './index.js', devtool: 'source-map', resolve: { aliasFields: ['browser'], alias: { ...info...
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/scripts/browser-serve.js
scripts/browser-serve.js
import serve from 'serve-static' import finalhandler from 'finalhandler' import { createServer } from 'http' createServer((req, res) => { serve('./dist/')(req, res, finalhandler(req, res)) }).listen(process.env.AIRTAP_SUPPORT_PORT)
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/scripts/chromeapp.webpack.js
scripts/chromeapp.webpack.js
import webpack from 'webpack' import TerserPlugin from 'terser-webpack-plugin' import info from '../package.json' assert { type: 'json' } /** @type {import('webpack').Configuration} */ export default { entry: './index.js', devtool: 'source-map', resolve: { aliasFields: ['chromeapp'], alias: { ...in...
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/scripts/worker.webpack.js
scripts/worker.webpack.js
/** @type {import('webpack').Configuration} */ export default { entry: './lib/worker.js', devtool: 'source-map', output: { filename: 'sw.min.js' }, mode: 'production', target: 'web' }
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/polyfills/process-fast.js
polyfills/process-fast.js
/*! * Fast node `require('process')` for modern browsers * * @author Mathias Rasmussen <mathiasvr@gmail.com> * @license MIT */ import queueMicrotask from 'queue-microtask' const title = 'browser' const browser = true const env = {} const argv = [] const version = '' const versions = {} function noop () {} co...
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/polyfills/inflate-sync-web.js
polyfills/inflate-sync-web.js
import { inflate } from 'pako' export const inflateSync = (buffer) => inflate(buffer, { to: 'string' })
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/test/iterator.js
test/iterator.js
import fixtures from 'webtorrent-fixtures' import test from 'tape' import FileIterator from '../lib/file-iterator.js' import WebTorrent from '../index.js' test('file iterator: use chunk store iterator if done', t => { t.plan(8) const client = new WebTorrent({ dht: false, tracker: false, lsd: false, natUpnp: false...
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/test/torrent-destroy.js
test/torrent-destroy.js
import fixtures from 'webtorrent-fixtures' import test from 'tape' import WebTorrent from '../index.js' test('torrent.destroy: destroy and remove torrent', t => { t.plan(5) const client = new WebTorrent({ dht: false, tracker: false, lsd: false, natUpnp: false, natPmp: false }) client.on('error', err => { t.fai...
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/test/swarm.js
test/swarm.js
// var randombytes from 'randombytes') // var Swarm from '../lib/swarm') // var test from 'tape') // var infoHash = 'd2474e86c95b19b8bcfdb92bc12c9d44667cfa36' // var infoHash2 = 'd2474e86c95b19b8bcfdb92bc12c9d44667cfa37' // var peerId = Buffer.from('-WW0001-' + randombytes(6).toString('hex'), 'utf8').toString('hex') /...
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/test/client-add.js
test/client-add.js
import fixtures from 'webtorrent-fixtures' import test from 'tape' import WebTorrent from '../index.js' test('client.add: magnet uri, utf-8 string', t => { t.plan(6) const client = new WebTorrent({ dht: false, tracker: false, lsd: false, natUpnp: false, natPmp: false }) client.on('error', err => { t.fail(err) ...
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/test/duplicate.js
test/duplicate.js
import fixtures from 'webtorrent-fixtures' import test from 'tape' import WebTorrent from '../index.js' test('client.seed followed by duplicate client.add (sync)', t => { t.plan(6) const client = new WebTorrent({ dht: false, tracker: false, lsd: false, natUpnp: false, natPmp: false }) client.on('error', err => ...
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/test/client-add-duplicate-trackers.js
test/client-add-duplicate-trackers.js
import fixtures from 'webtorrent-fixtures' import test from 'tape' import WebTorrent from '../index.js' test('client.add: duplicate trackers', t => { t.plan(3) const client = new WebTorrent({ dht: false, tracker: false, lsd: false, natUpnp: false, natPmp: false }) client.on('error', err => { t.fail(err) }) c...
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/test/bitfield.js
test/bitfield.js
import fixtures from 'webtorrent-fixtures' import test from 'tape' import WebTorrent from '../index.js' test('preloaded bitfield: load files into filesystem', t => { t.plan(2) const client = new WebTorrent({ dht: false, utp: false, tracker: false, lsd: false, natUpnp: false, natPmp: false }) client.on('error',...
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/test/common.js
test/common.js
import os from 'os' import fs from 'fs' import path from 'path' const getDownloadPath = (infix, infoHash) => { let tmpPath try { tmpPath = path.join(fs.statSync('/tmp') && '/tmp') } catch (err) { tmpPath = path.join(typeof os.tmpdir === 'function' ? os.tmpdir() : '/') } return path.join(tmpPath, 'web...
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/test/client-seed.js
test/client-seed.js
import fixtures from 'webtorrent-fixtures' import test from 'tape' import WebTorrent from '../index.js' test('client.seed: torrent file (Buffer)', t => { t.plan(6) const client = new WebTorrent({ dht: false, tracker: false, lsd: false, natUpnp: false, natPmp: false }) client.on('error', err => { t.fail(err) })...
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/test/rarity-map.js
test/rarity-map.js
import fixtures from 'webtorrent-fixtures' import randombytes from 'randombytes' import test from 'tape' import Wire from 'bittorrent-protocol' import Torrent from '../lib/torrent.js' test('Rarity map usage', t => { t.plan(16) const numPieces = 4 const torrentId = Object.assign({}, fixtures.numbers.parsedTorren...
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/test/file-buffer.js
test/file-buffer.js
import fixtures from 'webtorrent-fixtures' import test from 'tape' import WebTorrent from '../index.js' test('file buffer: use chunk store iterator if done', t => { t.plan(8) const client = new WebTorrent({ dht: false, tracker: false, lsd: false, natUpnp: false, natPmp: false }) client.on('error', err => { t.f...
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/test/client-remove.js
test/client-remove.js
import fixtures from 'webtorrent-fixtures' import test from 'tape' import WebTorrent from '../index.js' test('client.remove: remove by Torrent object', t => { t.plan(5) const client = new WebTorrent({ dht: false, tracker: false, lsd: false, natUpnp: false, natPmp: false }) client.on('error', err => { t.fail(er...
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/test/selections.js
test/selections.js
import { Selections, isCoveringExisting, isInsideExisting, isLowerIntersecting, isUpperIntersecting } from '../lib/selections.js' import test from 'tape' const testCases = { isLowerIntersecting: { fn: isLowerIntersecting, cases: [ { newItem: { from: 8, to: 12 }, existing: { from: 1, to: 10 }, expectedR...
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/test/client-destroy.js
test/client-destroy.js
import fixtures from 'webtorrent-fixtures' import test from 'tape' import WebTorrent from '../index.js' test('after client.destroy(), throw on client.add() or client.seed()', t => { t.plan(3) const client = new WebTorrent({ dht: false, tracker: false, lsd: false, natUpnp: false, natPmp: false }) client.on('err...
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/test/node/blocklist-tracker.js
test/node/blocklist-tracker.js
import fixtures from 'webtorrent-fixtures' import series from 'run-series' import test from 'tape' import { Server as TrackerServer } from 'bittorrent-tracker' import WebTorrent from '../../index.js' import common from '../common.js' test('blocklist blocks peers discovered via tracker', t => { t.plan(9) const par...
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/test/node/client-deselect.js
test/node/client-deselect.js
import fixtures from 'webtorrent-fixtures' import MemoryChunkStore from 'memory-chunk-store' import test from 'tape' import WebTorrent from '../../index.js' function setupClient ({ t, onTorrent, onIdle, addTorrentProps = {} }) { const client1 = new WebTorrent({ dht: false, tracker: false, lsd: false, utp: false }) ...
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false
webtorrent/webtorrent
https://github.com/webtorrent/webtorrent/blob/fd8f39e1560c5ae5db6b12153077877f0f33b076/test/node/basic.js
test/node/basic.js
import fs from 'fs' import path from 'path' import http from 'http' import fixtures from 'webtorrent-fixtures' import test from 'tape' import WebTorrent from '../../index.js' test('WebTorrent.WEBRTC_SUPPORT', t => { t.plan(2) const client = new WebTorrent({ dht: false, tracker: false, lsd: false, natUpnp: false, ...
javascript
MIT
fd8f39e1560c5ae5db6b12153077877f0f33b076
2026-01-04T15:01:34.127209Z
false