Skip to content

'nother … AMD/Node/CommonJS/Browser boilerplate pattern #7

Open
@mhulse

Description

@mhulse
(function( factory ){
    if ( typeof define === 'function' && define.amd ) {
        // AMD
        define( ['jquery', 'datatables', 'datatables-editor'], factory );
    }
    else if ( typeof exports === 'object' ) {
        // Node / CommonJS
        module.exports = function ($, dt) {
            if ( ! $ ) { $ = require('jquery'); }
            factory( $, dt || $.fn.dataTable || require('datatables') );
        };
    }
    else if ( jQuery ) {
        // Browser standard
        factory( jQuery, jQuery.fn.dataTable );
    }
}(function( $, DataTable ) {
'use strict';
 
 


var
 
    create: function ( conf ) {
    },
 
    get: function ( conf ) {
    
    },
 
    set: function ( conf, val ) {
    },
 
    enable: function ( conf ) {
    },
 
    disable: function ( conf ) {
    },
 
    inst: function ( conf ) {
    },
    update: function ( conf, data ) {
    },
 
    focus: function ( conf ) {
    }
};
 
 
}));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions