Skip to content

Commit 55b91fd

Browse files
committed
remove babel
1 parent 95f43f9 commit 55b91fd

File tree

6 files changed

+159
-2926
lines changed

6 files changed

+159
-2926
lines changed

.babelrc

Lines changed: 0 additions & 5 deletions
This file was deleted.

dist/index.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export default (val) => {
1+
module.exports = (val) => {
22
return val != null && typeof val === 'object' && val.constructor !== RegExp
33
}

package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
{
22
"name": "objectorarray",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Is the value an object or an array but not null?",
55
"main": "dist/index.js",
66
"scripts": {
7-
"build": "babel index.js --out-file dist/index.js",
8-
"test": "jest"
7+
"test": "tape test.js"
98
},
109
"repository": {
1110
"type": "git",
@@ -23,9 +22,7 @@
2322
"url": "https://github.com/ZhouHansen/objectnotnull/issues"
2423
},
2524
"homepage": "https://github.com/ZhouHansen/objectnotnull#readme",
26-
"devDependencies": {
27-
"babel-cli": "^6.22.2",
28-
"babel-preset-es2015": "^6.22.0",
29-
"jest": "^21.2.1"
25+
"dependencies": {
26+
"tape": "^4.8.0"
3027
}
3128
}

test.js

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
1-
import objectorarray from './'
1+
var test = require('tape')
2+
var objectorarray = require('./')
23

3-
describe('objectorarray', () => {
4-
it('Those should be true', () => {
5-
expect(objectorarray({})).toBe(true)
6-
expect(objectorarray([])).toBe(true)
7-
expect(objectorarray(Object.create({}))).toBe(true)
8-
expect(objectorarray(Object.create(Object.prototype))).toBe(true)
9-
expect(objectorarray(Object.create(null))).toBe(true)
10-
expect(objectorarray(new Foo)).toBe(true)
4+
test('objectorarray', t => {
5+
t.plan(12)
116

12-
function Foo (bar) {
13-
this.bar = bar
14-
}
15-
})
7+
t.ok(objectorarray({}))
8+
t.ok(objectorarray([]))
9+
t.ok(objectorarray(Object.create({})))
10+
t.ok(objectorarray(Object.create(Object.prototype)))
11+
t.ok(objectorarray(Object.create(null)))
12+
t.ok(objectorarray(new Foo))
13+
function Foo (bar) {
14+
this.bar = bar
15+
}
1616

17-
it('Those should be false', () => {
18-
expect(objectorarray()).toBe(false)
19-
expect(objectorarray(function () {})).toBe(false)
20-
expect(objectorarray(1)).toBe(false)
21-
expect(objectorarray(/foo/)).toBe(false)
22-
expect(objectorarray(null)).toBe(false)
23-
expect(objectorarray(undefined)).toBe(false)
24-
})
17+
t.notOk(objectorarray())
18+
t.notOk(objectorarray(function () {}))
19+
t.notOk(objectorarray(1))
20+
t.notOk(objectorarray(/foo/))
21+
t.notOk(objectorarray(null))
22+
t.notOk(objectorarray(undefined))
2523
})

0 commit comments

Comments
 (0)