Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

define-constants

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

define-constants - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "define-constants",
"version": "1.0.0",
"version": "1.0.1",
"description": "description",

@@ -5,0 +5,0 @@ "keywords": [],

@@ -17,10 +17,14 @@ # define-constants

const {
MY_NAMESPACE,
} = defineConstants()
const {
MY_CONSTANT,
MY_FAVOURITE_CONSTANT,
MY_CONSTANT_FOR_FUN,
} = defineConstants("MY_NAME_SPACE")
} = defineConstants(MY_NAMESPACE)
// MY_CONSTANT === "MY_NAME_SPACE.MY_CONSTANT"
// MY_FAVOURITE_CONSTANT === "MY_NAME_SPACE.MY_FAVOURITE_CONSTANT"
// MY_CONSTANT_FOR_FUN === "MY_NAME_SPACE.MY_CONSTANT_FOR_FUN"
// MY_CONSTANT === "MY_NAMESPACE.MY_CONSTANT"
// MY_FAVOURITE_CONSTANT === "MY_NAMESPACE.MY_FAVOURITE_CONSTANT"
// MY_CONSTANT_FOR_FUN === "MY_NAMESPACE.MY_CONSTANT_FOR_FUN"
```

@@ -33,9 +37,9 @@

MY_CONSTANT_FOR_FUN,
} = defineConstants("MY_NAME_SPACE", "/")
} = defineConstants("MY_NAMESPACE", "/")
// MY_CONSTANT === "MY_NAME_SPACE/MY_CONSTANT"
// MY_FAVOURITE_CONSTANT === "MY_NAME_SPACE/MY_FAVOURITE_CONSTANT"
// MY_CONSTANT_FOR_FUN === "MY_NAME_SPACE/MY_CONSTANT_FOR_FUN"
// MY_CONSTANT === "MY_NAMESPACE/MY_CONSTANT"
// MY_FAVOURITE_CONSTANT === "MY_NAMESPACE/MY_FAVOURITE_CONSTANT"
// MY_CONSTANT_FOR_FUN === "MY_NAMESPACE/MY_CONSTANT_FOR_FUN"
```
TODO: babel plugin to transform the code at compile time.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc