Skip to content

Instantly share code, notes, and snippets.

@255kb
Last active August 29, 2015 14:15
Show Gist options
  • Save 255kb/60f632a8adecf14c7cb5 to your computer and use it in GitHub Desktop.
Save 255kb/60f632a8adecf14c7cb5 to your computer and use it in GitHub Desktop.

Revisions

  1. 255kb renamed this gist Feb 13, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. 255kb revised this gist Feb 13, 2015. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions library.js
    Original file line number Diff line number Diff line change
    @@ -14,8 +14,7 @@
    }(this, function() {
    'use strict';

    function library(newId){
    this.id = newId;
    function library(){
    };

    library.prototype = {
  3. 255kb revised this gist Feb 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion library.js
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@
    if (typeof define === 'function' && define.amd) {
    //AMD
    define([], factory);
    } else if (typeof module !== "undefined" && module.exports) {
    } else if (typeof module !== 'undefined' && module.exports) {
    //Node.js or CommonJS
    module.exports = factory();
    } else {
  4. 255kb created this gist Feb 13, 2015.
    26 changes: 26 additions & 0 deletions library.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    /* Replace 'library' by your library name */

    (function(root, factory) {
    if (typeof define === 'function' && define.amd) {
    //AMD
    define([], factory);
    } else if (typeof module !== "undefined" && module.exports) {
    //Node.js or CommonJS
    module.exports = factory();
    } else {
    //Global
    root.library = factory();
    }
    }(this, function() {
    'use strict';

    function library(newId){
    this.id = newId;
    };

    library.prototype = {

    };

    return library;
    }));