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

quack

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quack - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

package.json
{
"name": "quack",
"version": "0.1.2",
"version": "0.1.3",
"description": "Check the values of passed arguments in a function - see if they quack like a duck.",

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

@@ -35,4 +35,8 @@ /*

if (sig == 'object') return isObject(arg);
else if (sig == 'array') return isArray(arg);
if (sig == 'object') {
if (! isObject(arg)) return false;
}
else if (sig == 'array') {
if (! isArray(arg)) return false;
}
else if (sig !== typeof arg) return false;

@@ -39,0 +43,0 @@ }

@@ -1,1 +0,1 @@

void function(e,t){"use strict";var r=function r(e,t){if(f(t))t=[].slice.apply(t);if(typeof e=="string"){e=e.replace(/^\s*|\s*$/g,"").split(/\s*,\s*/)}for(var r=0,n=e.length;r<n;r++){var s=e[r].toLowerCase();var u=t[r];if(s=="object")return i(u);else if(s=="array")return o(u);else if(s!==typeof u)return false}return true};var n={"function":true,object:true};function f(e){return toString.call(e)=="[object Arguments]"}function i(e){return e?!!n[typeof e]:false}function o(e){return e?typeof e=="object"&&toString.call(e)=="[object Array]":false}if(exports)module.exports=r;else if(define&&define.amd)define(r);else e.quack=r}(this);
void function(e,t){"use strict";var r=function r(e,t){if(n(t))t=[].slice.apply(t);if(typeof e=="string"){e=e.replace(/^\s*|\s*$/g,"").split(/\s*,\s*/)}for(var r=0,f=e.length;r<f;r++){var s=e[r].toLowerCase();var a=t[r];if(s=="object"){if(!i(a))return false}else if(s=="array"){if(!o(a))return false}else if(s!==typeof a)return false}return true};var f={"function":true,object:true};function n(e){return toString.call(e)=="[object Arguments]"}function i(e){return e?!!f[typeof e]:false}function o(e){return e?typeof e=="object"&&toString.call(e)=="[object Array]":false}if(exports)module.exports=r;else if(define&&define.amd)define(r);else e.quack=r}(this);
// quack is passed in, minified or unminified
module.exports = function(quack){
describe('quack', function(){
describe('quack signature and arguments', function(){

@@ -34,3 +34,7 @@ it('should take arrays for the signature and args', function(){

});
it('should fail tests after an "isSomething" test fail', function(){
quack('object, array', [[]]).should.be.equal(false);
});
});
};

@@ -25,3 +25,3 @@ // common types

module.exports = function(quack){
describe('quack', function(){
describe('quack values', function(){

@@ -28,0 +28,0 @@ // test common types, minus exceptions

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