Permalink
Browse files

added parse raw method

  • Loading branch information...
codeinvain committed Mar 22, 2012
1 parent 56be956 commit b3dfb4aa9744f51bf03ba60ca0d1eeed0f90ef12
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/libphonenumber-execjs/libphonenumber.rb
@@ -18,6 +18,10 @@ def parse(str="", default_region="")
context.eval "i18n.phonenumbers.PhoneNumberUtil.getInstance().parse(#{make_param(str)},#{make_param(default_region)})"
end
+ def parse_raw(str="", default_region="")
+ context.eval "i18n.phonenumbers.PhoneNumberUtil.getInstance().parseAndKeepRawInput(#{make_param(str)},#{make_param(default_region)})"
+ end
+
def simple
@simple ||= Simple.new(self)
end

0 comments on commit b3dfb4a

Please sign in to comment.