lib/service/MicroTemplateService.js
function findToken(node, test) {
    let find = null
    traverse(node, {
        enter(child) {
            if (test(child)) {
                find = child
                this.break()
            }
        },
    })
    return find
}
function findToken(node, test) {
    let find = null
    traverse(node, {
        enter(child) {
            if (test(child)) {
                find = child
                this.break()
            }
        },
    })
    return find
}
function findToken ( node , test ) { let find = null traverse ( node , { enter ( child ) { if ( test ( child ) ) { find = child this . break ( ) } } , } ) return find }
Find for the token that hit on the given test.
@param {object} node Root node to traverse.
@param {function} test test.
@returns {Token|null} The token that hit on the given test
Find for the token that hit on the given test .