create-variable
v2.0.0
Published
A global variable creator class and function.
Downloads
4
Readme
create-variable
Create-variable lets you create a global variable when called with a name and value. The variable that it creates will be accessible across multiple JS files without requiring and exporting.
const { createGlobalVariable, GlobalVariable } = require('create-variable')
createGlobalVariable('test', 'hi')
console.log(test) // Output: hi
new GlobalVariable('test2', 'bruh')
console.log(test2) // Output: bruh