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.1 to 1.0.2

2

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

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

# define-constants
Gets rid of repeating stuff when declaring self-defined constants.
Instead of writing smth like that:
```javascript
const MY_CONSTANT = "MY_CONSTANT"
const MY_FAVOURITE_CONSTANT = "MY_FAVOURITE_CONSTANT"
const MY_CONSTANT_FOR_FUN = "MY_CONSTANT_FOR_FUN"
```
You can write your constant just once when declaring it:
```javascript
const {

@@ -15,2 +25,5 @@ MY_CONSTANT,

and get the same result.
You can also add some namespace to your constants:
```javascript

@@ -32,2 +45,3 @@ const {

Tweak namespace delimiter if you wish:
```javascript

@@ -34,0 +48,0 @@ const {

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