Успел сделать только прототип плагина. С проблемами не столкнулся, просто не успел. Думаю их будет хватать. А пока уже практически познакомился с ES6.
This file contains hidden or 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
| class AutoComplete { | |
| constructor(input, config) { | |
| this.input = typeof input == "string" ? document.querySelector(input) : input; | |
| this.wholeSuggestList = config.wholeSuggestList; | |
| this.suggestListMathes = []; | |
| this.options = Object.assign({ | |
| delay: 150, | |
| suggestListClassName: 'suggestions list-unstyled', | |
| maxSuggestions: 7, | |
| minChars: 1 |
This file contains hidden or 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
| .list-unstyled { | |
| list-style: outside none none; | |
| padding-left: 0; | |
| } | |
| #suggestions-block { | |
| margin-top : 1em; | |
| margin-bottom : 1em; | |
| } | |
| .suggestions { |
This file contains hidden or 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
| const WebSocket = require('ws'); | |
| const ws = new WebSocket('ws://nuclear.t.javascript.ninja'); | |
| const coincidences = {}; | |
| const states = {}; | |
| const historyLimit = 5; | |
| ws.on('open', () => console.log('Launched')); | |
| ws.on('error', e => console.log(e)); |
This file contains hidden or 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 React, { Fragment } from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import { Input, FormFeedback, FormText } from 'reactstrap'; | |
| export const renderTextField = ({ input, meta: { touched, error, warning }, ...custom }) => ( | |
| <Fragment> | |
| <Input {...(touched ? { valid: !error } : {})} {...input} {...custom} /> | |
| {error && <FormFeedback>{error}</FormFeedback>} | |
| {!error && warning && <FormText>{warning}</FormText>} | |
| </Fragment> |
This file contains hidden or 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
| # delete local tag '12345' | |
| git tag -d 12345 | |
| # delete remote tag '12345' (eg, GitHub version too) | |
| git push origin :refs/tags/12345 | |
| # alternative approach | |
| git push --delete origin tagName | |
| git tag -d tagName |
This file contains hidden or 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 asyncExec(func, load, jobs) { | |
| let done = false; | |
| let value; | |
| const makeDone = () => done = true; | |
| return new Promise((resolve) => { | |
| function executor(cb) { | |
| if (!done) { |
I hereby claim:
- I am mishelen on github.
- I am mikhailhozhy (https://keybase.io/mikhailhozhy) on keybase.
- I have a public key ASAIL8mzEusmbytMswbHDW0AlPeqiPReyenSqqL_OQBzsAo
To claim this, I am signing this object:
OlderNewer