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 |
|---|---|---|---|---|---|---|---|---|
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/source/InfiniteLoader/InfiniteLoader.js | source/InfiniteLoader/InfiniteLoader.js | /** @flow */
import * as React from 'react';
import PropTypes from 'prop-types';
import createCallbackMemoizer from '../utils/createCallbackMemoizer';
/**
* Higher-order component that manages lazy-loading for "infinite" data.
* This component decorates a virtual component and just-in-time prefetches rows as a user ... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/source/InfiniteLoader/InfiniteLoader.example.js | source/InfiniteLoader/InfiniteLoader.example.js | /** @flow */
import * as React from 'react';
import PropTypes from 'prop-types';
import {
ContentBox,
ContentBoxHeader,
ContentBoxParagraph,
} from '../demo/ContentBox';
import Immutable from 'immutable';
import AutoSizer from '../AutoSizer';
import InfiniteLoader from './InfiniteLoader';
import List from '../Lis... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/source/demo/Application.js | source/demo/Application.js | import Immutable from 'immutable';
import PropTypes from 'prop-types';
import * as React from 'react';
import {Redirect} from 'react-router';
import {HashRouter, Route} from 'react-router-dom';
import ComponentLink from './ComponentLink';
import styles from './Application.css';
import NavLink from './NavLink';
import ... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/source/demo/index.js | source/demo/index.js | // IE 10+ compatibility for demo (must come before other imports)
import '@babel/polyfill';
// Import react-virtualized styles as part of bootstrap process
import '../styles.css';
import * as React from 'react';
import {render} from 'react-dom';
import Application from './Application';
render(<Application />, docum... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/source/demo/Icon.js | source/demo/Icon.js | import clsx from 'clsx';
import PropTypes from 'prop-types';
import * as React from 'react';
import styles from './Icon.css';
// TODO: Remove unused BURGER and ARROW_LEFT?
// TODO: Rotate ARROW_UP to create ARROW_DOWN
export const TYPES = {
COMPONENTS: 'COMPONENTS',
DOCUMENTATION: 'DOCUMENTATION',
ISSUES: 'ISSUE... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/source/demo/NavLink.js | source/demo/NavLink.js | import * as React from 'react';
import {NavLink as RRNavLink} from 'react-router-dom';
import Icon from './Icon';
import styles from './NavLink.css';
export default function NavLink({children, href, iconType, to}) {
let link;
let icon;
if (iconType) {
icon = <Icon className={styles.Icon} type={iconType} />;... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/source/demo/LabeledInput.js | source/demo/LabeledInput.js | import PropTypes from 'prop-types';
import * as React from 'react';
import clsx from 'clsx';
import styles from './LabeledInput.css';
export function LabeledInput({
disabled,
label,
name,
onChange,
placeholder,
value,
}) {
const labelClassName = clsx(styles.Label, {
[styles.LabelDisabled]: disabled,
... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/source/demo/ContentBox.js | source/demo/ContentBox.js | import * as React from 'react';
import clsx from 'clsx';
import styles from './ContentBox.css';
export function ContentBox({className, children, style}) {
return (
<div className={clsx(styles.ContentBox, className)} style={style}>
{children}
</div>
);
}
export function ContentBoxHeader({text, source... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/source/demo/ComponentLink.js | source/demo/ComponentLink.js | import * as React from 'react';
import {NavLink} from 'react-router-dom';
import styles from './ComponentLink.css';
export default function ComponentLink({children, to}) {
return (
<li className={styles.NavListItem}>
<NavLink
activeClassName={styles.ActiveComponentLink}
className={styles.Co... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/source/demo/utils.js | source/demo/utils.js | /**
* Generate random data for use in examples.
*/
export function generateRandomList() {
const list = [];
for (var i = 0; i < 1000; i++) {
const random = loremIpsum[i % loremIpsum.length];
const randoms = [random];
for (let j = Math.round(Math.random() * 10); j--; ) {
randoms.push(loremIpsum[... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/source/demo/Wizard/index.js | source/demo/Wizard/index.js | /** @flow */
import Wizard from './Wizard';
export default Wizard;
export {Wizard};
| javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/source/demo/Wizard/Wizard.js | source/demo/Wizard/Wizard.js | import clsx from 'clsx';
import CodeMirror from 'react-codemirror';
import * as React from 'react';
import {ContentBox, ContentBoxHeader} from '../ContentBox';
import generate from './Generator';
import styles from './Wizard.css';
require('codemirror/mode/jsx/jsx');
const codeMirrorOptions = {
mode: 'jsx',
theme:... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/source/demo/Wizard/Generator.js | source/demo/Wizard/Generator.js | export default function Generator({
cellsHaveKnownHeight,
cellsHaveKnownWidth,
cellsHaveUniformHeight,
cellsHaveUniformWidth,
collectionHasFixedHeight,
collectionHasFixedWidth,
doNotVirtualizeColumns,
hasMultipleColumns,
hasMultipleRows,
nonCheckerboardPattern,
}) {
if (!hasMultipleColumns && !has... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/playground/hover.js | playground/hover.js | var App = React.createClass({
getInitialState: function() {
return {};
},
render: function() {
var cellRenderer = this._cellRenderer;
return React.createElement(
ReactVirtualized.AutoSizer,
{
ref: 'AutoSizer',
},
function(params) {
return React.createElement(R... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/playground/tree.js | playground/tree.js | var ROW_HEIGHT = 20;
var RANDOM_WORDS = [
'abstrusity',
'advertisable',
'bellwood',
'benzole',
'boreum',
'brenda',
'cassiopeian',
'chansonnier',
'cleric',
'conclusional',
'conventicle',
'copalm',
'cornopion',
'crossbar',
'disputative',
'djilas',
'ebracteate',
'ephemerally',
'epidem... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/playground/grid.js | playground/grid.js | var REACT_VIRTUALIZED_BANNER =
'https://cloud.githubusercontent.com/assets/29597/11737732/0ca1e55e-9f91-11e5-97f3-098f2f8ed866.png';
function getColumnWidth(params) {
switch (params.index % 3) {
case 0:
return 65;
case 1:
return 65;
case 2:
return 100;
}
}
function cellRenderer(par... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/playground/chat.js | playground/chat.js | var cache = new ReactVirtualized.CellMeasurerCache({
fixedWidth: true,
});
var list;
var mostRecentWidth;
function rowRenderer(params) {
var datum = chatHistory[params.index];
return React.createElement(
ReactVirtualized.CellMeasurer,
{
cache: cache,
columnIndex: 0,
key: params.key,
... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/playground/chat-no-resize.js | playground/chat-no-resize.js | var cache = new ReactVirtualized.CellMeasurerCache({
fixedWidth: true,
});
var list;
var mostRecentWidth;
function rowRenderer(params) {
var datum = chatHistory[params.index];
return React.createElement(
ReactVirtualized.CellMeasurer,
{
cache: cache,
columnIndex: 0,
key: params.key,
... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/playground/render-counters.js | playground/render-counters.js | const {PureComponent} = React;
const {AutoSizer, List} = ReactVirtualized;
class ListExample extends PureComponent {
render() {
return React.createElement(AutoSizer, null, ({height, width}) =>
React.createElement(List, {
height: height,
overscanRowCount: 0,
rowCount: 1000,
r... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/playground/tests.js | playground/tests.js | function createScrollingTestCase(component) {
var scrollDown = getUrlParam('direction') !== 'up';
return function testCase(completedCallback) {
component.scrollTop = scrollDown ? 0 : component.scrollHeight;
var maxScrollTop = component.scrollHeight;
var interval = 1;
var scrollTop = component.scr... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/playground/table.js | playground/table.js | const NUM_COLUMNS = 40;
function rowGetter(params) {
return new Array(NUM_COLUMNS).fill('').map(function(_, index) {
return index;
});
}
var App = React.createClass({
render: function() {
const flexColumns = [];
for (var i = 0; i < NUM_COLUMNS; i++) {
flexColumns.push(
React.createEle... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/playground/grid-test.js | playground/grid-test.js | function cellRenderer(params) {
return React.createElement(
'div',
{
className: 'item',
key: params.key,
style: params.style,
},
params.columnIndex,
);
}
var App = React.createClass({
render: function() {
return React.createElement(ReactVirtualized.AutoSizer, null, function(... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/playground/helper.js | playground/helper.js | function loadStyle(source, callback) {
var link = document.createElement('link');
link.setAttribute('rel', 'stylesheet');
link.setAttribute('href', source);
link.onload = callback;
document.head.appendChild(link);
}
function loadScript(source) {
var script = document.createElement('script');
script.setAt... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/playground/utils.js | playground/utils.js | function getUrlParams() {
var search = window.location.search;
return search.length
? search
.substr(1)
.split('&')
.reduce(function(reduced, value) {
var matches = value.split('=');
reduced[matches[0]] = matches[1];
return reduced;
}, {})
: {};... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
bvaughn/react-virtualized | https://github.com/bvaughn/react-virtualized/blob/c737715486f724586aee8870ebea1e9efb7b0bfe/playground/scroll-sync.js | playground/scroll-sync.js | function cellRenderer(params) {
return React.createElement(
'div',
{
className: 'item',
key: params.key,
style: params.style,
},
params.columnIndex,
);
}
var App = React.createClass({
render: function() {
return React.createElement(ReactVirtualized.AutoSizer, null, function(... | javascript | MIT | c737715486f724586aee8870ebea1e9efb7b0bfe | 2026-01-04T15:03:00.053082Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/.eslintrc.js | .eslintrc.js | module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: 'eslint:recommended',
overrides: [
{
env: {
node: true,
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script',
},
},
],
parserOptions: {
ecma... | javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/commitlint.config.js | commitlint.config.js | module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'scope-case': [0],
'subject-case': [2, 'always', 'sentence-case'],
'header-max-length': [0],
},
};
| javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/webpack.config.js | webpack.config.js | const path = require('path');
module.exports = {
entry: ['core-js/es/array/from', path.resolve(__dirname, 'src/index.js')],
output: {
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'umd',
library: 'feather',
// Prevents webpack from referencing `window` in the UMD build
// Source: https:... | javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/src/icon.js | src/icon.js | import classnames from 'classnames/dedupe';
import DEFAULT_ATTRS from './default-attrs.json';
class Icon {
constructor(name, contents, tags = []) {
this.name = name;
this.contents = contents;
this.tags = tags;
this.attrs = {
...DEFAULT_ATTRS,
...{ class: `feather feather-${name}` },
... | javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/src/index.js | src/index.js | import icons from './icons';
import toSvg from './to-svg';
import replace from './replace';
module.exports = { icons, toSvg, replace };
| javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/src/to-svg.js | src/to-svg.js | import icons from './icons';
/**
* Create an SVG string.
* @deprecated
* @param {string} name
* @param {Object} attrs
* @returns {string}
*/
function toSvg(name, attrs = {}) {
console.warn(
'feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead.',
);
if (!name) {
throw new ... | javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/src/icons.js | src/icons.js | import Icon from './icon';
import icons from '../dist/icons.json';
import tags from './tags.json';
export default Object.keys(icons)
.map(key => new Icon(key, icons[key], tags[key]))
.reduce((object, icon) => {
object[icon.name] = icon;
return object;
}, {});
| javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/src/replace.js | src/replace.js | /* eslint-env browser */
import classnames from 'classnames/dedupe';
import icons from './icons';
/**
* Replace all HTML elements that have a `data-feather` attribute with SVG markup
* corresponding to the element's `data-feather` attribute value.
* @param {Object} attrs
*/
function replace(attrs = {}) {
if (ty... | javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/src/__tests__/icons.test.js | src/__tests__/icons.test.js | /* eslint-env jest */
import icons from '../icons';
jest.mock('../../dist/icons.json', () => ({
icon1:
'<line x1="23" y1="1" x2="1" y2="23" /><line x1="1" y1="1" x2="23" y2="23" />',
icon2: '<circle cx="12" cy="12" r="11" />',
}));
jest.mock('../tags.json', () => ({
icon1: ['foo', 'bar', 'hello', 'world'],
... | javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/src/__tests__/icon.test.js | src/__tests__/icon.test.js | /* eslint-env jest */
import Icon from '../icon';
const icon1 = new Icon(
'test',
'<line x1="23" y1="1" x2="1" y2="23" /><line x1="1" y1="1" x2="23" y2="23" />',
['hello', 'world', 'foo', 'bar'],
);
const icon2 = new Icon(
'test',
'<line x1="23" y1="1" x2="1" y2="23" /><line x1="1" y1="1" x2="23" y2="23" />... | javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/src/__tests__/index.test.js | src/__tests__/index.test.js | /* eslint-env jest */
import feather from '../index';
test('has correct properties', () => {
expect(feather).toHaveProperty('icons');
expect(feather).toHaveProperty('toSvg');
expect(feather).toHaveProperty('replace');
});
| javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/src/__tests__/replace.node.test.js | src/__tests__/replace.node.test.js | /**
* @jest-environment node
*/
/* eslint-env jest */
import replace from '../replace';
test('throws an error when run in node environment', () => {
expect(replace).toThrowErrorMatchingSnapshot();
});
| javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/src/__tests__/replace.test.js | src/__tests__/replace.test.js | /* eslint-env jest, browser */
import replace from '../replace';
jest.mock('../../dist/icons.json', () => ({
icon1:
'<line x1="23" y1="1" x2="1" y2="23" /><line x1="1" y1="1" x2="23" y2="23" />',
icon2: '<circle cx="12" cy="12" r="11" />',
}));
test('replaces [data-feather] elements with SVG markup', () => {
... | javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/src/__tests__/to-svg.test.js | src/__tests__/to-svg.test.js | /* eslint-env jest */
import toSvg from '../to-svg';
jest.mock('../../dist/icons.json', () => ({
icon1:
'<line x1="23" y1="1" x2="1" y2="23" /><line x1="1" y1="1" x2="23" y2="23" />',
}));
test('returns correct string', () => {
expect(toSvg('icon1')).toMatchSnapshot();
expect(toSvg('icon1', { 'stroke-width'... | javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/bin/build-sprite-string.js | bin/build-sprite-string.js | import DEFAULT_ATTRS from '../src/default-attrs.json';
/**
* Build an SVG sprite string containing SVG symbols.
* @param {Object} icons
* @returns {string}
*/
function buildSpriteString(icons) {
const symbols = Object.keys(icons)
.map(icon => toSvgSymbol(icon, icons[icon]))
.join('');
return `<svg xml... | javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/bin/build-icons-object.js | bin/build-icons-object.js | import path from 'path';
import cheerio from 'cheerio';
import { minify } from 'html-minifier';
/**
* Build an object in the format: `{ <name>: <contents> }`.
* @param {string[]} svgFiles - A list of filenames.
* @param {Function} getSvg - A function that returns the contents of an SVG file given a filename.
* @re... | javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/bin/build-svgs.js | bin/build-svgs.js | import fs from 'fs';
import path from 'path';
import icons from '../src/icons';
const OUT_DIR = path.resolve(__dirname, '../dist/icons');
console.log(`Building SVGs in ${OUT_DIR}...`);
Object.keys(icons).forEach(name => {
const svg = icons[name].toSvg();
fs.writeFileSync(path.join(OUT_DIR, `${name}.svg`), svg);... | javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/bin/optimize-svgs.js | bin/optimize-svgs.js | import fs from 'fs';
import path from 'path';
import optimizeSvg from './optimize-svg';
const IN_DIR = path.resolve(__dirname, '../icons');
console.log(`Optimizing SVGs in ${IN_DIR}...`);
fs.readdirSync(IN_DIR)
.filter(file => path.extname(file) === '.svg')
.forEach(svgFile => {
const svg = fs.readFileSync(... | javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/bin/build-icons-json.js | bin/build-icons-json.js | import fs from 'fs';
import path from 'path';
import buildIconsObject from './build-icons-object';
const IN_DIR = path.resolve(__dirname, '../icons');
const OUT_FILE = path.resolve(__dirname, '../dist/icons.json');
console.log(`Building ${OUT_FILE}...`);
const svgFiles = fs
.readdirSync(IN_DIR)
.filter(file => ... | javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/bin/optimize-svg.js | bin/optimize-svg.js | import Svgo from 'svgo';
import cheerio from 'cheerio';
import DEFAULT_ATTRS from '../src/default-attrs.json';
/**
* Optimize SVG string.
* @param {string} svg - An SVG string.
* @returns {Promise<string>}
*/
function optimizeSvg(svg) {
return svgo(svg).then(setAttrs);
}
/**
* Run SVGO on SVG string.
* @para... | javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/bin/build-sprite.js | bin/build-sprite.js | import fs from 'fs';
import path from 'path';
import icons from '../dist/icons.json';
import buildSpriteString from './build-sprite-string';
const OUT_FILE = path.resolve(__dirname, '../dist/feather-sprite.svg');
console.log(`Building ${OUT_FILE}...`);
fs.writeFileSync(OUT_FILE, buildSpriteString(icons));
| javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/bin/__tests__/optimize-svg.test.js | bin/__tests__/optimize-svg.test.js | /* eslint-env jest */
import optimizeSvg from '../optimize-svg';
test('optimizes SVG correctly', () => {
const SVG =
'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><title>Title</title><line x1="23" y1="1" x2="1" y2="23" fill="none" stroke="#000" stroke-linecap="round" stroke-... | javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/bin/__tests__/build-sprite-string.test.js | bin/__tests__/build-sprite-string.test.js | /* eslint-env jest */
import buildSpriteString from '../build-sprite-string';
const icons = {
icon1:
'<line x1="23" y1="1" x2="1" y2="23"></line><line x1="1" y1="1" x2="23" y2="23"></line>',
icon2: '<circle cx="12" cy="12" r="11"></circle>',
};
test('builds sprite correctly', () => {
expect(buildSpriteStrin... | javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
feathericons/feather | https://github.com/feathericons/feather/blob/3dc050d97405062eba78aa57115c0a15c63abdaa/bin/__tests__/build-icons-object.test.js | bin/__tests__/build-icons-object.test.js | /* eslint-env jest */
import buildIconsObject from '../build-icons-object';
const SVG_FILES = {
'icon1.svg':
'<svg\n xmlns="http://www.w3.org/2000/svg"\n width="24"\n height="24"\n viewBox="0 0 24 24"\n>\n <line x1="23" y1="1" x2="1" y2="23" />\n <line x1="1" y1="1" x2="23" y2="23" />\n</svg>',
'icon2.sv... | javascript | MIT | 3dc050d97405062eba78aa57115c0a15c63abdaa | 2026-01-04T15:04:17.536318Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/gulpfile.babel.js | gulpfile.babel.js | 'use strict';
import gulp from 'gulp';
import connect from 'gulp-connect';
import eslint from 'gulp-eslint';
import pug from 'gulp-pug';
import del from 'del';
import fs from 'fs-extra';
import globby from 'globby';
import Mocha ... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/scripts/generate-license.js | scripts/generate-license.js | const fs = require('fs');
const path = require('path');
const pkg = require('../package.json');
const licensePath = path.resolve(__dirname, '../LICENSE');
const license = fs.readFileSync(licensePath, 'utf8');
const data = license.replace(/Modernizr\s(.+?)\s\|/, 'Modernizr ' + pkg.version + ' |');
fs.writeFileSync(lic... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/testXhrType.js | src/testXhrType.js | define(function() {
/**
* https://mathiasbynens.be/notes/xhr-responsetype-json#comment-4
*
* @author Mathias Bynens
* @access private
* @function testXhrType
* @param {string} type - String name of the XHR type you want to detect
* @returns {boolean} true if the responseType is of the specified t... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/html5printshiv.js | src/html5printshiv.js | define(['isSVG'], function(isSVG) {
/**
* @optionName html5printshiv
* @optionProp html5printshiv
*/
// Take the html5 variable out of the html5shiv scope so we can return it.
var html5;
if (!isSVG) {
/**
* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/testProp.js | src/testProp.js | define(['ModernizrProto', 'testProps'], function(ModernizrProto, testProps) {
/**
* testProp() investigates whether a given style property is recognized
* Property names can be provided in either camelCase or hyphen-case.
*
* @memberOf Modernizr
* @name Modernizr.testProp
* @access public
* @opti... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/docElement.js | src/docElement.js | define(function() {
/**
* docElement is a convenience wrapper to grab the root element of the document
*
* @access private
* @returns {HTMLElement|SVGElement} The root element of the document
*/
var docElement = document.documentElement;
return docElement;
});
| javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/roundedEquals.js | src/roundedEquals.js | define(function() {
/**
* roundedEquals takes two integers and checks if the first is within 1 of the second
*
* @access private
* @function roundedEquals
* @param {number} a - first integer
* @param {number} b - second integer
* @returns {boolean} true if the first integer is within 1 of the sec... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/testDOMProps.js | src/testDOMProps.js | define(['is', 'fnBind'], function(is, fnBind) {
/**
* testDOMProps is a generic DOM property test; if a browser supports
* a certain property, it won't return undefined for it.
*
* @access private
* @function testDOMProps
* @param {Array<string>} props - An array of properties to test for
* @pa... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/classes.js | src/classes.js | define(function() {
var classes = [];
return classes;
});
| javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/ModernizrProto.js | src/ModernizrProto.js | define(['tests'], function(tests) {
/**
* ModernizrProto is the constructor for Modernizr
*
* @class
* @access public
*/
var ModernizrProto = {
_version: '__VERSION__',
// Any settings that don't work as separate modules
// can go in here as configuration.
_config: {
'classPref... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/atRule.js | src/atRule.js | define(['ModernizrProto', 'cssomPrefixes'], function(ModernizrProto, prefixes) {
/**
* atRule returns a given CSS property at-rule (eg @keyframes), possibly in
* some prefixed form, or false, in the case of an unsupported rule
*
* @memberOf Modernizr
* @name Modernizr.atRule
* @optionName Modernizr.... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/isSVG.js | src/isSVG.js | define(['docElement'], function(docElement) {
/**
* A convenience helper to check if the document we are running in is an SVG document
*
* @access private
* @returns {boolean}
*/
var isSVG = docElement.nodeName.toLowerCase() === 'svg';
return isSVG;
});
| javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/hasOwnProp.js | src/hasOwnProp.js | define(['is'], function(is) {
/**
* hasOwnProp is a shim for hasOwnProperty that is needed for Safari 2.0 support
*
* @author kangax
* @access private
* @function hasOwnProp
* @param {object} object - The object to check for a property
* @param {string} property - The property to check for
* @... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/hasEvent.js | src/hasEvent.js | define(['ModernizrProto', 'createElement', 'docElement'], function(ModernizrProto, createElement, docElement) {
/**
* Modernizr.hasEvent() detects support for a given event
*
* @memberOf Modernizr
* @name Modernizr.hasEvent
* @optionName Modernizr.hasEvent()
* @optionProp hasEvent
* @access publi... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/setClasses.js | src/setClasses.js | define(['Modernizr', 'docElement', 'isSVG'], function(Modernizr, docElement, isSVG) {
/**
* setClasses takes an array of class names and adds them to the root element
*
* @access private
* @function setClasses
* @param {string[]} classes - Array of class names
*/
// Pass in an and array of class n... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/mStyle.js | src/mStyle.js | define(['Modernizr', 'modElem'], function(Modernizr, modElem) {
var mStyle = {
style: modElem.elem.style
};
// kill ref for gc, must happen before mod.elem is removed, so we unshift on to
// the front of the queue.
Modernizr._q.unshift(function() {
delete mStyle.style;
});
return mStyle;
});
| javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/generate.js | src/generate.js | define(['lodash'], function(_) {
/**
* generate creates the base version of a Modernizr build, before the r.js
* optimizer actually generates the final code
*
* @access private
* @function generate
* @param {object} [config] - A configuration object consisting of:
* [config.option... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/computedStyle.js | src/computedStyle.js | define(function() {
/**
* wrapper around getComputedStyle, to fix issues with Firefox returning null when
* called inside of a hidden iframe
*
* @access private
* @function computedStyle
* @param {HTMLElement|SVGElement} elem - The element we want to find the computed styles of
* @param {string|... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/html5shiv.js | src/html5shiv.js | define(['isSVG'], function(isSVG) {
/**
* @optionName html5shiv
* @optionProp html5shiv
*/
// Take the html5 variable out of the html5shiv scope so we can return it.
var html5;
if (!isSVG) {
/**
* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
;(... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/createElement.js | src/createElement.js | define(['isSVG'], function(isSVG) {
/**
* createElement is a convenience wrapper around document.createElement. Since we
* use createElement all over the place, this allows for (slightly) smaller code
* as well as abstracting away issues with creating elements in contexts other than
* HTML documents (e.g.... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/prefixed.js | src/prefixed.js | define(['ModernizrProto', 'testPropsAll', 'cssToDOM', 'atRule'], function(ModernizrProto, testPropsAll, cssToDOM, atRule) {
/**
* prefixed returns the prefixed or nonprefixed property name variant of your input
*
* @memberOf Modernizr
* @name Modernizr.prefixed
* @optionName Modernizr.prefixed()
* @... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/domToCSS.js | src/domToCSS.js | define(function() {
/**
* domToCSS takes a camelCase string and converts it to hyphen-case
* e.g. boxSizing -> box-sizing
*
* @access private
* @function domToCSS
* @param {string} name - String name of camelCase prop we want to convert
* @returns {string} The hyphen-case version of the supplied ... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/is.js | src/is.js | define(function() {
/**
* is returns a boolean if the typeof an obj is exactly type.
* @access private
* @function
* @param {*} obj - A thing we want to check the type of
* @param {string} type - A string to compare the typeof against
* @returns {boolean} true if the typeof the first parameter is ex... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/mq.js | src/mq.js | define(['ModernizrProto', 'injectElementWithStyles', 'computedStyle'], function(ModernizrProto, injectElementWithStyles, computedStyle) {
/**
* Modernizr.mq tests a given media query, live against the current state of the window
* adapted from matchMedia polyfill by Scott Jehl and Paul Irish
* gist.github.co... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/prefixedCSSValue.js | src/prefixedCSSValue.js | define(['ModernizrProto', 'domPrefixes', 'createElement'], function(ModernizrProto, domPrefixes, createElement) {
/**
* prefixedCSSValue is a way test for prefixed css properties (e.g. display: -webkit-flex)
*
* @memberOf Modernizr
* @name Modernizr.prefixedCSSValue
* @optionName Modernizr.prefixedCSSV... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/testAllProps.js | src/testAllProps.js | define(['ModernizrProto', 'testPropsAll'], function(ModernizrProto, testPropsAll) {
/**
* testAllProps determines whether a given CSS property is supported in the browser
*
* @memberOf Modernizr
* @name Modernizr.testAllProps
* @optionName Modernizr.testAllProps()
* @optionProp testAllProps
* @ac... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/injectElementWithStyles.js | src/injectElementWithStyles.js | define(['ModernizrProto', 'docElement', 'createElement', 'getBody'], function(ModernizrProto, docElement, createElement, getBody) {
/**
* injectElementWithStyles injects an element with style element and some CSS rules
*
* @access private
* @function injectElementWithStyles
* @param {string} rule - Str... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/inputElem.js | src/inputElem.js | define(['createElement'], function(createElement) {
/**
* since we have a fairly large number of input tests that don't mutate the input
* we create a single element that can be shared with all of those tests for a
* minor perf boost
*
* @access private
* @returns {HTMLInputElement}
*/
var inpu... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/tests.js | src/tests.js | define(function() {
var tests = [];
return tests;
});
| javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/testStyles.js | src/testStyles.js | define(['ModernizrProto', 'injectElementWithStyles'], function(ModernizrProto, injectElementWithStyles) {
/**
* testStyles injects an element with style element and some CSS rules
*
* @memberOf Modernizr
* @name Modernizr.testStyles
* @optionName Modernizr.testStyles()
* @optionProp testStyles
* ... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/domPrefixes.js | src/domPrefixes.js | define(['ModernizrProto', 'omPrefixes'], function(ModernizrProto, omPrefixes) {
/**
* List of JavaScript DOM values used for tests
*
* @memberOf Modernizr
* @name Modernizr._domPrefixes
* @optionName Modernizr._domPrefixes
* @optionProp domPrefixes
* @access public
* @example
*
* Moderni... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/addTest.js | src/addTest.js | define(['ModernizrProto', 'Modernizr', 'hasOwnProp', 'setClasses'], function(ModernizrProto, Modernizr, hasOwnProp, setClasses) {
// _l tracks listeners for async tests, as well as tests that execute after the initial run
ModernizrProto._l = {};
/**
* Modernizr.on is a way to listen for the completion of asy... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/getBody.js | src/getBody.js | define(['createElement', 'isSVG'], function(createElement, isSVG) {
/**
* getBody returns the body of a document, or an element that can stand in for
* the body if a real body does not exist
*
* @access private
* @function getBody
* @returns {HTMLElement|SVGElement} Returns the real body of a docume... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/prefixedCSS.js | src/prefixedCSS.js | define(['ModernizrProto', 'prefixed', 'domToCSS'], function(ModernizrProto, prefixed, domToCSS) {
/**
* prefixedCSS is just like [prefixed](#modernizr-prefixed), but the returned values are in
* hyphen-case (e.g. `box-sizing`) rather than camelCase (boxSizing).
*
* @memberOf Modernizr
* @name Modernizr... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/omPrefixes.js | src/omPrefixes.js | define(function() {
/**
* If the browsers follow the spec, then they would expose vendor-specific styles as:
* elem.style.WebkitBorderRadius
* instead of something like the following (which is technically incorrect):
* elem.style.webkitBorderRadius
*
* WebKit ghosts their properties in lowercase... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/prefixes.js | src/prefixes.js | define(['ModernizrProto'], function(ModernizrProto) {
/**
* List of property values to set for css tests. See ticket #21
* https://github.com/modernizr/modernizr/issues/21
*
* @memberOf Modernizr
* @name Modernizr._prefixes
* @optionName Modernizr._prefixes
* @optionProp prefixes
* @access pub... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/fnBind.js | src/fnBind.js | define(function() {
/**
* fnBind is a super small [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) polyfill.
*
* @access private
* @function fnBind
* @param {Function} fn - a function you want to change `this` reference to
* @param {object} that ... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/testProps.js | src/testProps.js | define(['contains', 'mStyle', 'createElement', 'nativeTestProps', 'is', 'cssToDOM'], function(contains, mStyle, createElement, nativeTestProps, is, cssToDOM) {
// testProps is a generic CSS / DOM property test.
// In testing support for a given CSS property, it's legit to test:
// `elem.style[styleName] !== u... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/Modernizr.js | src/Modernizr.js | define(['ModernizrProto'], function(ModernizrProto) {
// Fake some of Object.create so we can force non test results to be non "own" properties.
var Modernizr = function() {};
Modernizr.prototype = ModernizrProto;
// Leak modernizr globally when you `require` it rather than force it here.
// Overwrite name s... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/testRunner.js | src/testRunner.js | define(['tests', 'Modernizr', 'classes', 'is'], function(tests, Modernizr, classes, is) {
/**
* Run through all tests and detect their support in the current UA.
*
* @access private
* @returns {void}
*/
function testRunner() {
var featureNames;
var feature;
var aliasIdx;
var result;
... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/toStringFn.js | src/toStringFn.js | define(function() {
/**
* Object.prototype.toString can be used with every object and allows you to
* get its class easily. Abstracting it off of an object prevents situations
* where the toString property has been overridden
*
* @access private
* @function toStringFn
* @returns {Function} An abs... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/cssomPrefixes.js | src/cssomPrefixes.js | define(['ModernizrProto', 'omPrefixes'], function(ModernizrProto, omPrefixes) {
var cssomPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.split(' ') : []);
ModernizrProto._cssomPrefixes = cssomPrefixes;
return cssomPrefixes;
});
| javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/modElem.js | src/modElem.js | define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
/**
* Create our "modernizr" element that we do most feature tests on.
*
* @access private
*/
var modElem = {
elem: createElement('modernizr')
};
// Clean up this element
Modernizr._q.push(function() {
delete modE... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/nativeTestProps.js | src/nativeTestProps.js | define(['injectElementWithStyles', 'domToCSS', 'computedStyle'], function(injectElementWithStyles, domToCSS, computedStyle) {
/**
* nativeTestProps allows for us to use native feature detection functionality if available.
* some prefixed form, or false, in the case of an unsupported rule
*
* @access priva... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/testPropsAll.js | src/testPropsAll.js | define(['ModernizrProto', 'cssomPrefixes', 'is', 'testProps', 'domPrefixes', 'testDOMProps'], function(ModernizrProto, cssomPrefixes, is, testProps, domPrefixes, testDOMProps) {
/**
* testPropsAll tests a list of DOM properties we want to check against.
* We specify literally ALL possible (known and/or likely) ... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/cssToDOM.js | src/cssToDOM.js | define(function() {
/**
* cssToDOM takes a hyphen-case string and converts it to camelCase
* e.g. box-sizing -> boxSizing
*
* @access private
* @function cssToDOM
* @param {string} name - String name of hyphen-case prop we want to convert
* @returns {string} The camelCase version of the supplied ... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/contains.js | src/contains.js | define(function() {
/**
* contains checks to see if a string contains another string
*
* @access private
* @function contains
* @param {string} str - The string we want to check for substrings
* @param {string} substr - The substring we want to search the first string for
* @returns {boolean} tru... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/domPrefixesAll.js | src/domPrefixesAll.js | define(['ModernizrProto', 'domPrefixes'], function(ModernizrProto, domPrefixes) {
/**
* List of JavaScript DOM values used for tests including a NON-prefix
*
* @memberOf Modernizr
* @name Modernizr._domPrefixesAll
* @optionName Modernizr._domPrefixesAll
* @optionProp domPrefixesAll
* @access publ... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/slice.js | src/slice.js | define(['classes'], function(classes) {
/**
* slice exposes Array.prototype.slice to convert array-like objects to actual
* arrays in a compact format without recreating new arrays over and over again
* (which leads to decreased performance)
*
* @access private
*/
var slice = classes.slice;
retu... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/src/load.js | src/load.js | define(['ModernizrProto'], function(ModernizrProto) {
var err = function() {};
var warn = function() {};
if (window.console) {
err = function() {
var method = console.error ? 'error' : 'log';
window.console[method].apply(window.console, Array.prototype.slice.call(arguments));
};
warn = f... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Modernizr/Modernizr | https://github.com/Modernizr/Modernizr/blob/743092ebbb9c19a5ba8c3cc2c75cf03727921cb1/test/cleanup.js | test/cleanup.js | if (typeof define !== 'function') {
var requirejs = require('requirejs');
}
define([], function() {
return function() {
var contexts = requirejs.s.contexts;
for (var context in contexts) {
if (contexts.hasOwnProperty(context)) {
var defined = contexts[context].defined;
for (var modul... | javascript | MIT | 743092ebbb9c19a5ba8c3cc2c75cf03727921cb1 | 2026-01-04T15:04:24.685929Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.