Skip to content

Instantly share code, notes, and snippets.

View b2whats's full-sized avatar
🎯
Focusing

Akimov Vladimir b2whats

🎯
Focusing
View GitHub Profile
{ __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*/ ],
<!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 August 15, 2017 14:38 — forked from RubaXa/index.html
String#includes vs. String#indexOf vs. RegExp (http://jsbench.github.io/#e9d85ace4fc1febe3744e39d2a2269db) #jsbench #jsperf
<!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>
scheme: {
rowHeight: 45,
headerHeight: 30,
rowClick: true,
checkbox: true,
counter: true,
columns: [{
type: 'text',
dataKey: 'name',
label: 'Name',
function getSnack (type) {
var snack;
function isDrink () {
return snack = 'Drink';
}
function isFood () {
return snack = 'Food';
}
var snacks = {
'coke': isDrink,
@b2whats
b2whats / duck-on-wheels.js
Created December 28, 2016 22:05 — forked from nickbalestra/duck-on-wheels.js
An example of Duck Redux Reducer Bundle with Cycle.js apps to handle async
import xs from 'xstream'
import { combineCycles } from 'redux-cycle-middleware'
import { push } from 'react-router-redux'
import { API_URL } from '../constants/api'
// ACTION TYPES (Format: app-name/reducer/ACTION_TYPE)
// =======================================================
const LOGIN = 'app-name/auth/LOGIN'
const LOGIN_SUCCESS = 'app-name/auth/LOGIN_SUCCESS'
const LOGIN_FAIL = 'app-name/auth/LOGIN_FAIL'
import React, { Component, PropTypes } from 'react'
import { mapProps, compose, withState, setPropTypes, defaultProps, withHandlers } from 'recompose'
import { is } from 'ramda'
import { useSheet } from 'ui/styles/jss'
import { heightRow } from 'ui/styles/styles'
import { blackList } from 'ui/utils/'
import { Input } from '../input/'
import { DropDown, DropDownItem } from '../dropdown/'
import { ArrowIcon } from '../icons/'
@b2whats
b2whats / rxjs_operators_by_example.md
Created October 25, 2016 21:59 — forked from btroncone/rxjs_operators_by_example.md
RxJS 5 Operators By Example
import React, { Component } from 'react'
import Icon from './Icon'
export default function CloseIcon(props) {
return (
<Icon originalWidth={224} originalHeight={224} {...props}>
<g>
<polygon points="224.507,6.997 217.521,0 112.256,105.258 6.998,0 0.005,6.997 105.263,112.254
0.005,217.512 6.998,224.512 112.256,119.24 217.521,224.512 224.507,217.512 119.249,112.254"/>
</g>