Skip to content

Commit

Permalink
refact(filter): move hasCustomToString into shared namespace to be …
Browse files Browse the repository at this point in the history
…reused
  • Loading branch information
petebacondarwin committed Jun 18, 2015
1 parent c611492 commit c5a3d8f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/.jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"isBlob": false,
"isBoolean": false,
"isPromiseLike": false,
"hasCustomToString": false,
"trim": false,
"escapeForRegexp": false,
"isElement": false,
Expand Down
5 changes: 5 additions & 0 deletions src/Angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,11 @@ identity.$inject = [];

function valueFn(value) {return function() {return value;};}

function hasCustomToString(obj) {
return isFunction(obj.toString) && obj.toString !== Object.prototype.toString;
}


/**
* @ngdoc function
* @name angular.isUndefined
Expand Down
4 changes: 0 additions & 4 deletions src/ng/filter/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,6 @@ function filterFilter() {
};
}

function hasCustomToString(obj) {
return isFunction(obj.toString) && obj.toString !== Object.prototype.toString;
}

// Helper functions for `filterFilter`
function createPredicateFn(expression, comparator, matchAgainstAnyProp) {
var shouldMatchPrimitives = isObject(expression) && ('$' in expression);
Expand Down

0 comments on commit c5a3d8f

Please sign in to comment.