New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

create-variable

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-variable - npm Package Compare versions

Package was removed
Sorry, it seems this package was removed from the registry
Comparing version
1.0.0
to
2.0.0
+13
-2
index.js

@@ -1,2 +0,2 @@

function createVariable(name, value) {
function createGlobalVariable(name, value) {
let thingToPassInInObjectDotDefineProperty = {

@@ -8,2 +8,13 @@ value: value

module.exports = createVariable
class GlobalVariable {
constructor(name, value) {
createGlobalVariable(name, value)
this.name = name
this.value = value
}
}
module.exports = {
createGlobalVariable,
GlobalVariable
}
+2
-2
{
"name": "create-variable",
"version": "1.0.0",
"description": "Creates a global variable when called with a name and value.",
"version": "2.0.0",
"description": "A global variable creator class and function.",
"main": "index.js",

@@ -6,0 +6,0 @@ "scripts": {

@@ -5,6 +5,10 @@ # create-variable

```javascript
const createVariable = require('create-variable')
createVariable('test', 'hi')
const { createGlobalVariable, GlobalVariable } = require('create-variable')
createGlobalVariable('test', 'hi')
console.log(test) // hi
console.log(test) // Output: hi
new GlobalVariable('test2', 'bruh')
console.log(test2) // Output: bruh
```

@@ -1,6 +0,8 @@

const createVariable = require('../index')
createVariable('test', 'hi')
const { createGlobalVariable, GlobalVariable } = require('../index')
createGlobalVariable('test', 'hi')
const fun = require('./fun')
console.log(test)
fun()
new GlobalVariable('test2', 'bruh')
console.log(test2)