UNPKG

react-kiwi-dropdown

Version:

A minimal, easy-to-use and highly adjustable dropdown component made with ReactJS.

21 lines (13 loc) 401 B
import { tokens } from '../tokenTypes' const { SPACE, LINE } = tokens export default tokenStream => { const lines = [] let didParseFirst = false while (tokenStream.hasTokens()) { if (didParseFirst) tokenStream.expect(SPACE) lines.push(tokenStream.expect(LINE).toLowerCase()) didParseFirst = true } lines.sort().reverse() return { textDecorationLine: lines.join(' ') } }