mon-entreprise/source/engine/traverse-common-functions.js

10 lines
266 B
JavaScript
Raw Normal View History

2018-01-08 15:07:26 +00:00
import { any, pipe, equals } from 'ramda'
export let val = node => node && node.nodeValue
export let undefOrTrue = val => val == undefined || val == true
2018-01-08 15:07:26 +00:00
export let anyNull = any(pipe(val, equals(null)))
export let applyOrEmpty = func => v => (v ? func(v) : [])