Skip to main content
Notice removed Draw attention by jdog
Bounty Ended with Joshua Dawson's answer chosen by jdog

I've developed a template to modularize JavaScript code I write for client work. The example below is is a simple class with 1 attribute and 3 functions.

  • StandardisedStandardized constructor to add or modify settings/ options
  • Functions as variables used later to return only "public" functions, all else are private
  • Using local "call" variable to easily replace functions in unit testing

Are there any improvements you can recommend or general directionsbest practices to look for in terms of improvement?

I've developed a template to modularize JavaScript code I write for client work. The example below is is a simple class with 1 attribute and 3 functions.

  • Standardised constructor to add or modify settings/ options
  • Functions as variables used later to return only "public" functions, all else are private
  • Using local "call" variable to easily replace functions in unit testing

Are there any improvements you can recommend or general directions to look for in terms of improvement?

I've developed a template to modularize JavaScript code I write for client work. The example below is a simple class with 1 attribute and 3 functions.

  • Standardized constructor to add or modify settings/ options
  • Functions as variables used later to return only "public" functions, all else are private
  • Using local "call" variable to easily replace functions in unit testing

Are there any improvements you can recommend or general best practices to look for in terms of improvement?

Tweeted twitter.com/StackCodeReview/status/723082068528402432
Notice added Draw attention by jdog
Bounty Started worth 50 reputation by jdog
deleted 13 characters in body
Source Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237
  • standardisedStandardised constructor to add or modify settings/ options
  • functionsFunctions as variables used later to return only "public" functions, all else are private
  • Using local "call" variable to easily replace functions in unit testing

 

Are there any improvements you can recommend or general directions to look for in terms of improvement?

Are there any improvements you can recommend or general directions to look for in terms of improvement?

  • standardised constructor to add or modify settings/ options
  • functions as variables used later to return only "public" functions, all else are private
  • Using local "call" variable to easily replace functions in unit testing

 

Are there any improvements you can recommend or general directions to look for in terms of improvement?

  • Standardised constructor to add or modify settings/ options
  • Functions as variables used later to return only "public" functions, all else are private
  • Using local "call" variable to easily replace functions in unit testing

Are there any improvements you can recommend or general directions to look for in terms of improvement?

edited title; edited tags
Link
200_success
  • 144.2k
  • 22
  • 188
  • 473

JavaScript modularization Status display module

added 8 characters in body
Source Link
SirPython
  • 13.3k
  • 3
  • 38
  • 93
Loading
Source Link
jdog
  • 103
  • 7
Loading