Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

feat(angular.isRegExp): check object type for regular expressions #2729

Closed
wants to merge 1 commit into from
Closed

feat(angular.isRegExp): check object type for regular expressions #2729

wants to merge 1 commit into from

Conversation

bripkens
Copy link
Contributor

In order to fix #2685, we need to differentiate between regular
expression objects and other types. Angular could expose a public
function 'angular.isRegExp' through which this could be done.

This serves as a preparation for a follow-up pull request for a change to angular.equals (which will fix #2685).

In order to fix #2685, we need to differentiate between regular
expression objects and other types. Angular could expose a public
function 'angular.isRegExp' through which this could be done.
@bripkens
Copy link
Contributor Author

This is actually a follow up to pull request #2715.

CLA is signed.

@petebacondarwin
Copy link
Contributor

@bripkens - I think that #2685 can be "fixed" by creating a private isRegExp method. Then we can worry about whether to expose this as a public AngularJS API afterwards. It is easier to get private methods merged, since we don't need to worry so much about supporting them going forward. There are a number of such methods already hiding in Angular.js, such as isArrayLike.

@bripkens
Copy link
Contributor Author

If I change the isRegExp method to be private, then it will effectively not be a feature (I have no problem with this, my intention was only to fix the issue). This would also imply that the previous PR would have been sufficient, if I had removed the exposing part. So please clarify how you wish to handle this.

@petebacondarwin
Copy link
Contributor

Sorry to mess you around. I didn't realise in the previous PR that you were relying on your new public API for the fix.
I'll fix up and merge your previous PR.

@petebacondarwin
Copy link
Contributor

CI server problems ... http://ci.angularjs.org/job/angular.js-pete/174/console

@IgorMinar
Copy link
Contributor

I landed this as 724819e and a357649 (stable branch)

thanks!

@IgorMinar IgorMinar closed this Jul 14, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dirty checking not working on RegExp objects?
3 participants