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

ynn-http-assert

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ynn-http-assert - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

src/indexof.js

2

package.json
{
"name": "ynn-http-assert",
"version": "0.0.2",
"version": "0.0.3",
"description": "A more powerful http assertion library.",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -5,2 +5,3 @@ const deepEqual = require( 'deep-equal' );

const types = require( './types' );
const indexOf = require( './indexof' );

@@ -33,2 +34,3 @@ const VALUE = Symbol( 'value' );

this.async = false;
this.setDefault = false;
}

@@ -38,2 +40,3 @@

this.defaultValue = value;
this.setDefault = true;
if( !this.value() ) {

@@ -47,3 +50,6 @@ this.value( value );

value( v ) {
if( v ) {
/**
* the default value can be an undefined
*/
if( arguments.length ) {
this[ VALUE ] = v;

@@ -107,2 +113,6 @@ return this;

in( haystack, ...args ) {
return this.assert( indexOf( haystack, this.value() ) !== -1, ...args );
}
length( interval, ...args ) {

@@ -176,3 +186,3 @@ const v = this.value();

if( this.skip || value ) return this;
if( this.defaultValue ) {
if( this.setDefault ) {
this.value( this.defaultValue );

@@ -179,0 +189,0 @@ this.skip = true;

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