UNPKG

styled-components

Version:

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅

13 lines (11 loc) • 207 B
// @flow // Helper to call a given function, only once export default (cb: () => void): (() => void) => { let called = false return () => { if (!called) { called = true cb() } } }