-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.js
More file actions
31 lines (24 loc) · 749 Bytes
/
index.js
File metadata and controls
31 lines (24 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"use strict";
const functions = require("./functions"); //Import standalone functions
const prototypes = require("./prototypes"); //Import functions to be added in prototype chain
/**
* Initialize AlterSet (Constructor Function)
* @class
* @param {Object} [obj] - Object whose properties you want to have in alterset
* @
*/
function AlterSet(obj){
if(!new.target){
return new AlterSet(obj);
}
if(typeof obj !== "undefined"){
Object.assign(this, obj);
}
}
//Add functions in the prototype chain
Object.assign(AlterSet.prototype, prototypes);
//Export: alterSet constructor
module.exports = AlterSet;
//Export: Standalone Object utility functions
/**@namespace */
module.exports.func = functions(AlterSet);