Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9e3fda9

Browse files
committed
rm ap
1 parent fd63e71 commit 9e3fda9

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
],
2525
"dependencies": {},
2626
"devDependencies": {
27-
"ap": "^0.2.0",
2827
"standard": "^12.0.1",
2928
"tape": "^4.0.0"
3029
},

test.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict'
22

33
var test = require('tape')
4-
var ap = require('ap')
54
var array = require('./')
65

76
test(function (t) {
@@ -13,9 +12,12 @@ test(function (t) {
1312
t.deepEqual(string('{"\\"\\"\\"","\\\\\\\\\\\\"}'), ['"""', '\\\\\\'], 'escaped')
1413
t.deepEqual(string('{NULL,NULL}'), [null, null], 'null')
1514

16-
var integer = ap.partialRight(array.parse, ap.partialRight(parseInt, 10))
17-
t.deepEqual(integer('{1,2,3}'), [1, 2, 3], 'numerics')
18-
t.deepEqual(integer('[0:2]={1,2,3}'), [1, 2, 3], 'numerics')
15+
t.deepEqual(intArray('{1,2,3}'), [1, 2, 3], 'numerics')
16+
t.deepEqual(intArray('[0:2]={1,2,3}'), [1, 2, 3], 'numerics')
1917

2018
t.end()
2119
})
20+
21+
function intArray (string) {
22+
return array.parse(string, value => parseInt(value, 10))
23+
}

0 commit comments

Comments
 (0)