Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap this lib in a module #36

Open
ghost opened this issue Jun 16, 2015 · 3 comments
Open

Wrap this lib in a module #36

ghost opened this issue Jun 16, 2015 · 3 comments

Comments

@ghost
Copy link

ghost commented Jun 16, 2015

phoneFormat().formatLocal(...);

@nadeemkhedr
Copy link

both global and vanilla versions have all functions globally defined not namespaced, +1 to that

@AlexEntrepreneur
Copy link

+1!! Really confused me at first.

@sturdynut
Copy link
Collaborator

phone-format.js was the original version and in order to not break the api this version has the functions globally available, i.e. formatInternational(..).

@nadeemkhedr - phone-format-global.js has the functions available on the window object via PhoneFormat.[function]. It is the vanilla version (as described above) that has the functions globally, which was the initial implementation.

@robertbaker - I see that in the phone-format-exports.js and phone-format-amd.js versions it is not wrapping the exported functions with something like phoneformat, is that what you mean by "Wrap this lib in a module"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants