AfterShip / phone

With a given country and phone number, validate and reformat the mobile phone number to the E.164 standard. The purpose of this is to allow us to send SMS to mobile phones only.

Home Page:https://www.aftership.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't work with custom array prototype extensions.

drunkhacker opened this issue · comments

If 'Array' type is extended like below, enumeration using for (var i in ...) doesn't work as expected.

Array.prototype.foo = function() { console.log("hi"); }
a = [1,2,3,4,5];
for (var i in a) {
  console.log(i); //foo will be enumerated
}

This causes invalid regular expression error in validate_phone_iso3166 function.