Skip to content

Commit

Permalink
Making indentation consistent.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Aug 13, 2014
1 parent 836e536 commit aed32ae
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 70 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = isObject

function isObject(x) {
return typeof x === "object" && x !== null
return typeof x === "object" && x !== null
}
121 changes: 60 additions & 61 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,63 +1,62 @@
{
"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/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",
"browserify-server": "~2.1.18",
"browservefy": "~0.0.10",
"testem": "~0.6.8",
"covert": "~1.0.0"
},
"licenses": [
{
"type": "MIT",
"url": "http://github.com/ljharb/is-object/raw/master/LICENSE"
}
],
"scripts": {
"test": "node test/index.js",
"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",
"coverage": "covert test/index.js",
"coverage-quiet": "covert test/index.js --quiet"
},
"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"
]
}
"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/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",
"browserify-server": "~2.1.18",
"browservefy": "~0.0.10",
"testem": "~0.6.8",
"covert": "~1.0.0"
},
"licenses": [
{
"type": "MIT",
"url": "http://github.com/ljharb/is-object/raw/master/LICENSE"
}
],
"scripts": {
"test": "node test/index.js",
"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",
"coverage": "covert test/index.js",
"coverage-quiet": "covert test/index.js --quiet"
},
"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"
]
}
}

16 changes: 8 additions & 8 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ var test = require("tape")
var isObject = require("../index")

test("returns true for objects", function (assert) {
assert.equal(isObject({}), true)
assert.equal(isObject([]), true)
assert.equal(isObject({}), true)
assert.equal(isObject([]), true)

assert.end()
assert.end()
})

test("returns false for null", function (assert) {
assert.equal(isObject(null), false)
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)
assert.equal(isObject(42), false)
assert.equal(isObject("foo"), false)

assert.end()
assert.end()
})

0 comments on commit aed32ae

Please sign in to comment.