Skip to content

Commit 32e36b0

Browse files
committed
Use switch-functional
1 parent 5b04fdd commit 32e36b0

File tree

5 files changed

+17
-64
lines changed

5 files changed

+17
-64
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
- Conditions can now be [booleans](README.md#boolean-condition),
44
[error properties objects](README.md#check-error-properties) or an
55
[array of conditions](README.md#alternative-conditions)
6+
- Split core logic to a separate new module:
7+
[`switch-functional`](https://github.com/ehmicky/switch-functional)
68

79
# 4.0.1
810

package-lock.json

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@
5555
},
5656
"dependencies": {
5757
"is-error-instance": "^3.0.1",
58-
"is-plain-obj": "^4.1.0"
58+
"is-plain-obj": "^4.1.0",
59+
"switch-functional": "^1.0.0"
5960
},
6061
"devDependencies": {
6162
"@ehmicky/dev-tasks": "^3.0.34",

src/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import switchFunctional from 'switch-functional'
2+
13
import { normalizeConditions } from './condition.js'
24
import { normalizeEffects } from './effect.js'
3-
import { switchFunctional } from './switch.js'
45

56
// `ErrorClass.switch(value)`
67
const switchMethod = ({ ErrorClass }, value) =>

src/switch.js

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

0 commit comments

Comments
 (0)