2.0.0 • Published 1 year ago

create-variable v2.0.0

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
1 year ago

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
2.0.0

1 year ago

1.0.0

1 year ago