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

is-object

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-object - npm Package Compare versions

Comparing version 0.1.2 to 1.0.0

.jscs.json

8

index.js

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

module.exports = isObject
"use strict";
function isObject(x) {
return typeof x === "object" && x !== null
}
module.exports = function isObject(x) {
return typeof x === "object" && x !== null;
};
{
"name": "is-object",
"version": "0.1.2",
"description": "Checks whether a value is an object",
"keywords": [],
"author": "Raynos <raynos2@gmail.com>",
"repository": "git://github.com/Colingo/is-object.git",
"main": "index",
"homepage": "https://github.com/Colingo/is-object",
"contributors": [
{
"name": "Raynos"
}
],
"bugs": {
"url": "https://github.com/Colingo/is-object/issues",
"email": "raynos2@gmail.com"
},
"dependencies": {},
"devDependencies": {
"tape": "~0.2.2",
"browserify-server": "~2.1.18",
"browservefy": "~0.0.7",
"testem": "https://github.com/raynos/testem/tarball/master"
},
"licenses": [
{
"type": "MIT",
"url": "http://github.com/Colingo/is-object/raw/master/LICENSE"
}
],
"scripts": {
"test": "testem ci",
"build": "browserify-server --bundle=test/index.js -o test/static/bundle.js --debug",
"testem": "testem",
"example": "browservefy ./examples/simple.js --browserify='browserify-server' --live -- --debug --bundle"
},
"testling": {
"files": "test/index.js",
"browsers": [
"ie/8..latest",
"firefox/16..latest",
"firefox/nightly",
"chrome/22..latest",
"chrome/canary",
"opera/12..latest",
"opera/next",
"safari/5.1..latest",
"ipad/6.0..latest",
"iphone/6.0..latest"
]
}
"name": "is-object",
"version": "1.0.0",
"description": "Checks whether a value is an object",
"keywords": [],
"author": "Raynos <raynos2@gmail.com>",
"repository": "git://github.com/ljharb/is-object.git",
"main": "index",
"homepage": "https://github.com/ljharb/is-object",
"contributors": [
{
"name": "Raynos"
},
{
"name": "Jordan Harband",
"url": "https://github.com/ljharb"
}
],
"bugs": {
"url": "https://github.com/ljharb/is-object/issues",
"email": "ljharb@gmail.com"
},
"dependencies": {},
"devDependencies": {
"tape": "~2.14.0",
"covert": "~1.0.0",
"jscs": "~1.5.9"
},
"licenses": [
{
"type": "MIT",
"url": "http://github.com/ljharb/is-object/raw/master/LICENSE"
}
],
"scripts": {
"test": "npm run lint && node test/index.js && npm run coverage-quiet",
"coverage": "covert test/index.js",
"coverage-quiet": "covert test/index.js --quiet",
"lint": "jscs *.js */*.js"
},
"testling": {
"files": "test/index.js",
"browsers": [
"ie/6..latest",
"firefox/3..6",
"firefox/16..latest",
"firefox/nightly",
"chrome/22..latest",
"chrome/canary",
"opera/10.0",
"opera/11..latest",
"opera/next",
"safari/4..latest",
"ipad/6.0..latest",
"iphone/6.0..latest"
]
}
}

@@ -1,5 +0,7 @@

# is-object
# is-object <sup>[![Version Badge][12]][11]</sup>
[![build status][1]][2] [![dependency status][3]][4]
[![build status][1]][2] [![dependency status][3]][4] [![dev dependency status][9]][10]
[![npm badge][13]][11]
[![browser support][5]][6]

@@ -14,6 +16,7 @@

```js
var isObject = require("is-object")
var isObject = require('is-object');
var assert = require('assert');
console.log(isObject(null)) // false
console.log(isObject(require("util"))) // true
assert.equal(isObject(null), false);
assert.equal(isObject({}), true);
```

@@ -27,11 +30,19 @@

- Raynos
- [Raynos][7]
- [Jordan Harband][8]
## MIT Licenced
## MIT Licensed
[1]: https://secure.travis-ci.org/Colingo/is-object.png
[2]: http://travis-ci.org/Colingo/is-object
[3]: http://david-dm.org/Colingo/is-object/status.png
[4]: http://david-dm.org/Colingo/is-object
[5]: http://ci.testling.com/Colingo/is-object.png
[6]: http://ci.testling.com/Colingo/is-object
[1]: https://secure.travis-ci.org/ljharb/is-object.svg
[2]: http://travis-ci.org/ljharb/is-object
[3]: http://david-dm.org/ljharb/is-object/status.svg
[4]: http://david-dm.org/ljharb/is-object
[5]: http://ci.testling.com/ljharb/is-object.svg
[6]: http://ci.testling.com/ljharb/is-object
[7]: https://github.com/Raynos
[8]: https://github.com/ljharb
[9]: https://david-dm.org/ljharb/is-object/dev-status.svg
[10]: https://david-dm.org/ljharb/is-object#info=devDependencies
[11]: https://npmjs.org/package/is-object
[12]: http://vb.teelaun.ch/ljharb/is-object.svg
[13]: https://nodei.co/npm/is-object.png?downloads=true&stars=true

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

var test = require("tape")
var test = require('tape');
var isObject = require("../index")
var isObject = require('../index');
test("returns true for objects", function (assert) {
assert.equal(isObject({}), true)
assert.equal(isObject([]), true)
test('returns true for objects', function (assert) {
assert.equal(isObject({}), true);
assert.equal(isObject([]), true);
assert.end()
})
assert.end();
});
test("returns false for null", function (assert) {
assert.equal(isObject(null), false)
test('returns false for null', function (assert) {
assert.equal(isObject(null), false);
assert.end()
})
assert.end();
});
test("returns false for primitives", function (assert) {
assert.equal(isObject(42), false)
assert.equal(isObject("foo"), false)
test('returns false for primitives', function (assert) {
assert.equal(isObject(42), false);
assert.equal(isObject('foo'), false);
assert.end()
})
assert.end();
});

Sorry, the diff of this file is not supported yet

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