Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

257
Vistas
How to make structure of JavaScript plugin?

When I start developing a javascript plugin need a proper structure at the time I found a solution to make a better way for the plugin. It's a better way to handle public and private functions. use this way to make a Javascript module

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

var PluginName = (function () {

    'use strict';
 
    var Constructor = function (config) {

        var globalvar = {};

        globalvar.config = config;  

        //public function
        globalvar.customfunction = function (url) {
            //stuff code
            return;
        }
        
        //private function
        function Test(){
            //stuff code
            return;
        }

        return globalvar;
    };

    return Constructor;
    
})(

/**********
 *************************************************************************
 ************* JAVASCRIPT MODULE  SAMPLE DONE BY KATHEESKUMAR ************
 *************************************************************************
 ***************************** Version: 1.0 ******************************
 *************************************************************************
 **********/

);
about 4 years ago · Santiago Gelvez Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda