Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- My own mini-framework is not compatible with some projects
- var MyLibrary = {
- myFunc: function() { /* stuff */ }
- };
- var MyLibrary = (function() {
- var foo = 'bar';
- return {
- myFunc: function() { /* stuff */ }
- };
- })(); // execute this function right away to return your library object
- var MyLibrary = {
- myFunc: function() {
- //do stuff
- },
- myVar: "Foo"
- }
- AzureLib = {
- SortSomething: function(arr) {
- // do some sorting
- },
- DoSomethingCool: function(item) {
- // do something cool
- }
- };
- // usage (in another JavaScript file or in an HTML <script> tag):
- AzureLib.SortSomething(myArray);
- var yourLib = {};
- yourLib.usefulFunction1 = function(){
- ..
- };
- yourLib.usefulFunction2 = function(){
- ..
- };
Add Comment
Please, Sign In to add comment