New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@run-crank/utilities

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@run-crank/utilities - npm Package Compare versions

Comparing version 0.4.5 to 0.4.6

26

dist/src/utils/assert.js

@@ -96,14 +96,14 @@ "use strict";

const SUCCESS_MESSAGES = {
'be': (expected, field) => `The ${field} field was set to ${expected}, as expected`,
'not be': (expected, field) => `The ${field} field was not set to ${expected}, as expected`,
'contain': (expected, field) => `The ${field} field contains ${expected}, as expected`,
'not contain': (expected, field) => `The ${field} field does not contain ${expected}, as expected`,
'be greater than': (expected, field) => `The ${field} field was greater than ${expected}, as expected`,
'be less than': (expected, field) => `The ${field} field was less than ${expected}, as expected`,
'be set': (expected, field) => `${field} field was set, as expected`,
'not be set': (expected, field) => `${field} field was not set, as expected`,
'be one of': (expected, field) => `${field} field was set to one of these values (${expected}), as expected`,
'not be one of': (expected, field) => `${field} field was not set to one of these values (${expected}), as expected`,
'match': (expected, field) => `The ${field} field matches the pattern ${expected}, as expected`,
'not match': (expected, field) => `The ${field} field does not match the pattern ${expected}, as expected`,
'be': (expected, field, actual) => `The ${field} field was set to ${expected}, as expected`,
'not be': (expected, field, actual) => `The ${field} field was not set to ${expected}, as expected. The actual value is ${actual}`,
'contain': (expected, field, actual) => `The ${field} field contains ${expected}, as expected. The actual value is ${actual}`,
'not contain': (expected, field, actual) => `The ${field} field does not contain ${expected}, as expected. The actual value is ${actual}`,
'be greater than': (expected, field, actual) => `The ${field} field was greater than ${expected}, as expected. The actual value is ${actual}`,
'be less than': (expected, field, actual) => `The ${field} field was less than ${expected}, as expected. The actual value is ${actual}`,
'be set': (expected, field, actual) => `${field} field was set, as expected. The actual value is ${actual}`,
'not be set': (expected, field, actual) => `${field} field was not set, as expected`,
'be one of': (expected, field, actual) => `${field} field was set to one of these values (${expected}), as expected. The actual value is ${actual}`,
'not be one of': (expected, field, actual) => `${field} field was not set to one of these values (${expected}), as expected. The actual value is ${actual}`,
'match': (expected, field, actual) => `The ${field} field matches the pattern ${expected}, as expected. The actual value is ${actual}`,
'not match': (expected, field, actual) => `The ${field} field does not match the pattern ${expected}, as expected. The actual value is ${actual}`,
};

@@ -122,3 +122,3 @@ function assert(operator, actualValue, expectedValue, field) {

result.valid = COMPARERS[operator](actualValue, expectedValue);
result.message = result.valid ? SUCCESS_MESSAGES[operator](expectedValue, field) : FAIL_MESSAGES[operator](actualValue, expectedValue, field);
result.message = result.valid ? SUCCESS_MESSAGES[operator](expectedValue, field, actualValue) : FAIL_MESSAGES[operator](actualValue, expectedValue, field);
return result;

@@ -125,0 +125,0 @@ }

{
"name": "@run-crank/utilities",
"version": "0.4.5",
"version": "0.4.6",
"description": "Utility methods and functionality to be shared across all Cogs written in Typescript.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/run-crank/typescript-cog-utilities#readme",

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