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

unexpected

Package Overview
Dependencies
Maintainers
2
Versions
330
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unexpected - npm Package Compare versions

Comparing version 2.1.3 to 2.1.4

6

lib/unexpected.es5.js

@@ -780,3 +780,3 @@ (function () {

for (var i = 0; i < pattern.length; i += 1) {
var c = pattern[i];
var c = pattern.charAt(i);
if (c in counts) {

@@ -794,3 +794,3 @@ counts[c] += 1;

if (pattern[i - 1] === '[') {
if (pattern.charAt(i - 1) === '[') {
throw new Error("Assertion patterns must not contain empty flags: '" + pattern + "'");

@@ -809,3 +809,3 @@ }

if ((c === ')' || c === '|') && counts['('] >= counts[')']) {
if (pattern[i - 1] === '(' || pattern[i - 1] === '|') {
if (pattern.charAt(i - 1) === '(' || pattern.charAt(i - 1) === '|') {
throw new Error("Assertion patterns must not contain empty alternations: '" + pattern + "'");

@@ -812,0 +812,0 @@ }

{
"name": "unexpected",
"version": "2.1.3",
"version": "2.1.4",
"author": "Sune Sloth Simonsen <sune@we-knowhow.dk>",

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

@@ -254,3 +254,3 @@ (function () {

for (var i = 0; i < pattern.length; i += 1) {
var c = pattern[i];
var c = pattern.charAt(i);
if (c in counts) {

@@ -268,3 +268,3 @@ counts[c] += 1;

if (pattern[i - 1] === '[') {
if (pattern.charAt(i - 1) === '[') {
throw new Error("Assertion patterns must not contain empty flags: '" + pattern + "'");

@@ -283,3 +283,3 @@ }

if ((c === ')' || c === '|') && counts['('] >= counts[')']) {
if (pattern[i - 1] === '(' || pattern[i - 1] === '|') {
if (pattern.charAt(i - 1) === '(' || pattern.charAt(i - 1) === '|') {
throw new Error("Assertion patterns must not contain empty alternations: '" + pattern + "'");

@@ -286,0 +286,0 @@ }

@@ -782,3 +782,3 @@ /*global describe, it, expect*/

expect(index, 'to be a number');
expect(index, 'to be', arr.indexOf(item));
expect(index, 'to be', parseInt(item, 10));
});

@@ -785,0 +785,0 @@ });

Sorry, the diff of this file is too big to display

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