examples/advanced/autocomplete-search/src/app.js
File app.js
has 260 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import xs from 'xstream'
import debounce from 'xstream/extra/debounce'
import dropUntil from 'xstream/extra/dropUntil'
import {ul, li, span, input, div, section, label} from '@cycle/dom'
import Immutable from 'immutable'
Function intent
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function intent(domSource, timeSource) {
const UP_KEYCODE = 38
const DOWN_KEYCODE = 40
const ENTER_KEYCODE = 13
const TAB_KEYCODE = 9
Function reducers
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function reducers(actions) {
const moveHighlightReducer$ = actions.moveHighlight$
.map(delta => function moveHighlightReducer(state) {
const suggestions = state.get('suggestions')
const wrapAround = x => (x + suggestions.length) % suggestions.length