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

escss-estest

Package Overview
Dependencies
Maintainers
0
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

escss-estest - npm Package Compare versions

Comparing version 1.4.20 to 1.4.21

40

lib/index.js
/**
* escss-estest v1.4.20
* escss-estest v1.4.21
* (c) 2024 Mike Lee

@@ -83,2 +83,10 @@ * @license AGPL-3.0-only OR Commercial (https://github.com/ESCSS-labs)

function getError(errMsg) {
throw new Error(
`
🚫 Production hides details for security. View them in development.
❗ ${errMsg}
`,
)
}
/**

@@ -91,13 +99,5 @@ * 100% function coverage for easier life. demo: https://demo-estest-log-not-visible.netlify.app/

function ESTest(input, type, errMsg = 'undefined error message') {
if (process.env.NODE_ENV === 'production') {
throw new Error(
`
🚫 Production hides details for security. View them in development.
❗ ${errMsg}
`,
)
}
else {
// development
if (!TYPES.includes(type)) {
if (!TYPES.includes(type)) {
if (process.env.NODE_ENV === 'production') getError(errMsg)
else {
throw new Error(

@@ -110,3 +110,6 @@ `

}
else if (!['undefined', 'string'].includes(typeof errMsg)) {
}
else if (!['undefined', 'string'].includes(typeof errMsg)) {
if (process.env.NODE_ENV === 'production') getError(errMsg)
else {
throw new Error(

@@ -119,3 +122,6 @@ `

}
else if (fixType(input) !== type) {
}
else if (fixType(input) !== type) {
if (process.env.NODE_ENV === 'production') getError(errMsg)
else {
throw new Error(

@@ -129,8 +135,8 @@ `

}
}
// internal testing purpose
if (process.env.NODE_ENV === 'test') _testToken = type
}
// internal testing purpose
if (process.env.NODE_ENV === 'test') _testToken = type
}
export { _testToken, ESTest }
{
"name": "escss-estest",
"version": "1.4.20",
"version": "1.4.21",
"description": "A runtime testing library inspired by TDD and TypeScript to achieve 100% coverage.",

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

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