Blame view

public/js/common/helpers/isY.js 253 Bytes
沈志敏 authored
1 2 3 4 5 6 7 8 9 10 11
/**
 * 判断是否是Y,应对接口经常返回Y/N做boolean
 * @param string value
 */
module.exports = function(value, options) {
    if (value === 'Y') {
        return options.fn(this);
    } else {
        return options.inverse(this);
    }
};