@highlight-ui/utils-commons
Advanced tools
Comparing version 2.1.5 to 2.2.0
export * from './src/types'; | ||
export * from './src/uniqueId'; | ||
export * from './src/noop'; | ||
export * from './src/invariant'; | ||
export { default as forkHandlers } from './src/forkHandlers'; | ||
export { parseMetadata, suffixMetadata } from './src/parseMetadata'; |
@@ -48,2 +48,14 @@ 'use strict'; | ||
function invariant(condition, message) { | ||
if (process.env.NODE_ENV !== 'development') { | ||
return; | ||
} | ||
if (!condition) { | ||
var error = new Error(message); | ||
error.name = 'Invariant Violation'; | ||
throw error; | ||
} | ||
} | ||
var forkHandlers = function (handlers) { | ||
@@ -96,2 +108,3 @@ return function (e) { | ||
exports.forkHandlers = forkHandlers; | ||
exports.invariant = invariant; | ||
exports.noop = noop; | ||
@@ -98,0 +111,0 @@ exports.parseMetadata = parseMetadata; |
export * from './src/types'; | ||
export * from './src/uniqueId'; | ||
export * from './src/noop'; | ||
export * from './src/invariant'; | ||
export { default as forkHandlers } from './src/forkHandlers'; | ||
export { parseMetadata, suffixMetadata } from './src/parseMetadata'; |
@@ -27,2 +27,14 @@ import kebabCase from 'lodash/fp/kebabCase'; | ||
function invariant(condition, message) { | ||
if (process.env.NODE_ENV !== 'development') { | ||
return; | ||
} | ||
if (!condition) { | ||
var error = new Error(message); | ||
error.name = 'Invariant Violation'; | ||
throw error; | ||
} | ||
} | ||
var forkHandlers = function (handlers) { | ||
@@ -74,3 +86,3 @@ return function (e) { | ||
}); | ||
export { forkHandlers, noop, parseMetadata, suffixMetadata, uniqueId }; | ||
export { forkHandlers, invariant, noop, parseMetadata, suffixMetadata, uniqueId }; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@highlight-ui/utils-commons", | ||
"version": "2.1.5", | ||
"version": "2.2.0", | ||
"author": "Personio GmbH & Co. KG", | ||
@@ -39,3 +39,3 @@ "main": "dist/cjs/index.js", | ||
}, | ||
"gitHead": "6170967a4ec9bbec9e9ef89a1aaafe46496e0fa3" | ||
"gitHead": "f1e232240325d86dddecccf54728e8ba26044761" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
25068
21
315
3