andreasgal/PhoneNumber.js — pull request #17 by rafeca (2013-03-26 10:02:10+00:00)
Title: Fix chilean mobile numbers

This PR is a fix on a parsing bug that happens for Chilean mobile numbers.

The chilean metadata array has a value for `nationalPrefixForParsing`, but `nationalPrefixTransformRule` is empty.

When parsing the metadata array, `md.nationalPrefixTransformRule` is not created (undefined) and then the replace function at line [438](https://github.com/andreasgal/PhoneNumber.js/blob/master/PhoneNumber.js#L438) inserts `"undefined"` at the beginning of the chilean mobile numbers.