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 |
|---|---|---|---|---|---|---|---|---|
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/src/components/radio-group/radio-button.js | src/components/radio-group/radio-button.js | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { compose, withToggleState } from '@linkiwi/hoc';
import Spacing from 'components/spacing';
import Text from 'components/text';
import { transitionStyle } from 'styles/transition';
/**
* Single radio button option in an externally co... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/src/components/radio-group/index.js | src/components/radio-group/index.js | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import RadioButton from 'components/radio-group/radio-button';
import Spacing from 'components/spacing';
import { colors } from 'styles/color';
import { KEY_CODE_UP, KEY_CODE_DOWN, KEY_CODE_LEFT, KEY_CODE_RIGHT } from 'util/constants';
import... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/src/components/select-list/select-list-item.js | src/components/select-list/select-list-item.js | import PropTypes from 'prop-types';
import React from 'react';
import { withToggleState } from '@linkiwi/hoc';
import Spacing from 'components/spacing';
import Text from 'components/text';
import { colors } from 'styles/color';
import { transitionStyle } from 'styles/transition';
/**
* Dropdown menu in an expanded Se... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/src/components/select-list/index.js | src/components/select-list/index.js | import Color from 'color';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import SelectListItem from 'components/select-list/select-list-item';
import SelectListPlaceholder from 'components/select-list/select-list-placeholder';
import Spacing from 'components/spacing';
import Text from 'c... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/src/components/select-list/select-list-placeholder.js | src/components/select-list/select-list-placeholder.js | import PropTypes from 'prop-types';
import React from 'react';
import Spacing from 'components/spacing';
import Text from 'components/text';
import { colors } from 'styles/color';
import { transitionStyle } from 'styles/transition';
/**
* SelectList placeholder item. This is the SelectList item that is always rendere... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/src/components/tabs/secondary-tab-option.js | src/components/tabs/secondary-tab-option.js | import PropTypes from 'prop-types';
import React from 'react';
import { colors } from 'styles/color';
import { transitionStyle } from 'styles/transition';
/**
* Single tab option for the secondary style.
*/
const SecondaryTabOption = ({
baseStyle,
isSelected,
isInvert,
onClick,
children,
}) => {
const se... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/src/components/tabs/index.js | src/components/tabs/index.js | import PropTypes from 'prop-types';
import React from 'react';
import Spacing from 'components/spacing';
import Text from 'components/text';
import PrimaryTabOption from 'components/tabs/primary-tab-option';
import SecondaryTabOption from 'components/tabs/secondary-tab-option';
import noop from 'util/noop';
/**
* Hor... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/src/components/tabs/primary-tab-option.js | src/components/tabs/primary-tab-option.js | import PropTypes from 'prop-types';
import React from 'react';
import { withToggleState } from '@linkiwi/hoc';
import { colors } from 'styles/color';
import { transitionStyle } from 'styles/transition';
/**
* Single tab option for the primary style.
*/
const PrimaryTabOption = ({
baseStyle,
isHover,
isIntermed... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/setup.js | test/setup.js | import 'raf/polyfill';
import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
Enzyme.configure({ adapter: new Adapter() });
| javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/bootstrap.test.js | test/bootstrap.test.js | import bootstrap from 'bootstrap';
import { colors } from 'styles/color';
import { fonts } from 'styles/font';
import injectCSS from 'util/inject-css';
jest.mock('util/inject-css', () => jest.fn());
describe('Imperative bootstrapping', () => {
test('Setting global properties', () => {
const fontOpts = {
p... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/environment.js | test/environment.js | const JSDOMEnvironment = require('jest-environment-jsdom');
/**
* Use a customized test environment that exposes JSDOM as a global, so that the underlying DOM
* can be modified and reconfigured at runtime in tests.
*/
class CustomTestEnvironment extends JSDOMEnvironment {
constructor(config) {
super(config);
... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/elemental.test.js | test/elemental.test.js | import React from 'react';
import { shallow, mount } from 'enzyme';
import bootstrap from 'bootstrap';
import Elemental from 'elemental';
jest.mock('bootstrap', () => jest.fn());
describe('Elemental bootstrapping component', () => {
beforeEach(() => {
// Reset the global initialization state
// eslint-disab... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/util/omit.test.js | test/util/omit.test.js | import omit from 'util/omit';
describe('Omit', () => {
test('Omit shallow copies the object', () => {
const obj = { a: 1, b: 2 };
expect(omit(obj)).toEqual({ a: 1, b: 2 });
expect(obj).toEqual({ a: 1, b: 2 });
});
test('Omit present object keys', () => {
const obj = { a: 1, b: 2, c: 3 };
e... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/util/number.test.js | test/util/number.test.js | import { modulo } from 'util/number';
describe('Number', () => {
test('Behavior is identical to modulus operator for non-negative integers', () => {
expect(0 % 5).toBe(0);
expect(modulo(0, 5)).toBe(0);
expect(1 % 5).toBe(1);
expect(modulo(1, 5)).toBe(1);
expect(5 % 5).toBe(0);
expect(modulo(5... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/util/noop.test.js | test/util/noop.test.js | import noop from 'util/noop';
describe('Noop', () => {
test('Noop does nothing', () => {
expect(noop()).not.toBeDefined();
});
});
| javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/util/inject-css.test.js | test/util/inject-css.test.js | import injectCSS from 'util/inject-css';
describe('Inject CSS', () => {
const mockNode = {};
beforeEach(() => {
global.document.createElement = jest.fn(() => mockNode);
global.document.body.appendChild = jest.fn();
});
test('CSS is injected into document head as style object', () => {
injectCSS('... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/styles/spacing.test.js | test/styles/spacing.test.js | import { marginStyle, spacing } from 'styles/spacing';
describe('Spacing', () => {
test('Sizes', () => {
const names = [
'default',
'micro',
'tiny',
'small',
'large',
'huge',
'enormous',
];
names.forEach((name) => expect(spacing[name]).toBeDefined());
});
t... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/styles/transition.test.js | test/styles/transition.test.js | import { durations, timing, transitionStyle } from 'styles/transition';
describe('Transition', () => {
test('Durations', () => {
const names = [
'alpha',
'beta',
'gamma',
'epsilon',
'iota',
];
names.forEach((name) => expect(durations[name]).toBeDefined());
});
test('Ti... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/styles/font.test.js | test/styles/font.test.js | import { sizes, primaryFontStyle, secondaryFontStyle } from 'styles/font';
describe('Fonts', () => {
test('Sizes', () => {
const names = [
'alpha',
'beta',
'gamma',
'delta',
'epsilon',
'iota',
'kilo',
'lambda',
];
names.forEach((name) => expect(sizes[name]... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/styles/color.test.js | test/styles/color.test.js | import { colors } from 'styles/color';
describe('Colors', () => {
test('Gray shades', () => {
expect(colors.gray0).toBeUndefined();
expect(colors.gray100).toBeUndefined();
expect(colors.gray5).toBeDefined();
expect(colors.gray55).toBeDefined();
expect(colors.gray70).toBeDefined();
expect(colo... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/icons/clear.test.js | test/icons/clear.test.js | import React from 'react';
import { shallow } from 'enzyme';
import Clear from 'icons/clear';
describe('Clear icon', () => {
test('Renders svg', () => {
const clear = shallow(
<Clear />,
);
expect(clear.find('svg').length).toBe(1);
});
test('Props proxy', () => {
const clear = shallow(
... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/icons/check.test.js | test/icons/check.test.js | import React from 'react';
import { shallow } from 'enzyme';
import Check from 'icons/check';
describe('Check icon', () => {
test('Renders svg', () => {
const check = shallow(
<Check />,
);
expect(check.find('svg').length).toBe(1);
});
test('Props proxy', () => {
const check = shallow(
... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/link.test.js | test/components/link.test.js | import { mount } from 'enzyme';
import React, { createRef } from 'react';
import Link from 'components/link';
describe('Link', () => {
test('Standard rendering', () => {
const link = mount(
<Link href="href">
link
</Link>,
);
expect(link.find('a').length).toBe(1);
expect(link.fin... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/spinner.test.js | test/components/spinner.test.js | import { mount } from 'enzyme';
import React from 'react';
import Spinner from 'components/spinner';
import { colors } from 'styles/color';
describe('Spinner', () => {
test('Accepts proxy props', () => {
const onClick = jest.fn();
const spinner = mount(
<Spinner
onClick={onClick}
/>,
... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/modal.test.js | test/components/modal.test.js | import { mount, shallow } from 'enzyme';
import React from 'react';
import Modal from 'components/modal';
describe('Modal', () => {
test('Rendering hierarchy', () => {
const modal = mount(
<Modal>
children
</Modal>,
);
expect(modal.at(0).at(0).text()).toBe('children');
});
test(... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/spacing.test.js | test/components/spacing.test.js | import { mount, shallow } from 'enzyme';
import React from 'react';
import Spacing from 'components/spacing';
describe('Spacing', () => {
test('Accepts proxy props', () => {
const onClick = jest.fn();
const spacing = mount(
<Spacing
onClick={onClick}
/>,
);
expect(spacing.at(0).p... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/button.test.js | test/components/button.test.js | import { mount } from 'enzyme';
import React, { createRef } from 'react';
import Button from 'components/button';
import Text from 'components/text';
describe('Button', () => {
test('Accepts proxy props', () => {
const button = mount(
<Button
type="submit"
/>,
);
expect(button.at(0).... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/text.test.js | test/components/text.test.js | import { mount } from 'enzyme';
import React from 'react';
import Text from 'components/text';
describe('Text', () => {
test('Accepts proxy props', () => {
const onClick = jest.fn();
const text = mount(
<Text onClick={onClick}>
text
</Text>,
);
expect(text.at(0).props().onClick).... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/loading-bar.test.js | test/components/loading-bar.test.js | import { shallow } from 'enzyme';
import React from 'react';
import sinon from 'sinon';
import LoadingBar, { POSITION_LEFT, POSITION_RIGHT } from 'components/loading-bar';
describe('Loading bar', () => {
test('Accepts proxy props', () => {
const onClick = jest.fn();
const loadingBar = shallow(
<Loading... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/alert.test.js | test/components/alert.test.js | import { mount, shallow } from 'enzyme';
import React from 'react';
import Alert from 'components/alert';
import Text from 'components/text';
import { colors } from 'styles/color';
describe('Alert', () => {
test('Accepts proxy props', () => {
const onClick = jest.fn();
const alert = mount(
<Alert
... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/tooltip.test.js | test/components/tooltip.test.js | import { mount } from 'enzyme';
import React from 'react';
import sinon from 'sinon';
import Tooltip, { GRACE_TIMEOUT_INTERVAL } from 'components/tooltip';
describe('Tooltip', () => {
test('Tooltip wraps children elements and adds tooltip element', () => {
const tooltip = mount(
<Tooltip contents={<span>t... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/label.test.js | test/components/label.test.js | import { shallow } from 'enzyme';
import React from 'react';
import Label from 'components/label';
import Text from 'components/text';
describe('Label', () => {
test('Only renders main label', () => {
const label = shallow(
<Label label="label" />,
);
expect(label.find(Text).length).toBe(1);
});... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/text-area.test.js | test/components/text-area.test.js | import { mount } from 'enzyme';
import React, { createRef } from 'react';
import Text from 'components/text';
import TextArea from 'components/text-area';
import TextField from 'components/text-field';
import { colors } from 'styles/color';
import { transitionStyle } from 'styles/transition';
describe('Text area', () ... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/toast.test.js | test/components/toast.test.js | import { mount, shallow } from 'enzyme';
import React from 'react';
import Spacing from 'components/spacing';
import Toast from 'components/toast';
describe('Toast', () => {
test('Accepts proxy props', () => {
const onClick = jest.fn();
const toast = mount(
<Toast onClick={onClick} />,
);
expe... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/tag.test.js | test/components/tag.test.js | import { mount, shallow } from 'enzyme';
import React from 'react';
import Text from 'components/text';
import Tag from 'components/tag';
import Clear from 'icons/clear';
describe('Tag', () => {
test('Accepts proxy props', () => {
const onClick = jest.fn();
const tag = mount(
<Tag
text="text"
... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/checkbox.test.js | test/components/checkbox.test.js | import { mount } from 'enzyme';
import React, { createRef } from 'react';
import Checkbox from 'components/checkbox';
import Text from 'components/text';
import Check from 'icons/check';
import { colors } from 'styles/color';
describe('Checkbox', () => {
test('Accepts proxy props', () => {
const onClick = jest.f... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/pulsator.test.js | test/components/pulsator.test.js | import { mount } from 'enzyme';
import React from 'react';
import sinon from 'sinon';
import Pulsator from 'components/pulsator';
import { colors } from 'styles/color';
describe('Pulsator', () => {
test('Accepts proxy props', () => {
const onClick = jest.fn();
const pulsator = mount(
<Pulsator
... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/text-field.test.js | test/components/text-field.test.js | import { mount } from 'enzyme';
import React, { createRef } from 'react';
import Text from 'components/text';
import TextField from 'components/text-field';
describe('Text field', () => {
test('Accepts proxy props', () => {
const textField = mount(
<TextField type="password" />,
);
expect(textFiel... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/image.test.js | test/components/image.test.js | import { mount } from 'enzyme';
import React, { createRef } from 'react';
import Image, {
LOAD_STATE_IDLE,
LOAD_STATE_FETCH,
LOAD_STATE_DONE,
LOAD_STATE_ERROR,
} from 'components/image';
import Text from 'components/text';
// Java intensifies
const mockIntersectionObserverFactory = (mockObserve, mockUnobserve)... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/radio-group/radio-button.test.js | test/components/radio-group/radio-button.test.js | import { mount } from 'enzyme';
import React from 'react';
import RadioButton from 'components/radio-group/radio-button';
import Text from 'components/text';
describe('Radio button', () => {
const defaultProps = {
active: false,
accentColor: 'black',
idleColor: 'white',
disabled: false,
label: 'l... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/radio-group/index.test.js | test/components/radio-group/index.test.js | import { shallow, mount } from 'enzyme';
import React from 'react';
import RadioGroup from 'components/radio-group';
import RadioButton from 'components/radio-group/radio-button';
import {
KEY_CODE_UP,
KEY_CODE_DOWN,
KEY_CODE_LEFT,
KEY_CODE_RIGHT,
KEY_CODE_ENTER,
} from 'util/constants';
describe('Radio grou... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/select-list/index.test.js | test/components/select-list/index.test.js | import Color from 'color';
import { mount, shallow } from 'enzyme';
import React from 'react';
import sinon from 'sinon';
import SelectList from 'components/select-list';
import SelectListItem from 'components/select-list/select-list-item';
import SelectListPlaceholder from 'components/select-list/select-list-placehold... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/select-list/select-list-item.test.js | test/components/select-list/select-list-item.test.js | import { mount } from 'enzyme';
import React from 'react';
import SelectListItem from 'components/select-list/select-list-item';
import Text from 'components/text';
describe('Select list item', () => {
const defaultProps = {
label: 'label',
width: 400,
onClick: () => {},
};
test('Basic rendering', (... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/select-list/select-list-placeholder.test.js | test/components/select-list/select-list-placeholder.test.js | import { shallow } from 'enzyme';
import React from 'react';
import SelectListPlaceholder from 'components/select-list/select-list-placeholder';
import Text from 'components/text';
describe('Select list placeholder', () => {
const defaultProps = {
label: 'label',
width: 400,
arrowDirection: 'up',
onC... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/tabs/index.test.js | test/components/tabs/index.test.js | import { mount } from 'enzyme';
import React from 'react';
import Tabs from 'components/tabs';
import PrimaryTabOption from 'components/tabs/primary-tab-option';
import SecondaryTabOption from 'components/tabs/secondary-tab-option';
describe('Tabs', () => {
test('Props proxy', () => {
const mockOnClick = jest.fn... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/tabs/secondary-tab-option.test.js | test/components/tabs/secondary-tab-option.test.js | import { shallow } from 'enzyme';
import React from 'react';
import SecondaryTabOption from 'components/tabs/secondary-tab-option';
import { colors } from 'styles/color';
describe('Secondary tab option', () => {
const defaultProps = {
baseStyle: {},
isSelected: false,
isInvert: false,
onClick: () => ... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/test/components/tabs/primary-tab-option.test.js | test/components/tabs/primary-tab-option.test.js | import { mount } from 'enzyme';
import React from 'react';
import PrimaryTabOption from 'components/tabs/primary-tab-option';
import { colors } from 'styles/color';
describe('Primary tab option', () => {
const defaultProps = {
baseStyle: {},
isIntermediate: false,
isSelected: false,
onClick: () => {}... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/app.js | sample/app.js | import React from 'react';
import { Elemental, Spacing } from 'react-elemental';
import {
karlaBold,
karlaRegular,
sourceCodeProMedium,
sourceCodeProRegular,
} from 'react-elemental-fonts';
import SampleAlert from 'components/alert';
import SampleButton from 'components/button';
import SampleCheckbox from 'comp... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/entry.js | sample/entry.js | /* eslint-disable import/no-extraneous-dependencies */
import React from 'react';
import ReactDOM from 'react-dom';
import App from 'app';
ReactDOM.render(<App />, document.querySelector('#app'));
| javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/webpack.config.js | sample/webpack.config.js | /* eslint-disable import/no-extraneous-dependencies */
const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');
const HTMLWebpackPlugin = require('html-webpack-plugin');
const path = require('path');
const TerserPlugin = require('terser-webpack-plugin');
const webpack = require('webpack');
... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/lib.js | sample/lib.js | /* eslint-disable no-unused-vars */
// Force the entire library to be imported
import * as Elemental from 'react-elemental';
| javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/components/button.js | sample/components/button.js | import React, { Component } from 'react';
import { Button, Spacing, Text, colors } from 'react-elemental';
export default class SampleButton extends Component {
state = {
buttonColor: colors.orange,
};
componentDidMount() {
setInterval(this.toggleColor, 2000);
}
toggleColor = () => this.setState(({... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/components/loading-bar.js | sample/components/loading-bar.js | import React from 'react';
import { LoadingBar, Spacing, Text, colors } from 'react-elemental';
const SampleLoadingBar = () => (
<div>
<Spacing size="huge" bottom>
<Text size="gamma" color="primary" uppercase>
Loading bar
</Text>
<Text>
Component to indicate indeterminate progre... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/components/tabs.js | sample/components/tabs.js | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Spacing, Tabs, Text } from 'react-elemental';
const CustomTabOption = ({ children }) => (
<Spacing size="tiny" top bottom padding>
<Spacing size="small" left right padding>
<Text size="kilo" color="gray60" uppercase bold... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/components/toast.js | sample/components/toast.js | import React, { Component } from 'react';
import { Button, Spacing, Text, Toast } from 'react-elemental';
export default class SampleToast extends Component {
state = {
isVisible: false,
};
showToast = () => {
this.setState({ isVisible: true });
setTimeout(() => this.setState({ isVisible: false }), ... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/components/radio-group.js | sample/components/radio-group.js | import React, { Component } from 'react';
import { colors, RadioGroup, Spacing, Tag, Text } from 'react-elemental';
export default class SampleRadioGroup extends Component {
state = {};
handleChange = (key) => (selected) => this.setState({ [key]: selected });
render() {
const { text, custom } = this.state;... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/components/alert.js | sample/components/alert.js | import React from 'react';
import { Alert, Spacing, Text } from 'react-elemental';
const SampleAlert = () => (
<div>
<Spacing size="huge" bottom>
<Text size="gamma" color="primary" uppercase>
Alerts
</Text>
<Text>
Alerts are used to educate the user about the current state of th... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/components/link.js | sample/components/link.js | import React from 'react';
import { Link, Spacing, Text, colors } from 'react-elemental';
const onClick = (evt) => evt.preventDefault();
const SampleLink = () => (
<div>
<Spacing size="huge" bottom>
<Text size="gamma" color="primary" uppercase>
Links
</Text>
<Text>
Links are te... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/components/pulsator.js | sample/components/pulsator.js | import React from 'react';
import { Spacing, Pulsator, Text, colors } from 'react-elemental';
const SamplePulsator = () => (
<div>
<Spacing size="huge" bottom>
<Text size="gamma" color="primary" uppercase>
Pulsators
</Text>
<Text>
Pulsators serve as activity status indicators.
... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/components/select-list.js | sample/components/select-list.js | import React from 'react';
import { Label, SelectList, Spacing, Text } from 'react-elemental';
const SampleSelectList = () => (
<div>
<Spacing size="huge" bottom>
<Text size="gamma" color="primary" uppercase>
Select list
</Text>
<Text>
Select lists are used to allow users to cho... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/components/tooltip.js | sample/components/tooltip.js | import React from 'react';
import { Spacing, Spinner, Text, Tooltip, colors } from 'react-elemental';
const SampleTooltip = () => (
<div>
<Spacing size="huge" bottom>
<Text size="gamma" color="primary" uppercase>
Tooltips
</Text>
<Text>
Tooltips are used to provide contextual in... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/components/spinner.js | sample/components/spinner.js | import React from 'react';
import { Spacing, Spinner, Text, colors } from 'react-elemental';
const SampleSpinner = () => (
<div>
<Spacing size="huge" bottom>
<Text size="gamma" color="primary" uppercase>
Spinners
</Text>
<Text>
Spinners indicate indeterminate progress when there... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/components/checkbox.js | sample/components/checkbox.js | import React, { Component } from 'react';
import { Checkbox, Spacing, Text } from 'react-elemental';
export default class SampleCheckbox extends Component {
state = {
enabled: true,
disabledChecked: true,
};
handleChange = (key) => (isChecked) => this.setState({ [key]: isChecked });
render() {
co... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/components/modal.js | sample/components/modal.js | import React, { Component } from 'react';
import { Button, Modal, Spacing, Text } from 'react-elemental';
const ModalContents = () => (
<Spacing size="large" top right bottom left padding>
<Spacing bottom>
<Text size="delta" color="primary" bold>
Modal title
</Text>
<Text size="epsilon"... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/components/text-area.js | sample/components/text-area.js | import React from 'react';
import { Label, Spacing, Text, TextArea } from 'react-elemental';
const SampleTextArea = () => (
<div>
<Spacing size="huge" bottom>
<Text size="gamma" color="primary" uppercase>
Text areas
</Text>
<Text>
Allow the user to enter an arbitrary-length text... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/components/text-field.js | sample/components/text-field.js | import React from 'react';
import {
Button,
Label,
SelectList,
Spacing,
Text,
TextField,
} from 'react-elemental';
const SampleTextField = () => (
<div>
<Spacing size="huge" bottom>
<Text size="gamma" color="primary" uppercase>
Text fields
</Text>
<Text>
Text fields ... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/components/image.js | sample/components/image.js | import React from 'react';
import { Image, Spacing, Text } from 'react-elemental';
const SampleImage = () => (
<div>
<Spacing size="huge" bottom>
<Text size="gamma" color="primary" uppercase>
Image
</Text>
<Text>
Wrapper around standard external images
</Text>
</Spacin... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/components/tag.js | sample/components/tag.js | import React from 'react';
import { Spacing, Tag, Text, colors } from 'react-elemental';
const SampleTag = () => (
<div>
<Spacing size="huge" bottom>
<Text size="gamma" color="primary" uppercase>
Tags
</Text>
<Text>
Tags serve as simple, textual status indicators.
</Text>
... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
LINKIWI/react-elemental | https://github.com/LINKIWI/react-elemental/blob/9dc31353320ee4a5accbff03b53d67af74ea8caa/sample/components/text.js | sample/components/text.js | import React from 'react';
import PropTypes from 'prop-types';
import { Spacing, Text, sizes } from 'react-elemental';
const Sizes = ({ secondary = false }) => (
<div>
{
Object.keys(sizes).map((size) => (
<Spacing key={size} bottom>
<Spacing size="micro" bottom>
<Text size="ki... | javascript | MIT | 9dc31353320ee4a5accbff03b53d67af74ea8caa | 2026-01-05T03:41:52.125682Z | false |
nirgn975/generator-jekyll-starter-kit | https://github.com/nirgn975/generator-jekyll-starter-kit/blob/c943cb369ce5b8ade07c2ab8c0223e31f3967b60/generators/app/index.js | generators/app/index.js | "use strict";
const Generator = require("yeoman-generator");
const chalk = require("chalk");
const yosay = require("yosay");
module.exports = class extends Generator {
prompting() {
// Have Yeoman greet the user.
this.log(
yosay(
`Welcome to the kickass ${chalk.red("jekyll-starter-kit")} genera... | javascript | ISC | c943cb369ce5b8ade07c2ab8c0223e31f3967b60 | 2026-01-05T03:43:18.812006Z | false |
nirgn975/generator-jekyll-starter-kit | https://github.com/nirgn975/generator-jekyll-starter-kit/blob/c943cb369ce5b8ade07c2ab8c0223e31f3967b60/__tests__/app.js | __tests__/app.js | "use strict";
const path = require("path");
const assert = require("yeoman-assert");
const helpers = require("yeoman-test");
describe("generator-html-css-es2015-sw-githubactions", () => {
beforeAll(() => {
return helpers
.run(path.join(__dirname, "../generators/app"))
.withPrompts({
projectNa... | javascript | ISC | c943cb369ce5b8ade07c2ab8c0223e31f3967b60 | 2026-01-05T03:43:18.812006Z | false |
dialogflow/selfservicekiosk-audio-streaming | https://github.com/dialogflow/selfservicekiosk-audio-streaming/blob/df6df95963450ca196e0bc247cab47f0ecc047ac/examples/temp.js | examples/temp.js | // Dialogflow will need a session Id
sessionId = uuid.v4();
// Dialogflow will need a DF Session Client
// So each DF session is unique
sessionClient = new df.SessionsClient();
// Create a session path from the Session client,
// which is a combination of the projectId and sessionId.
sessionPath = sessionClien... | javascript | Apache-2.0 | df6df95963450ca196e0bc247cab47f0ecc047ac | 2026-01-05T03:43:24.330786Z | false |
dialogflow/selfservicekiosk-audio-streaming | https://github.com/dialogflow/selfservicekiosk-audio-streaming/blob/df6df95963450ca196e0bc247cab47f0ecc047ac/examples/simpleserver.js | examples/simpleserver.js | /**
* @license
* Copyright 2018 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... | javascript | Apache-2.0 | df6df95963450ca196e0bc247cab47f0ecc047ac | 2026-01-05T03:43:24.330786Z | false |
dialogflow/selfservicekiosk-audio-streaming | https://github.com/dialogflow/selfservicekiosk-audio-streaming/blob/df6df95963450ca196e0bc247cab47f0ecc047ac/client/src/assets/socket.io-stream.js | client/src/assets/socket.io-stream.js | /**
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... | javascript | Apache-2.0 | df6df95963450ca196e0bc247cab47f0ecc047ac | 2026-01-05T03:43:24.330786Z | true |
dialogflow/selfservicekiosk-audio-streaming | https://github.com/dialogflow/selfservicekiosk-audio-streaming/blob/df6df95963450ca196e0bc247cab47f0ecc047ac/client/src/assets/recordrtc.min.js | client/src/assets/recordrtc.min.js | /**
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... | javascript | Apache-2.0 | df6df95963450ca196e0bc247cab47f0ecc047ac | 2026-01-05T03:43:24.330786Z | true |
dialogflow/selfservicekiosk-audio-streaming | https://github.com/dialogflow/selfservicekiosk-audio-streaming/blob/df6df95963450ca196e0bc247cab47f0ecc047ac/client/src/assets/socket.io.js | client/src/assets/socket.io.js | /**
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... | javascript | Apache-2.0 | df6df95963450ca196e0bc247cab47f0ecc047ac | 2026-01-05T03:43:24.330786Z | true |
rlingineni/Lambda-Serverless-Search | https://github.com/rlingineni/Lambda-Serverless-Search/blob/31610ccebfb4c21d2248db2128b3d1fc9bc638c7/document_batch/app.js | document_batch/app.js | const AWS = require("aws-sdk");
const AWSHelper = require("aws-functions");
const s3 = new AWS.S3();
let BUCKET_NAME, IndexConfig;
exports.lambdaHandler = async (event, context) => {
BUCKET_NAME = process.env.BUCKET_NAME;
//fetch previous cache of documents
let AllArticles = [];
//fetch every document uploaded t... | javascript | MIT | 31610ccebfb4c21d2248db2128b3d1fc9bc638c7 | 2026-01-05T03:43:24.280829Z | false |
rlingineni/Lambda-Serverless-Search | https://github.com/rlingineni/Lambda-Serverless-Search/blob/31610ccebfb4c21d2248db2128b3d1fc9bc638c7/document_indexer/app.js | document_indexer/app.js | const lunr = require("lunr");
const AWS = require("aws-sdk");
const AWSHelper = require("aws-functions");
const s3 = new AWS.S3();
let BUCKET_NAME, IndexConfig;
exports.lambdaHandler = async (event, context) => {
BUCKET_NAME = process.env.BUCKET_NAME;
let AddedItem = event.Records[0].s3.object.key;
//no need to i... | javascript | MIT | 31610ccebfb4c21d2248db2128b3d1fc9bc638c7 | 2026-01-05T03:43:24.280829Z | false |
rlingineni/Lambda-Serverless-Search | https://github.com/rlingineni/Lambda-Serverless-Search/blob/31610ccebfb4c21d2248db2128b3d1fc9bc638c7/document_search/app.js | document_search/app.js | const lunr = require("lunr");
const fs = require("fs");
const AWS = require("aws-sdk");
const AWSHelper = require("aws-functions");
const s3 = new AWS.S3();
let Validator = require("jsonschema").Validator;
let v = new Validator();
const SearchConfigSchema = {
id: "/SearchConfig",
type: "object",
properties: {
fiel... | javascript | MIT | 31610ccebfb4c21d2248db2128b3d1fc9bc638c7 | 2026-01-05T03:43:24.280829Z | false |
rlingineni/Lambda-Serverless-Search | https://github.com/rlingineni/Lambda-Serverless-Search/blob/31610ccebfb4c21d2248db2128b3d1fc9bc638c7/scale-test/main.js | scale-test/main.js | const fs = require("fs");
const alphanumeric = require("alphanumeric-id");
var rp = require("promise-request-retry");
let BaseURL = "https://hbmle8gyoc.execute-api.us-east-1.amazonaws.com";
fs.readFile("../movies.json", function read(err, data) {
if (err) {
throw err;
}
let listOfMovies = JSON.parse(data);
con... | javascript | MIT | 31610ccebfb4c21d2248db2128b3d1fc9bc638c7 | 2026-01-05T03:43:24.280829Z | false |
rlingineni/Lambda-Serverless-Search | https://github.com/rlingineni/Lambda-Serverless-Search/blob/31610ccebfb4c21d2248db2128b3d1fc9bc638c7/sample-indexer/sampleindexbuilder.js | sample-indexer/sampleindexbuilder.js | const fs = require("fs");
//const elasticlunr = require("elasticlunr");
const elasticlunr = require("lunr");
const loadFromIndex = false;
console.time();
if (!loadFromIndex) {
// First I want to read original file
fs.readFile("../movies.json", function read(err, data) {
if (err) {
throw err;
}
let listOfM... | javascript | MIT | 31610ccebfb4c21d2248db2128b3d1fc9bc638c7 | 2026-01-05T03:43:24.280829Z | false |
TheLarkInn/everything-is-a-plugin | https://github.com/TheLarkInn/everything-is-a-plugin/blob/bd23751d30c0e9d4e96483a0ae54e00578310ab0/webpack.config.js | webpack.config.js | const path = require("path");
const webpack = require("webpack");
const PluginLessonsPlugins = require("./plugin-lessons-plugins");
module.exports = {
entry: "./src",
output: {
path: path.resolve(__dirname, "dist"),
filename: "[name].chunk.js"
},
plugins: [
new webpack.Progress... | javascript | Apache-2.0 | bd23751d30c0e9d4e96483a0ae54e00578310ab0 | 2026-01-05T03:43:16.964923Z | false |
TheLarkInn/everything-is-a-plugin | https://github.com/TheLarkInn/everything-is-a-plugin/blob/bd23751d30c0e9d4e96483a0ae54e00578310ab0/plugin-lessons-plugins/32NMFAfterResolvePlugin.js | plugin-lessons-plugins/32NMFAfterResolvePlugin.js | /**
* Just some custom plugin utility(s) I wrote.
*/
const path = require("path");
const pluginUtils = require("./plugin-utils");
class AfterResolveNormalModuleFactoryPlugin {
constructor(options) {
this.resourceRegex = options.resourceRegex;
this.newRequestString = options.newRequestString;
... | javascript | Apache-2.0 | bd23751d30c0e9d4e96483a0ae54e00578310ab0 | 2026-01-05T03:43:16.964923Z | false |
TheLarkInn/everything-is-a-plugin | https://github.com/TheLarkInn/everything-is-a-plugin/blob/bd23751d30c0e9d4e96483a0ae54e00578310ab0/plugin-lessons-plugins/31NMFBeforeResolvePlugin.js | plugin-lessons-plugins/31NMFBeforeResolvePlugin.js | /**
* Just some custom plugin utility(s) I wrote.
*/
const path = require("path");
const pluginUtils = require("./plugin-utils");
class BeforeResolveNormalModuleFactoryPlugin {
constructor(options) {
this.resourceRegex = options.resourceRegex;
this.newRequestString = options.newRequestString;
... | javascript | Apache-2.0 | bd23751d30c0e9d4e96483a0ae54e00578310ab0 | 2026-01-05T03:43:16.964923Z | false |
TheLarkInn/everything-is-a-plugin | https://github.com/TheLarkInn/everything-is-a-plugin/blob/bd23751d30c0e9d4e96483a0ae54e00578310ab0/plugin-lessons-plugins/index.js | plugin-lessons-plugins/index.js | exports.OneBasicPluginWebpackPlugin = require("./10BasicPluginWebpackPlugin");
exports.TwoCompilerPluginWebpackPlugin = require("./20CompilerWebpackPlugin");
exports.ThreeModuleFactoryWebpackPlugin = require("./30ModuleFactoryPlugin");
exports.FourResolverWebpackPlugin = require("./40ResolverPlugin");
exports.FiveTempl... | javascript | Apache-2.0 | bd23751d30c0e9d4e96483a0ae54e00578310ab0 | 2026-01-05T03:43:16.964923Z | false |
TheLarkInn/everything-is-a-plugin | https://github.com/TheLarkInn/everything-is-a-plugin/blob/bd23751d30c0e9d4e96483a0ae54e00578310ab0/plugin-lessons-plugins/plugin-utils.js | plugin-lessons-plugins/plugin-utils.js | const chalk = require("chalk");
module.exports = {
logPluginEvent: function(eventName, pluginName, backgroundColor = "bgCyan", textColor = "white", titleColor = "black") {
console.log(chalk[titleColor](chalk[backgroundColor](
`
... | javascript | Apache-2.0 | bd23751d30c0e9d4e96483a0ae54e00578310ab0 | 2026-01-05T03:43:16.964923Z | false |
TheLarkInn/everything-is-a-plugin | https://github.com/TheLarkInn/everything-is-a-plugin/blob/bd23751d30c0e9d4e96483a0ae54e00578310ab0/plugin-lessons-plugins/30ModuleFactoryPlugin.js | plugin-lessons-plugins/30ModuleFactoryPlugin.js | /**
* Just some custom plugin utility(s) I wrote.
*/
const path = require("path");
const pluginUtils = require("./plugin-utils");
const BeforeResolveNormalModuleFactoryPlugin = require("./31NMFBeforeResolvePlugin");
const AfterResolveNormalModuleFactoryPlugin = require("./32NMFAfterResolvePlugin");
/**
*
*
* @t... | javascript | Apache-2.0 | bd23751d30c0e9d4e96483a0ae54e00578310ab0 | 2026-01-05T03:43:16.964923Z | false |
TheLarkInn/everything-is-a-plugin | https://github.com/TheLarkInn/everything-is-a-plugin/blob/bd23751d30c0e9d4e96483a0ae54e00578310ab0/plugin-lessons-plugins/10BasicPluginWebpackPlugin.js | plugin-lessons-plugins/10BasicPluginWebpackPlugin.js | /**
* Just some custom plugin utility(s) I wrote.
*/
const pluginUtils = require("./plugin-utils");
/**
* @class BasicPlugin - This is a example of a webpack plugin using `class`. The most common and easy to understand syntax
*/
class BasicPlugin {
/**
* @description Creates an instance of BasicPlugin.
... | javascript | Apache-2.0 | bd23751d30c0e9d4e96483a0ae54e00578310ab0 | 2026-01-05T03:43:16.964923Z | false |
TheLarkInn/everything-is-a-plugin | https://github.com/TheLarkInn/everything-is-a-plugin/blob/bd23751d30c0e9d4e96483a0ae54e00578310ab0/plugin-lessons-plugins/20CompilerWebpackPlugin.js | plugin-lessons-plugins/20CompilerWebpackPlugin.js | /**
* @typedef {CompilerParams} params holds the default module factories as well as compilationDependencies, this is used in "compile" and "before-compile", "compilation", and "this-compilation" hooks.
* @type {Object}
* @property {NormalModuleFactory} normalModuleFactory - The NFM that you use here is configured,... | javascript | Apache-2.0 | bd23751d30c0e9d4e96483a0ae54e00578310ab0 | 2026-01-05T03:43:16.964923Z | false |
TheLarkInn/everything-is-a-plugin | https://github.com/TheLarkInn/everything-is-a-plugin/blob/bd23751d30c0e9d4e96483a0ae54e00578310ab0/plugin-lessons-plugins/50TemplateWebpackPlugin.js | plugin-lessons-plugins/50TemplateWebpackPlugin.js | /**
* Just some custom plugin utility(s) I wrote.
*/
const pluginUtils = require("./plugin-utils");
const WebpackSources = require("webpack-sources");
/**
* @class TemplatePlugin - This is a example of a webpack plugin using `class`. The most common and easy to understand syntax
*/
class TemplatePlugin {
/**
... | javascript | Apache-2.0 | bd23751d30c0e9d4e96483a0ae54e00578310ab0 | 2026-01-05T03:43:16.964923Z | false |
TheLarkInn/everything-is-a-plugin | https://github.com/TheLarkInn/everything-is-a-plugin/blob/bd23751d30c0e9d4e96483a0ae54e00578310ab0/plugin-lessons-plugins/40ResolverPlugin.js | plugin-lessons-plugins/40ResolverPlugin.js | /**
* Just some custom plugin utility(s) I wrote.
*/
const DescriptionFileUtils = require("enhanced-resolve/lib/DescriptionFileUtils");
const createInnerCallback = require("enhanced-resolve/lib/createInnerCallback");
const pluginUtils = require("./plugin-utils");
/**
* @class ResolverPlugin - This is a example of... | javascript | Apache-2.0 | bd23751d30c0e9d4e96483a0ae54e00578310ab0 | 2026-01-05T03:43:16.964923Z | false |
TheLarkInn/everything-is-a-plugin | https://github.com/TheLarkInn/everything-is-a-plugin/blob/bd23751d30c0e9d4e96483a0ae54e00578310ab0/src/index.js | src/index.js | import a from "./a";
import b from "./b";
import c from "./c";
// const contextRequire = (moduleName) => {
// return require(`./context/${moduleName}.js`);
// }
const criticalContextRequire = (moduleName) => {
return require(moduleName); // <=== This should emit a warning by default in webpack, because there ... | javascript | Apache-2.0 | bd23751d30c0e9d4e96483a0ae54e00578310ab0 | 2026-01-05T03:43:16.964923Z | false |
TheLarkInn/everything-is-a-plugin | https://github.com/TheLarkInn/everything-is-a-plugin/blob/bd23751d30c0e9d4e96483a0ae54e00578310ab0/src/b.js | src/b.js | export default "b"; | javascript | Apache-2.0 | bd23751d30c0e9d4e96483a0ae54e00578310ab0 | 2026-01-05T03:43:16.964923Z | false |
TheLarkInn/everything-is-a-plugin | https://github.com/TheLarkInn/everything-is-a-plugin/blob/bd23751d30c0e9d4e96483a0ae54e00578310ab0/src/c.js | src/c.js | export default "c"; | javascript | Apache-2.0 | bd23751d30c0e9d4e96483a0ae54e00578310ab0 | 2026-01-05T03:43:16.964923Z | false |
TheLarkInn/everything-is-a-plugin | https://github.com/TheLarkInn/everything-is-a-plugin/blob/bd23751d30c0e9d4e96483a0ae54e00578310ab0/src/a.js | src/a.js | export default "a"; | javascript | Apache-2.0 | bd23751d30c0e9d4e96483a0ae54e00578310ab0 | 2026-01-05T03:43:16.964923Z | false |
TheLarkInn/everything-is-a-plugin | https://github.com/TheLarkInn/everything-is-a-plugin/blob/bd23751d30c0e9d4e96483a0ae54e00578310ab0/src/wat_module/wat.js | src/wat_module/wat.js | console.log("I AM BUNDLED!"); | javascript | Apache-2.0 | bd23751d30c0e9d4e96483a0ae54e00578310ab0 | 2026-01-05T03:43:16.964923Z | false |
TheLarkInn/everything-is-a-plugin | https://github.com/TheLarkInn/everything-is-a-plugin/blob/bd23751d30c0e9d4e96483a0ae54e00578310ab0/src/lazy/lazy-b.js | src/lazy/lazy-b.js | export default "lazy-b"; | javascript | Apache-2.0 | bd23751d30c0e9d4e96483a0ae54e00578310ab0 | 2026-01-05T03:43:16.964923Z | false |
TheLarkInn/everything-is-a-plugin | https://github.com/TheLarkInn/everything-is-a-plugin/blob/bd23751d30c0e9d4e96483a0ae54e00578310ab0/src/lazy/lazy-c.js | src/lazy/lazy-c.js | export default "lazy-c"; | javascript | Apache-2.0 | bd23751d30c0e9d4e96483a0ae54e00578310ab0 | 2026-01-05T03:43:16.964923Z | false |
TheLarkInn/everything-is-a-plugin | https://github.com/TheLarkInn/everything-is-a-plugin/blob/bd23751d30c0e9d4e96483a0ae54e00578310ab0/src/lazy/lazy-a.js | src/lazy/lazy-a.js | export default "lazy-a"; | javascript | Apache-2.0 | bd23751d30c0e9d4e96483a0ae54e00578310ab0 | 2026-01-05T03:43:16.964923Z | false |
TheLarkInn/everything-is-a-plugin | https://github.com/TheLarkInn/everything-is-a-plugin/blob/bd23751d30c0e9d4e96483a0ae54e00578310ab0/src/lazy/lazy-hijacked-request.js | src/lazy/lazy-hijacked-request.js | export default "lazy-hijacked-request"; | javascript | Apache-2.0 | bd23751d30c0e9d4e96483a0ae54e00578310ab0 | 2026-01-05T03:43:16.964923Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.