_id stringlengths 2 6 | title stringlengths 0 58 | partition stringclasses 3
values | text stringlengths 52 373k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q61900 | val | validation | function val(node, _val2) {
if (node && node.el) {
var el = node.el;
if (_val2 !== undefined) {
el.value = _val2;
} else {
return el.value;
}
}
} | javascript | {
"resource": ""
} |
q61901 | on | validation | function on(element, ev, cb, context) {
for (var _len = arguments.length, args = Array(_len > 4 ? _len - 4 : 0), _key = 4; _key < _len; _key++) {
args[_key - 4] = arguments[_key];
}
var _this = this;
var el = element.el,
events = ev.split... | javascript | {
"resource": ""
} |
q61902 | remove | validation | function remove(el) {
while (el._events.length > 0) {
el._events.shift().remove();
}
if (el.children) {
destroy(el.children);
}
if (el.elGroup !== undefined) {
el.elGroup.delete(el.el);
}
... | javascript | {
"resource": ""
} |
q61903 | onDOMAttached | validation | function onDOMAttached(el) {
var _this2 = this;
var handlers = [],
attached = false,
_step = undefined;
if (el.el !== undefined) {
_step = function step() {
if (attached) {
while (handlers.l... | javascript | {
"resource": ""
} |
q61904 | match | validation | function match({ just, nothing }) {
return function (maybe) {
for (const value of maybe) {
return just(value);
}
return nothing();
};
} | javascript | {
"resource": ""
} |
q61905 | flatMap | validation | function flatMap(mapper) {
return function (maybe) {
for (const value of maybe) {
return mapper(value);
}
return maybe_1.nothing();
};
} | javascript | {
"resource": ""
} |
q61906 | filter | validation | function filter(predicate) {
return flatMap(value => predicate(value) ? maybe_1.just(value) : maybe_1.nothing());
} | javascript | {
"resource": ""
} |
q61907 | or | validation | function or(defaultValue) {
return function (maybe) {
for (const value of maybe) {
return maybe_1.just(value);
}
return defaultValue;
};
} | javascript | {
"resource": ""
} |
q61908 | validation | function(e){
var history=S.History, current = history.getFragment();
if(OLD_IE && current == history.fragment && history.iframe) current = history.getFragment(history.getHash(history.iframe));
if(current == history.fragment) return false;
if(history.iframe) history.navigate(current);
history.loadUrl();
... | javascript | {
"resource": ""
} | |
q61909 | validation | function(fragmentOverride,state){
var fragment = baseUrl+( this.fragment = this.getFragment(fragmentOverride));
if(fragment){
var a=$('a[href="'+fragment+'"]');
a.length===0 ? S.redirect(fragment) : a.click();
}
} | javascript | {
"resource": ""
} | |
q61910 | createInstance | test | function createInstance(defaultConfig) {
var context = new Axios(defaultConfig);
var instance = bind(Axios.prototype.request, context);
// Copy axios.prototype to instance
utils.extend(instance, Axios.prototype, context);
// Copy context to instance
utils.extend(instance, context);
return instance;
} | javascript | {
"resource": ""
} |
q61911 | CancelToken | test | function CancelToken(executor) {
if (typeof executor !== 'function') {
throw new TypeError('executor must be a function.');
}
var resolvePromise;
this.promise = new Promise(function promiseExecutor(resolve) {
resolvePromise = resolve;
});
var token = this;
executor(function cancel(message) {
... | javascript | {
"resource": ""
} |
q61912 | isArrayBufferView | test | function isArrayBufferView(val) {
var result;
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
result = ArrayBuffer.isView(val);
} else {
result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
}
return result;
} | javascript | {
"resource": ""
} |
q61913 | isStandardBrowserEnv | test | function isStandardBrowserEnv() {
if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
navigator.product === 'NativeScript' ||
navigator.product === 'NS')) {
return false;
}
return (
typeof win... | javascript | {
"resource": ""
} |
q61914 | forEach | test | function forEach(obj, fn) {
// Don't bother if no value provided
if (obj === null || typeof obj === 'undefined') {
return;
}
// Force an array if not already something iterable
if (typeof obj !== 'object') {
/*eslint no-param-reassign:0*/
obj = [obj];
}
if (isArray(obj)) {
// Iterate ove... | javascript | {
"resource": ""
} |
q61915 | extend | test | function extend(a, b, thisArg) {
forEach(b, function assignValue(val, key) {
if (thisArg && typeof val === 'function') {
a[key] = bind(val, thisArg);
} else {
a[key] = val;
}
});
return a;
} | javascript | {
"resource": ""
} |
q61916 | writePackageManifest | test | function writePackageManifest (packageName) {
const packagePath = require.resolve(packageName + '/package.json')
let { name, main, author, license, types, typings } = require(packagePath)
if (!main) {
main = 'index.js'
}
let typesFile = types || typings
if (typesFile) {
typesFile = require.resolve(... | javascript | {
"resource": ""
} |
q61917 | processMessage | test | function processMessage (e) {
const obj = JSON.parse(e.data)
switch (obj.action) {
case 'building': {
console.log(
'[HMR] bundle ' + (obj.name ? "'" + obj.name + "' " : '') +
'rebuilding'
)
break
}
case 'built':
case 'sync': {
clearOutdatedErrors()
if (... | javascript | {
"resource": ""
} |
q61918 | tryApplyUpdates | test | async function tryApplyUpdates (onHotUpdateSuccess) {
if (!module.hot) {
// HotModuleReplacementPlugin is not in Webpack configuration.
console.error('HotModuleReplacementPlugin is not in Webpack configuration.')
// window.location.reload();
return
}
if (!isUpdateAvailable() || !canApplyUpdates()... | javascript | {
"resource": ""
} |
q61919 | tryApplyUpdates | test | async function tryApplyUpdates () {
if (!isUpdateAvailable() || !canApplyUpdates()) {
return
}
try {
const res = await fetch(`${hotUpdatePath}${curHash}.hot-update.json`)
const data = await res.json()
const curPage = page === '/' ? 'index' : page
const pageUpdated = Object.keys(data.c)
.... | javascript | {
"resource": ""
} |
q61920 | formatMessage | test | function formatMessage (message, isError) {
let lines = message.split('\n')
// Strip Webpack-added headers off errors/warnings
// https://github.com/webpack/webpack/blob/master/lib/ModuleError.js
lines = lines.filter(line => !/Module [A-z ]+\(from/.test(line))
// Transform parsing error into syntax error
... | javascript | {
"resource": ""
} |
q61921 | UDecimalPad | test | function UDecimalPad(num, precision) {
var value = UDecimalString(num);
assert.equal("number", typeof precision === 'undefined' ? 'undefined' : (0, _typeof3.default)(precision), "precision");
var part = value.split(".");
if (precision === 0 && part.length === 1) {
return part[0];
}
if... | javascript | {
"resource": ""
} |
q61922 | parseSegment | test | function parseSegment(buffer, offset) {
let typeKey = buffer[offset];
if (typeKey <= 20) {
if (buffer[offset + 1] == undefined) throw new Error("ParseError: No value for uint8");
return { typeKey: typeKey, value: buffer[offset + 1], bufferLength: 2 };
}
if (typeKey <= 40) {
if (... | javascript | {
"resource": ""
} |
q61923 | parseSegments | test | function parseSegments(buffer) {
if (buffer.length == 0) throw new Error("bad segments stream");
let pointer = 0;
let segments = [ ];
while (pointer < buffer.length) {
let seg = parseSegment(buffer, pointer);
segments.push(seg);
pointer += seg.bufferLength;
delete seg.b... | javascript | {
"resource": ""
} |
q61924 | parseQRCode | test | function parseQRCode(text, options) {
if (text.length < 3 || text.length > 2000) throw new Error("Invalid length of EvtLink");
let textSplited = text.split("_");
if (textSplited.length > 2) return null;
let rawText;
if (textSplited[0].startsWith(qrPrefix)) {
rawText = textSplited[0].subst... | javascript | {
"resource": ""
} |
q61925 | __calcKeyProvider | test | async function __calcKeyProvider(keyProvider) {
if (!keyProvider) { return []; }
// if keyProvider is function
if (keyProvider.apply && keyProvider.call) {
keyProvider = keyProvider();
}
// resolve for Promise
keyProvider = await Promise.resolve(keyProvider);
if (!Array.isArray(ke... | javascript | {
"resource": ""
} |
q61926 | random32ByteBuffer | test | function random32ByteBuffer({cpuEntropyBits = 0, safe = true} = {}) {
assert.equal(typeof cpuEntropyBits, "number", "cpuEntropyBits");
assert.equal(typeof safe, "boolean", "boolean");
if(safe) {
assert(entropyCount >= 128, "Call initialize() to add entropy (current: " + entropyCount + ")");
}
... | javascript | {
"resource": ""
} |
q61927 | addEntropy | test | function addEntropy(...ints) {
assert.equal(externalEntropyArray.length, 101, "externalEntropyArray");
entropyCount += ints.length;
for(const i of ints) {
const pos = entropyPos++ % 101;
const i2 = externalEntropyArray[pos] += i;
if(i2 > 9007199254740991)
externalEntropy... | javascript | {
"resource": ""
} |
q61928 | cpuEntropy | test | function cpuEntropy(cpuEntropyBits = 128) {
let collected = [];
let lastCount = null;
let lowEntropySamples = 0;
while(collected.length < cpuEntropyBits) {
const count = floatingPointCount();
if(lastCount != null) {
const delta = count - lastCount;
if(Math.abs(del... | javascript | {
"resource": ""
} |
q61929 | cryptoJsDecrypt | test | function cryptoJsDecrypt(message, key, iv) {
assert(message, "Missing cipher text");
message = toBinaryBuffer(message);
const decipher = crypto.createDecipheriv("aes-256-cbc", key, iv);
// decipher.setAutoPadding(true)
message = Buffer.concat([decipher.update(message), decipher.final()]);
return... | javascript | {
"resource": ""
} |
q61930 | initialize | test | function initialize() {
if(initialized) {
return;
}
unitTest();
keyUtils.addEntropy(...keyUtils.cpuEntropy());
assert(keyUtils.entropyCount() >= 128, "insufficient entropy");
initialized = true;
} | javascript | {
"resource": ""
} |
q61931 | montConvert | test | function montConvert(x) {
var r = new BigInteger()
x.abs()
.dlShiftTo(this.m.t, r)
r.divRemTo(this.m, null, r)
if (x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r, r)
return r
} | javascript | {
"resource": ""
} |
q61932 | verify | test | function verify(data, pubkey, encoding = "utf8") {
if (typeof data === "string") {
data = Buffer.from(data, encoding);
}
assert(Buffer.isBuffer(data), "data is a required String or Buffer");
data = hash.sha256(data);
return verifyHash(data, pubkey);
} | javascript | {
"resource": ""
} |
q61933 | recover | test | function recover(data, encoding = "utf8") {
if (typeof data === "string") {
data = Buffer.from(data, encoding);
}
assert(Buffer.isBuffer(data), "data is a required String or Buffer");
data = hash.sha256(data);
return recoverHash(data);
} | javascript | {
"resource": ""
} |
q61934 | invokeWith | test | function invokeWith(msg) {
// Debugging can be done using println like this
print('Finding comments in ' + msg.getRequestHeader().getURI().toString());
var body = msg.getResponseBody().toString()
// Look for html comments
if (body.indexOf('<!--') > 0) {
var o = body.indexOf('<!--');
while (o > 0) {
var e ... | javascript | {
"resource": ""
} |
q61935 | FormGroup | test | function FormGroup(props) {
const { children, className, grouped, inline, unstackable, widths } = props
const classes = cx(
useKeyOnly(grouped, 'grouped'),
useKeyOnly(inline, 'inline'),
useKeyOnly(unstackable, 'unstackable'),
useWidthProp(widths, null, true),
'fields',
className,
)
cons... | javascript | {
"resource": ""
} |
q61936 | Loader | test | function Loader(props) {
const {
active,
children,
className,
content,
disabled,
indeterminate,
inline,
inverted,
size,
} = props
const classes = cx(
'ui',
size,
useKeyOnly(active, 'active'),
useKeyOnly(disabled, 'disabled'),
useKeyOnly(indeterminate, 'inde... | javascript | {
"resource": ""
} |
q61937 | ItemContent | test | function ItemContent(props) {
const { children, className, content, description, extra, header, meta, verticalAlign } = props
const classes = cx(useVerticalAlignProp(verticalAlign), 'content', className)
const rest = getUnhandledProps(ItemContent, props)
const ElementType = getElementType(ItemContent, props)
... | javascript | {
"resource": ""
} |
q61938 | Table | test | function Table(props) {
const {
attached,
basic,
celled,
children,
className,
collapsing,
color,
columns,
compact,
definition,
fixed,
footerRow,
headerRow,
headerRows,
inverted,
padded,
renderBodyRow,
selectable,
singleLine,
size,
sor... | javascript | {
"resource": ""
} |
q61939 | Rail | test | function Rail(props) {
const {
attached,
children,
className,
close,
content,
dividing,
internal,
position,
size,
} = props
const classes = cx(
'ui',
position,
size,
useKeyOnly(attached, 'attached'),
useKeyOnly(dividing, 'dividing'),
useKeyOnly(internal... | javascript | {
"resource": ""
} |
q61940 | ButtonGroup | test | function ButtonGroup(props) {
const {
attached,
basic,
buttons,
children,
className,
color,
compact,
content,
floated,
fluid,
icon,
inverted,
labeled,
negative,
positive,
primary,
secondary,
size,
toggle,
vertical,
widths,
} = props... | javascript | {
"resource": ""
} |
q61941 | GridRow | test | function GridRow(props) {
const {
centered,
children,
className,
color,
columns,
divided,
only,
reversed,
stretched,
textAlign,
verticalAlign,
} = props
const classes = cx(
color,
useKeyOnly(centered, 'centered'),
useKeyOnly(divided, 'divided'),
useKeyO... | javascript | {
"resource": ""
} |
q61942 | FormField | test | function FormField(props) {
const {
children,
className,
content,
control,
disabled,
error,
inline,
label,
required,
type,
width,
} = props
const classes = cx(
useKeyOnly(disabled, 'disabled'),
useKeyOnly(error, 'error'),
useKeyOnly(inline, 'inline'),
u... | javascript | {
"resource": ""
} |
q61943 | CardContent | test | function CardContent(props) {
const { children, className, content, description, extra, header, meta, textAlign } = props
const classes = cx(useKeyOnly(extra, 'extra'), useTextAlignProp(textAlign), 'content', className)
const rest = getUnhandledProps(CardContent, props)
const ElementType = getElementType(CardC... | javascript | {
"resource": ""
} |
q61944 | Item | test | function Item(props) {
const { children, className, content, description, extra, header, image, meta } = props
const classes = cx('item', className)
const rest = getUnhandledProps(Item, props)
const ElementType = getElementType(Item, props)
if (!childrenUtils.isNil(children)) {
return (
<ElementTy... | javascript | {
"resource": ""
} |
q61945 | CommentAvatar | test | function CommentAvatar(props) {
const { className, src } = props
const classes = cx('avatar', className)
const rest = getUnhandledProps(CommentAvatar, props)
const [imageProps, rootProps] = partitionHTMLProps(rest, { htmlProps: htmlImageProps })
const ElementType = getElementType(CommentAvatar, props)
ret... | javascript | {
"resource": ""
} |
q61946 | StatisticLabel | test | function StatisticLabel(props) {
const { children, className, content } = props
const classes = cx('label', className)
const rest = getUnhandledProps(StatisticLabel, props)
const ElementType = getElementType(StatisticLabel, props)
return (
<ElementType {...rest} className={classes}>
{childrenUtils.... | javascript | {
"resource": ""
} |
q61947 | FeedMeta | test | function FeedMeta(props) {
const { children, className, content, like } = props
const classes = cx('meta', className)
const rest = getUnhandledProps(FeedMeta, props)
const ElementType = getElementType(FeedMeta, props)
if (!childrenUtils.isNil(children)) {
return (
<ElementType {...rest} className=... | javascript | {
"resource": ""
} |
q61948 | Container | test | function Container(props) {
const { children, className, content, fluid, text, textAlign } = props
const classes = cx(
'ui',
useKeyOnly(text, 'text'),
useKeyOnly(fluid, 'fluid'),
useTextAlignProp(textAlign),
'container',
className,
)
const rest = getUnhandledProps(Container, props)
con... | javascript | {
"resource": ""
} |
q61949 | StepGroup | test | function StepGroup(props) {
const {
attached,
children,
className,
content,
fluid,
items,
ordered,
size,
stackable,
unstackable,
vertical,
widths,
} = props
const classes = cx(
'ui',
size,
useKeyOnly(fluid, 'fluid'),
useKeyOnly(ordered, 'ordered'),
... | javascript | {
"resource": ""
} |
q61950 | Divider | test | function Divider(props) {
const {
children,
className,
clearing,
content,
fitted,
hidden,
horizontal,
inverted,
section,
vertical,
} = props
const classes = cx(
'ui',
useKeyOnly(clearing, 'clearing'),
useKeyOnly(fitted, 'fitted'),
useKeyOnly(hidden, 'hidden... | javascript | {
"resource": ""
} |
q61951 | Header | test | function Header(props) {
const {
attached,
block,
children,
className,
color,
content,
disabled,
dividing,
floated,
icon,
image,
inverted,
size,
sub,
subheader,
textAlign,
} = props
const classes = cx(
'ui',
color,
size,
useKeyOnly(b... | javascript | {
"resource": ""
} |
q61952 | Grid | test | function Grid(props) {
const {
celled,
centered,
children,
className,
columns,
container,
divided,
doubling,
inverted,
padded,
relaxed,
reversed,
stackable,
stretched,
textAlign,
verticalAlign,
} = props
const classes = cx(
'ui',
useKeyOnly(... | javascript | {
"resource": ""
} |
q61953 | Breadcrumb | test | function Breadcrumb(props) {
const { children, className, divider, icon, sections, size } = props
const classes = cx('ui', size, 'breadcrumb', className)
const rest = getUnhandledProps(Breadcrumb, props)
const ElementType = getElementType(Breadcrumb, props)
if (!childrenUtils.isNil(children)) {
return (... | javascript | {
"resource": ""
} |
q61954 | CardDescription | test | function CardDescription(props) {
const { children, className, content, textAlign } = props
const classes = cx(useTextAlignProp(textAlign), 'description', className)
const rest = getUnhandledProps(CardDescription, props)
const ElementType = getElementType(CardDescription, props)
return (
<ElementType {..... | javascript | {
"resource": ""
} |
q61955 | ItemGroup | test | function ItemGroup(props) {
const { children, className, content, divided, items, link, relaxed, unstackable } = props
const classes = cx(
'ui',
useKeyOnly(divided, 'divided'),
useKeyOnly(link, 'link'),
useKeyOnly(unstackable, 'unstackable'),
useKeyOrValueAndKey(relaxed, 'relaxed'),
'items'... | javascript | {
"resource": ""
} |
q61956 | GridColumn | test | function GridColumn(props) {
const {
children,
className,
computer,
color,
floated,
largeScreen,
mobile,
only,
stretched,
tablet,
textAlign,
verticalAlign,
widescreen,
width,
} = props
const classes = cx(
color,
useKeyOnly(stretched, 'stretched'),
... | javascript | {
"resource": ""
} |
q61957 | ItemImage | test | function ItemImage(props) {
const { size } = props
const rest = getUnhandledProps(ItemImage, props)
return <Image {...rest} size={size} ui={!!size} wrapped />
} | javascript | {
"resource": ""
} |
q61958 | CardGroup | test | function CardGroup(props) {
const {
centered,
children,
className,
content,
doubling,
items,
itemsPerRow,
stackable,
textAlign,
} = props
const classes = cx(
'ui',
useKeyOnly(centered, 'centered'),
useKeyOnly(doubling, 'doubling'),
useKeyOnly(stackable, 'stacka... | javascript | {
"resource": ""
} |
q61959 | TableRow | test | function TableRow(props) {
const {
active,
cellAs,
cells,
children,
className,
disabled,
error,
negative,
positive,
textAlign,
verticalAlign,
warning,
} = props
const classes = cx(
useKeyOnly(active, 'active'),
useKeyOnly(disabled, 'disabled'),
useKeyOn... | javascript | {
"resource": ""
} |
q61960 | FeedEvent | test | function FeedEvent(props) {
const {
content,
children,
className,
date,
extraImages,
extraText,
image,
icon,
meta,
summary,
} = props
const classes = cx('event', className)
const rest = getUnhandledProps(FeedEvent, props)
const ElementType = getElementType(FeedEvent, p... | javascript | {
"resource": ""
} |
q61961 | TabPane | test | function TabPane(props) {
const { active, children, className, content, loading } = props
const classes = cx(useKeyOnly(active, 'active'), useKeyOnly(loading, 'loading'), 'tab', className)
const rest = getUnhandledProps(TabPane, props)
const ElementType = getElementType(TabPane, props)
const calculatedDefau... | javascript | {
"resource": ""
} |
q61962 | ListContent | test | function ListContent(props) {
const { children, className, content, description, floated, header, verticalAlign } = props
const classes = cx(
useValueAndKey(floated, 'floated'),
useVerticalAlignProp(verticalAlign),
'content',
className,
)
const rest = getUnhandledProps(ListContent, props)
con... | javascript | {
"resource": ""
} |
q61963 | ButtonOr | test | function ButtonOr(props) {
const { className, text } = props
const classes = cx('or', className)
const rest = getUnhandledProps(ButtonOr, props)
const ElementType = getElementType(ButtonOr, props)
return <ElementType {...rest} className={classes} data-text={text} />
} | javascript | {
"resource": ""
} |
q61964 | TableCell | test | function TableCell(props) {
const {
active,
children,
className,
collapsing,
content,
disabled,
error,
icon,
negative,
positive,
selectable,
singleLine,
textAlign,
verticalAlign,
warning,
width,
} = props
const classes = cx(
useKeyOnly(active, '... | javascript | {
"resource": ""
} |
q61965 | BreadcrumbDivider | test | function BreadcrumbDivider(props) {
const { children, className, content, icon } = props
const classes = cx('divider', className)
const rest = getUnhandledProps(BreadcrumbDivider, props)
const ElementType = getElementType(BreadcrumbDivider, props)
if (!_.isNil(icon)) {
return Icon.create(icon, {
d... | javascript | {
"resource": ""
} |
q61966 | MessageList | test | function MessageList(props) {
const { children, className, items } = props
const classes = cx('list', className)
const rest = getUnhandledProps(MessageList, props)
const ElementType = getElementType(MessageList, props)
return (
<ElementType {...rest} className={classes}>
{childrenUtils.isNil(childr... | javascript | {
"resource": ""
} |
q61967 | TableFooter | test | function TableFooter(props) {
const { as } = props
const rest = getUnhandledProps(TableFooter, props)
return <TableHeader {...rest} as={as} />
} | javascript | {
"resource": ""
} |
q61968 | CommentGroup | test | function CommentGroup(props) {
const { className, children, collapsed, content, minimal, size, threaded } = props
const classes = cx(
'ui',
size,
useKeyOnly(collapsed, 'collapsed'),
useKeyOnly(minimal, 'minimal'),
useKeyOnly(threaded, 'threaded'),
'comments',
className,
)
const rest... | javascript | {
"resource": ""
} |
q61969 | Reveal | test | function Reveal(props) {
const { active, animated, children, className, content, disabled, instant } = props
const classes = cx(
'ui',
animated,
useKeyOnly(active, 'active'),
useKeyOnly(disabled, 'disabled'),
useKeyOnly(instant, 'instant'),
'reveal',
className,
)
const rest = getUnh... | javascript | {
"resource": ""
} |
q61970 | Segment | test | function Segment(props) {
const {
attached,
basic,
children,
circular,
className,
clearing,
color,
compact,
content,
disabled,
floated,
inverted,
loading,
placeholder,
padded,
piled,
raised,
secondary,
size,
stacked,
tertiary,
tex... | javascript | {
"resource": ""
} |
q61971 | PlaceholderLine | test | function PlaceholderLine(props) {
const { className, length } = props
const classes = cx('line', length, className)
const rest = getUnhandledProps(PlaceholderLine, props)
const ElementType = getElementType(PlaceholderLine, props)
return <ElementType {...rest} className={classes} />
} | javascript | {
"resource": ""
} |
q61972 | RevealContent | test | function RevealContent(props) {
const { children, className, content, hidden, visible } = props
const classes = cx(
'ui',
useKeyOnly(hidden, 'hidden'),
useKeyOnly(visible, 'visible'),
'content',
className,
)
const rest = getUnhandledProps(RevealContent, props)
const ElementType = getEleme... | javascript | {
"resource": ""
} |
q61973 | FeedLike | test | function FeedLike(props) {
const { children, className, content, icon } = props
const classes = cx('like', className)
const rest = getUnhandledProps(FeedLike, props)
const ElementType = getElementType(FeedLike, props)
if (!childrenUtils.isNil(children)) {
return (
<ElementType {...rest} className=... | javascript | {
"resource": ""
} |
q61974 | Placeholder | test | function Placeholder(props) {
const { children, className, content, fluid, inverted } = props
const classes = cx(
'ui',
useKeyOnly(fluid, 'fluid'),
useKeyOnly(inverted, 'inverted'),
'placeholder',
className,
)
const rest = getUnhandledProps(Placeholder, props)
const ElementType = getElemen... | javascript | {
"resource": ""
} |
q61975 | Accordion | test | function Accordion(props) {
const { className, fluid, inverted, styled } = props
const classes = cx(
'ui',
useKeyOnly(fluid, 'fluid'),
useKeyOnly(inverted, 'inverted'),
useKeyOnly(styled, 'styled'),
className,
)
const rest = getUnhandledProps(Accordion, props)
return <AccordionAccordion ... | javascript | {
"resource": ""
} |
q61976 | PlaceholderImage | test | function PlaceholderImage(props) {
const { className, square, rectangular } = props
const classes = cx(
useKeyOnly(square, 'square'),
useKeyOnly(rectangular, 'rectangular'),
'image',
className,
)
const rest = getUnhandledProps(PlaceholderImage, props)
const ElementType = getElementType(Placeho... | javascript | {
"resource": ""
} |
q61977 | DropdownMenu | test | function DropdownMenu(props) {
const { children, className, content, direction, open, scrolling } = props
const classes = cx(
direction,
useKeyOnly(open, 'visible'),
useKeyOnly(scrolling, 'scrolling'),
'menu transition',
className,
)
const rest = getUnhandledProps(DropdownMenu, props)
cons... | javascript | {
"resource": ""
} |
q61978 | ListIcon | test | function ListIcon(props) {
const { className, verticalAlign } = props
const classes = cx(useVerticalAlignProp(verticalAlign), className)
const rest = getUnhandledProps(ListIcon, props)
return <Icon {...rest} className={classes} />
} | javascript | {
"resource": ""
} |
q61979 | Advertisement | test | function Advertisement(props) {
const { centered, children, className, content, test, unit } = props
const classes = cx(
'ui',
unit,
useKeyOnly(centered, 'centered'),
useKeyOnly(test, 'test'),
'ad',
className,
)
const rest = getUnhandledProps(Advertisement, props)
const ElementType = ... | javascript | {
"resource": ""
} |
q61980 | StatisticGroup | test | function StatisticGroup(props) {
const { children, className, color, content, horizontal, inverted, items, size, widths } = props
const classes = cx(
'ui',
color,
size,
useKeyOnly(horizontal, 'horizontal'),
useKeyOnly(inverted, 'inverted'),
useWidthProp(widths),
'statistics',
classN... | javascript | {
"resource": ""
} |
q61981 | Statistic | test | function Statistic(props) {
const {
children,
className,
color,
content,
floated,
horizontal,
inverted,
label,
size,
text,
value,
} = props
const classes = cx(
'ui',
color,
size,
useValueAndKey(floated, 'floated'),
useKeyOnly(horizontal, 'horizontal... | javascript | {
"resource": ""
} |
q61982 | SegmentGroup | test | function SegmentGroup(props) {
const { children, className, compact, content, horizontal, piled, raised, size, stacked } = props
const classes = cx(
'ui',
size,
useKeyOnly(compact, 'compact'),
useKeyOnly(horizontal, 'horizontal'),
useKeyOnly(piled, 'piled'),
useKeyOnly(raised, 'raised'),
... | javascript | {
"resource": ""
} |
q61983 | TableHeaderCell | test | function TableHeaderCell(props) {
const { as, className, sorted } = props
const classes = cx(useValueAndKey(sorted, 'sorted'), className)
const rest = getUnhandledProps(TableHeaderCell, props)
return <TableCell {...rest} as={as} className={classes} />
} | javascript | {
"resource": ""
} |
q61984 | Feed | test | function Feed(props) {
const { children, className, events, size } = props
const classes = cx('ui', size, 'feed', className)
const rest = getUnhandledProps(Feed, props)
const ElementType = getElementType(Feed, props)
if (!childrenUtils.isNil(children)) {
return (
<ElementType {...rest} className={... | javascript | {
"resource": ""
} |
q61985 | LabelGroup | test | function LabelGroup(props) {
const { children, circular, className, color, content, size, tag } = props
const classes = cx(
'ui',
color,
size,
useKeyOnly(circular, 'circular'),
useKeyOnly(tag, 'tag'),
'labels',
className,
)
const rest = getUnhandledProps(LabelGroup, props)
const E... | javascript | {
"resource": ""
} |
q61986 | FeedExtra | test | function FeedExtra(props) {
const { children, className, content, images, text } = props
const classes = cx(
useKeyOnly(images, 'images'),
useKeyOnly(content || text, 'text'),
'extra',
className,
)
const rest = getUnhandledProps(FeedExtra, props)
const ElementType = getElementType(FeedExtra, ... | javascript | {
"resource": ""
} |
q61987 | DropdownDivider | test | function DropdownDivider(props) {
const { className } = props
const classes = cx('divider', className)
const rest = getUnhandledProps(DropdownDivider, props)
const ElementType = getElementType(DropdownDivider, props)
return <ElementType {...rest} className={classes} />
} | javascript | {
"resource": ""
} |
q61988 | FeedSummary | test | function FeedSummary(props) {
const { children, className, content, date, user } = props
const classes = cx('summary', className)
const rest = getUnhandledProps(FeedSummary, props)
const ElementType = getElementType(FeedSummary, props)
if (!childrenUtils.isNil(children)) {
return (
<ElementType {.... | javascript | {
"resource": ""
} |
q61989 | StepContent | test | function StepContent(props) {
const { children, className, content, description, title } = props
const classes = cx('content', className)
const rest = getUnhandledProps(StepContent, props)
const ElementType = getElementType(StepContent, props)
if (!childrenUtils.isNil(children)) {
return (
<Element... | javascript | {
"resource": ""
} |
q61990 | Image | test | function Image(props) {
const {
avatar,
bordered,
centered,
children,
circular,
className,
content,
dimmer,
disabled,
floated,
fluid,
hidden,
href,
inline,
label,
rounded,
size,
spaced,
verticalAlign,
wrapped,
ui,
} = props
const... | javascript | {
"resource": ""
} |
q61991 | test | function(canvas) {
var context = canvas.getContext('2d'),
devicePixelRatio = window.devicePixelRatio || 1,
backingStorePixelRatio = context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio
|| context.msBackingStorePixelRatio || conte... | javascript | {
"resource": ""
} | |
q61992 | test | function(render, background) {
var cssBackground = background;
if (/(jpg|gif|png)$/.test(background))
cssBackground = 'url(' + background + ')';
render.canvas.style.background = cssBackground;
render.canvas.style.backgroundSize = "contain";
render.currentBackground ... | javascript | {
"resource": ""
} | |
q61993 | test | function(render, body) {
var bodyRender = body.render,
texturePath = bodyRender.sprite.texture,
texture = _getTexture(render, texturePath),
sprite = new PIXI.Sprite(texture);
sprite.anchor.x = body.render.sprite.xOffset;
sprite.anchor.y = body.render.sprite.y... | javascript | {
"resource": ""
} | |
q61994 | test | function(render, body) {
var bodyRender = body.render,
options = render.options,
primitive = new PIXI.Graphics(),
fillStyle = Common.colorToNumber(bodyRender.fillStyle),
strokeStyle = Common.colorToNumber(bodyRender.strokeStyle),
strokeStyleIndicator =... | javascript | {
"resource": ""
} | |
q61995 | test | function(body, options) {
options = options || {};
// init required properties (order is important)
Body.set(body, {
bounds: body.bounds || Bounds.create(body.vertices),
positionPrev: body.positionPrev || Vector.clone(body.position),
anglePrev: body.anglePrev... | javascript | {
"resource": ""
} | |
q61996 | createPages | test | async function createPages({ actions, graphql }) {
const retrieveMarkdownPages = () =>
graphql(`
{
allMarkdownRemark(limit: 1000) {
edges {
node {
frontmatter {
path
}
}
}
}
}
`)
const exampleTemplate = path.resolve(`src/templates/exampleTemplate.tsx`)
c... | javascript | {
"resource": ""
} |
q61997 | isWindow | test | function isWindow(val) {
if (typeof val !== "object") {
return false;
}
const wrapper = idlUtils.wrapperForImpl(val);
if (typeof wrapper === "object") {
return wrapper === wrapper._globalProxy;
}
// `val` may be either impl or wrapper currently, because webidl2js currently unwraps Window objects (a... | javascript | {
"resource": ""
} |
q61998 | normalizeEventHandlerOptions | test | function normalizeEventHandlerOptions(options, defaultBoolKeys) {
const returnValue = {};
// no need to go further here
if (typeof options === "boolean" || options === null || typeof options === "undefined") {
returnValue.capture = Boolean(options);
return returnValue;
}
// non objects options so we... | javascript | {
"resource": ""
} |
q61999 | sammary | test | function sammary() {
const nodeFn = function ({ parentPaths, lang, item, isDir, result }) {
const navTitle = generateNavTitle({ parentPaths, item, sign: isDir ? '-' : '*', lang });
result.push(navTitle);
};
langs.forEach(dir => {
const SUMMARY = 'SUMMARY.md';
const targetFile = path.join(docsDir,... | javascript | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.