Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit e9e07ec

Browse files
author
Rayhan Arayilakath
authored
Use default variables in noInit situation
1 parent 9795ed4 commit e9e07ec

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
let replapi = require('./src');
2+
let defaultInitVariables = {
3+
username: undefined,
4+
endpoints: {
5+
gql: undefined,
6+
restful: undefined,
7+
login: undefined
8+
}
9+
}
210

311
module.exports = function(initVariables) {
412
if(initVariables) {
513
global.initVariables = initVariables;
614
} else {
715
console.warn('[WARN]: ReplAPI.it Initilization Variables not found!')
16+
global.initVariables = defaultInitVariables;
817
}
918

1019
return {

0 commit comments

Comments
 (0)