Note that there are some explanatory texts on larger screens.

plurals
  1. POlibphonenumber standalone (without masses of google dependencies)? Alternate lib?
    primarykey
    data
    text
    <p>I am looking at using <a href="http://code.google.com/p/libphonenumber/" rel="noreferrer">http://code.google.com/p/libphonenumber/</a> for a well-established project. Today the project does not use Google's libraries for JavaScript, favoring jQuery, jQueryUI, requirejs, and so on.</p> <p>libphonenumber looks awesome ... except that the javascript version (svn co <a href="http://libphonenumber.googlecode.com/svn/trunk/javascript/" rel="noreferrer">http://libphonenumber.googlecode.com/svn/trunk/javascript/</a> libphonenumber-js) is laced with goog.require calls. If one runs the demo (libphonenumber-js/i18n/phonenumbers/demo.html if you checked out as suggested) it pulls in tons of google libraries from closure-library.googlecode.com :</p> <pre><code>GET base.js GET deps.js GET error.js GET string.js GET asserts.js GET array.js GET useragent.js GET browserfeature.js GET tagname.js GET classes.js GET math.js GET coordinate.js GET size.js GET object.js GET dom.js GET json.js GET util.js GET descriptor.js GET fielddescriptor.js GET message.js GET serializer.js GET objectserializer.js GET stringbuffer.js GET lazydeserializer.js GET pbliteserializer.js </code></pre> <p>I believe if I compile this using the closure compiler ("If you give the use_closure_library parameter a value of true, the compiler looks for goog.require() statements in the source code and supplies the Closure Library code requested by any such statements.", <a href="https://developers.google.com/closure/compiler/docs/api-ref" rel="noreferrer">https://developers.google.com/closure/compiler/docs/api-ref</a>) I can cut down the raw number of requests, but this still seems like a rather excessive amount of content for a phone number parser, even a full-featured one.</p> <p>My question has two possible answers:</p> <ol> <li>A way to use libphonenumber in JavaScript without having to pull in all the Google JavaScript base libraries</li> <li>An alternate standalone (as in doesn't have dozens of dependencies) first-class phone number processing library with both JavaScript and Java implementations </li> </ol> <p>Any and all suggestions most appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload