No notes :(
MobX [mob-ex] – reactive updates via subscriptions.
How to run an open-source library
- people do not inspect your source code seriously
- people are not inspired by your ideas and solutions as you are
- project without a critical mass of users does not look very attractive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.cache | |
dist | |
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.cache | |
dist | |
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = grunt => { | |
const allure = require('allure-commandline'); | |
grunt.registerMultiTask('allure', 'Passes commands to allure-commandline', function() { | |
const done = this.async(); | |
const options = this.options(); | |
const args = []; | |
if(this.target === 'generate') { | |
args.push('generate'); | |
if(options.clean) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import memoize from 'fast-memoize'; | |
function sum(a, b) { | |
return a + b; | |
} | |
const memoSum = memoize(sum); | |
console.log(sum(1, 2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var Benchmark = require('benchmark'); | |
var suite = new Benchmark.Suite; | |
var forLoop = { | |
setup: () => { | |
var arr = []; | |
for (var i = 0; i < 1000; i++) { | |
arr[i] = i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Dropdown({title, value, options, optionKey, optionVal, onChange}) { | |
if(values === undefined && values === null) { | |
return <div>No data</div>; | |
} | |
return <div> | |
<label>{title}:</label> | |
<select value={value || -1} onChange={onChange}> | |
<option key={-1} value={-1}>All</option> | |
{values.map(function (val, idx) { | |
return <option key={idx} value={val[optionKey]}>{val[optionVal]}</option> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
beforeEach(function() { | |
global.localStorage = createLocalStorageMock(); | |
this.server = new AxiosMock(axious); | |
this.store = createStore(); | |
}); | |
afterEach(function() { | |
this.server.restore(); | |
delete global.localStorage; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function factory(app) { | |
return ({url, method = 'get'}) => (target, key, descriptor) => { | |
app[method](url, target[key]); | |
} | |
} | |
const Path = factory(app); | |
class Controller { |