Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Akimov Vladimir b2whats

🎯
Focusing
Block or report user

Report or block b2whats

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Infrastructure.js
let cache = new Map();
let pending = new Map();
function fetchTextSync(url) {
if (cache.has(url)) {
return cache.get(url);
}
if (pending.has(url)) {
throw pending.get(url);
}
View requirements.md

Наименование компонента

Минимальное описание или графческое представление

Обсуждение

Тут бубут находится все обсуждения этого компонента в виде форализованных сообщений, ссылки на возможный дизайн и примеры

Когда использовать

View notificationManager
Так мы пушим нотификации из любого места системы, статическое свойство класса.
NotificationManager.addMessage({
id?: number | string,
content: React.Node,
timeout?: number,
onClose?: (event: SyntheticEvent<HTMLElement>) => void
})
@b2whats
b2whats / index.html
Created Jul 9, 2018 — forked from RubaXa/index.html
(key in object) vs. (object[key] !== void 0) vs. object.hasOwnProperty(key) (http://jsbench.github.io/#1aebf699d73fb743127903c0b0a8bece) #jsbench #jsperf
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>(key in object) vs. (object[key] !== void 0) vs. object.hasOwnProperty(key)</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
View babel-types-described.js
{ __esModule: true,
is: [function is(type /*: string*/, node /*: Object*/, opts /*:: ?: Object*/, skipAliasCheck /*:: ?: boolean*/) /*: boolean*/ ],
isType: [function isType(nodeType /*: string*/, targetType /*: string*/) /*: boolean*/ ],
validate: [function validate(node, key, val) ],
shallowEqual: [function shallowEqual(actual /*: Object*/, expected /*: Object*/) /*: boolean*/ ],
appendToMemberExpression: [function appendToMemberExpression(member /*: Object*/, append /*: Object*/, computed /*:: ?: boolean*/) /*: Object*/ ],
prependToMemberExpression: [function prependToMemberExpression(member /*: Object*/, prepend /*: Object*/) /*: Object*/ ],
ensureBlock: [function ensureBlock(node /*: Object*/) ],
clone: [function clone(node /*: Object*/) /*: Object*/ ],
cloneDeep: [function cloneDeep(node /*: Object*/) /*: Object*/ ],
View css.md
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Untitled benchmark</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@b2whats
b2whats / index.html
Last active Aug 15, 2017 — forked from RubaXa/index.html
String#includes vs. String#indexOf vs. RegExp (http://jsbench.github.io/#e9d85ace4fc1febe3744e39d2a2269db) #jsbench #jsperf
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>String#includes vs. String#indexOf vs. RegExp</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
View scheme.js
scheme: {
rowHeight: 45,
headerHeight: 30,
rowClick: true,
checkbox: true,
counter: true,
columns: [{
type: 'text',
dataKey: 'name',
label: 'Name',
View switch.js
function getSnack (type) {
var snack;
function isDrink () {
return snack = 'Drink';
}
function isFood () {
return snack = 'Food';
}
var snacks = {
'coke': isDrink,
You can’t perform that action at this time.