dist/petrovich.js
function inflect(gender, name, gcase, nametype) {
        var nametype_rulesets = rules[nametype],
            parts = name.split('-'),
            result = [];
        for (var i = 0; i < parts.length; i++) {
            var part = parts[i], first_word = i === 0 && parts.size > 1,
                rule = find_rule_global(gender, part,
                    nametype_rulesets, {first_word: first_word});
            if (rule) result.push(apply_rule(part, gcase, rule));
            else result.push(part);
        }
        return result.join('-');
    }
function inflect(gender, name, gcase, nametype) {
        var nametype_rulesets = rules[nametype],
            parts = name.split('-'),
            result = [];
        for (var i = 0; i < parts.length; i++) {
            var part = parts[i], first_word = i === 0 && parts.size > 1,
                rule = find_rule_global(gender, part,
                    nametype_rulesets, {first_word: first_word});
            if (rule) result.push(apply_rule(part, gcase, rule));
            else result.push(part);
        }
        return result.join('-');
    }
function inflect ( gender , name , gcase , nametype ) { var nametype_rulesets = rules [ nametype ] , parts = name . split ( '-' ) , result = [ ] ; for ( var i = 0 ; i < parts . length ; i ++ ) { var part = parts [ i ] , first_word = i === 0 && parts . size > 1 , rule = find_rule_global ( gender , part , nametype_rulesets , { first_word : first_word } ) ; if ( rule ) result . push ( apply_rule ( part , gcase , rule ) ) ; else result . push ( part ) ; } return result . join ( '-' ) ; }
Key private method, used by all public methods
Key private method used by all public methods