create-variable

2.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i create-variable

Weekly Downloads

0

Version

2.0.0

License

UNLICENSED

Unpacked Size

1.39 kB

Total Files

5

Last publish

Collaborators

  • 87f-