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

ifonly

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ifonly - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

2

index.js

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

keys.forEach(function (value) {
state = Object.keys(copy).indexOf(value) !== -1;
state = state && Object.keys(copy).indexOf(value) !== -1;

@@ -31,0 +31,0 @@ if (state) {

{
"name": "ifonly",
"version": "2.0.1",
"version": "2.1.0",
"description": "ifonly is function that checks if your object have only and only specific properties you passed.",

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

@@ -26,2 +26,7 @@ var ifonly = require('../index.js');

it('should return false', function () {
var obj = { a: 'a' };
ifonly(obj, ['b', 'a']).should.equal(false);
});
it('should return true and ignore empty strings', function () {

@@ -28,0 +33,0 @@ var obj = { a: '', b: 'b', c: '' };

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