define-constants
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"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 { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
119563
58