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

@greenberry/use-label-prefix

Package Overview
Dependencies
Maintainers
4
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@greenberry/use-label-prefix - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

7

index.js

@@ -20,2 +20,7 @@ "use strict";

var env = process.env || {
NODE_ENV: undefined
};
var NODE_ENV = env.NODE_ENV;
var isTest = NODE_ENV === 'test';
var allChars = (0, _ramda.split)('', 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789');

@@ -55,3 +60,3 @@

var _useState = (0, _react.useState)("p_".concat(prefix, "_").concat(serializeLabel(label))),
var _useState = (0, _react.useState)("p_".concat(prefix, "_").concat(isTest ? '' : serializeLabel(label))),
_useState2 = _slicedToArray(_useState, 1),

@@ -58,0 +63,0 @@ prefixed = _useState2[0];

4

package.json
{
"name": "@greenberry/use-label-prefix",
"version": "1.0.0",
"version": "1.0.1",
"description": "Custom React Hook to prefix labels on Input fields",

@@ -11,3 +11,3 @@ "main": "index.js",

"scripts": {
"test": "jest test --coverage",
"test": "NODE_ENV=jest jest test --coverage",
"build": "rm -rf ./dist && NODE_ENV=production babel src --out-dir dist",

@@ -14,0 +14,0 @@ "prepublishOnly": "yarn build && cp -r ./dist/* . && rm -rf ./dist",

@@ -46,1 +46,6 @@ # `@greenberry/use-label-prefix`

```
## Notes
- When `NODE_ENV` is `test` no random string will be generated
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