Skip to content

Commit

Permalink
Renamed remove module to erase
Browse files Browse the repository at this point in the history
  • Loading branch information
klaudiosinani committed Nov 16, 2018
1 parent 1862af9 commit 5279160
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const endsWith = require('./src/ends-with')
const entries = require('./src/entries')
const eq = require('./src/eq')
const eqProp = require('./src/eq-prop')
const erase = require('./src/erase')
const even = require('./src/even')
const every = require('./src/every')
const excludes = require('./src/excludes')
Expand Down Expand Up @@ -139,7 +140,6 @@ const recip = require('./src/recip')
const reduce = require('./src/reduce')
const reduceRight = require('./src/reduce-right')
const reject = require('./src/reject')
const remove = require('./src/remove')
const replace = require('./src/replace')
const replaceAll = require('./src/replace-all')
const reverse = require('./src/reverse')
Expand Down Expand Up @@ -236,6 +236,7 @@ module.exports = {
entries,
eq,
eqProp,
erase,
even,
every,
excludes,
Expand Down Expand Up @@ -334,7 +335,6 @@ module.exports = {
reduce,
reduceRight,
reject,
remove,
replace,
replaceAll,
reverse,
Expand Down
6 changes: 3 additions & 3 deletions src/remove.js → src/erase.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ const notArr = require('./not-arr')
const notStr = require('./not-str')
const take = require('./take')

function remove(i, j, xs) {
function erase(i, j, xs) {
if (and(notArr(xs), notStr(xs)))
throw new TypeError('[remove] Last argument must be an array or a string')
throw new TypeError('[erase] Last argument must be an array or a string')

return concat(take(min(i, j), xs), drop(max(i, j), xs))
}

module.exports = curry(remove)
module.exports = curry(erase)

0 comments on commit 5279160

Please sign in to comment.