Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JavaScriptDude/JSLibraryTemplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

4 Commits

Repository files navigation

JSLibraryTemplate

Template For Creating JavaScript Libraries

When generating your own JavaScript libraries, it is very important to ensure that:

  1. Your library does not clobber / overwrite namespaces from other libraries
  2. Other libraries dont clobber / overwrite namespaces from your libraries
  3. Exported libraries are restricted to a subset of your code allowing you to have private code and public APIs

I've generated this template to work with pre ES6 browsers and it's 'this' variable references to a anonymous object created in the library factory thus allowing you to automate adding to your libraries private namespace.

This is base on deconstructing how jQuery and Underscore implements their libraries with modifications to allow for the anonymous object for your libraries definition.

See the JS in the code for the logic. Note: The code is flagged with Start Boilerplate and end BP to signify code that does not require changing

About

Template For Creating JavaScript Libraries

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /