Does this function have a name
Not that I know, but I could think of "lifting fn
to the Angular $scope
" or so.
you can write simple version of it using underscore
Yes, what you're doing there is basic function composition, so you can use Underscore's compose
function:
function ngWrap($scope, fn) {
return _.compose($scope.$apply.bind($scope), fn);
}