Skip to content

Instantly share code, notes, and snippets.

@mahamshahid18
Created September 28, 2017 12:27
Show Gist options
  • Save mahamshahid18/275aa84f9433caa2d6629455182ed1a7 to your computer and use it in GitHub Desktop.
Save mahamshahid18/275aa84f9433caa2d6629455182ed1a7 to your computer and use it in GitHub Desktop.
Sample Node.js code before implementing code compliance
var User = require("./User");
/**
* Creates an instance of Employee
*
* @constructor
*/
Employee = function (obj) {
if(!obj) {
User.call(this, null);
this.name = null;
} else {
User.call(this, obj);
this.name = (obj.name !== undefined && obj.name !== null)? obj.name : null;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment