Socket
Socket
Sign inDemoInstall

is-obj

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 2.0.0

index.d.ts

7

index.js
'use strict';
module.exports = function (x) {
var type = typeof x;
return x !== null && (type === 'object' || type === 'function');
module.exports = value => {
const type = typeof value;
return value !== null && (type === 'object' || type === 'function');
};
{
"name": "is-obj",
"version": "1.0.1",
"description": "Check if a value is an object",
"license": "MIT",
"repository": "sindresorhus/is-obj",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"obj",
"object",
"is",
"check",
"test",
"type"
],
"devDependencies": {
"ava": "*",
"xo": "*"
}
"name": "is-obj",
"version": "2.0.0",
"description": "Check if a value is an object",
"license": "MIT",
"repository": "sindresorhus/is-obj",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=8"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"object",
"is",
"check",
"test",
"type"
],
"devDependencies": {
"ava": "^1.4.1",
"tsd": "^0.7.2",
"xo": "^0.24.0"
}
}

@@ -12,3 +12,3 @@ # is-obj [![Build Status](https://travis-ci.org/sindresorhus/is-obj.svg?branch=master)](https://travis-ci.org/sindresorhus/is-obj)

```
$ npm install --save is-obj
$ npm install is-obj
```

@@ -20,11 +20,11 @@

```js
const isObj = require('is-obj');
const isObject = require('is-obj');
isObj({foo: 'bar'});
isObject({foo: 'bar'});
//=> true
isObj([1, 2, 3]);
isObject([1, 2, 3]);
//=> true
isObj('foo');
isObject('foo');
//=> false

@@ -34,4 +34,9 @@ ```

## Related
- [is](https://github.com/sindresorhus/is) - Type check values
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc