1) Create custom angular filter

After library is included to your project we can create custom angular filter that we are planing to use later in html or in controlers

angular.module('myAngularApp')
    .filter('text', function() {
        return function(input, format) {
            return textural(input).format(format);
        }
     });

2) Use it

$scope.myModel = 'exampleText'
in html
{{ myModel | text:'snake' }}
or in controler
$scope.test = $filter('text')($scope.myModel, 'snake');
will output
// example_text