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

cheque

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cheque - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

8

index.js
'use strict';
var cheque = {
module.exports = {

@@ -37,3 +37,5 @@ isUndefined: function(x) {

isArray: Array.isArray,
isArray: Array.isArray || function(x) {
return Object.prototype.toString.call(x) == '[object Array]';
},

@@ -45,3 +47,1 @@ isFunction: function(x) {

};
module.exports = cheque;
{
"name": "cheque",
"version": "0.1.1",
"description": "Type checking for when you only use JavaScript's Good Parts.",
"version": "0.2.0",
"description": "Type checking, for when you only use JavaScript's Good Parts.",
"author": "Lim Yuan Qing",

@@ -6,0 +6,0 @@ "license": "MIT",

# Cheque.js [![npm Version](http://img.shields.io/npm/v/cheque.svg?style=flat)](https://www.npmjs.org/package/cheque) [![Build Status](https://img.shields.io/travis/yuanqing/cheque.svg?style=flat)](https://travis-ci.org/yuanqing/cheque) [![Coverage Status](https://img.shields.io/coveralls/yuanqing/cheque.svg?style=flat)](https://coveralls.io/r/yuanqing/cheque)
> Type checking for when you only use JavaScript’s [Good Parts](https://youtu.be/hQVTIJBZook).
> Type checking, for when you only use JavaScript’s [Good Parts](https://youtu.be/hQVTIJBZook).

@@ -10,3 +10,3 @@ ## API

var cheque = {
module.exports = {

@@ -45,3 +45,5 @@ isUndefined: function(x) {

isArray: Array.isArray,
isArray: Array.isArray || function(x) {
return Object.prototype.toString.call(x) == '[object Array]';
},

@@ -53,11 +55,9 @@ isFunction: function(x) {

};
module.exports = cheque;
```
You must *not* do things like:
You must *not* do terrible things like:
```js
var boo = new Boolean(true);
var bad = new Number(42);
var noo = new String('foo');
var noo = new String('foo');
```

@@ -72,3 +72,3 @@

[There are tests you can read.](https://github.com/yuanqing/cheque/blob/master/test)
[There are lots of tests.](https://github.com/yuanqing/cheque/blob/master/test)

@@ -85,2 +85,4 @@ ## Installation

- 0.2.0
- Add polyfill for `Array.isArray`
- 0.1.0

@@ -87,0 +89,0 @@ - Initial release

'use strict';
var nativeIsArray = Array.isArray;
Array.isArray = null;
var tape = require('tape');
var fn = require('..').isArray;
Array.isArray = nativeIsArray;
tape('isArray', function(t) {

@@ -7,0 +12,0 @@ t.notOk(fn(undefined), 'undefined');

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