Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
utils
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
EIT-SWE
ux
utils
Commits
2abf0554
Commit
2abf0554
authored
May 18, 2020
by
Ryan Diehl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: removes createReducer
parent
2b0e0ceb
Pipeline
#101027
failed with stages
in 3 minutes and 52 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
21 deletions
+0
-21
libs/utils/rx/src/index.ts
libs/utils/rx/src/index.ts
+0
-1
libs/utils/rx/src/lib/reducer-utils.spec.ts
libs/utils/rx/src/lib/reducer-utils.spec.ts
+0
-11
libs/utils/rx/src/lib/reducer-utils.ts
libs/utils/rx/src/lib/reducer-utils.ts
+0
-9
No files found.
libs/utils/rx/src/index.ts
View file @
2abf0554
export
{
httpRetryBackoff
,
HttpRetryBackoffConfig
}
from
'
./lib/http-backoff
'
;
export
{
createReducer
}
from
'
./lib/reducer-utils
'
;
libs/utils/rx/src/lib/reducer-utils.spec.ts
deleted
100644 → 0
View file @
2b0e0ceb
import
{
createReducer
}
from
'
..
'
;
describe
(
'
reducer utils
'
,
()
=>
{
describe
(
'
createReducer
'
,
()
=>
{
it
(
'
should create reducer correctly
'
,
()
=>
{
const
result
=
createReducer
({},
{});
expect
(
result
instanceof
Function
).
toBe
(
true
);
expect
(
result
({
s
:
'
s
'
},
{})).
toEqual
({
s
:
'
s
'
});
});
});
});
libs/utils/rx/src/lib/reducer-utils.ts
deleted
100644 → 0
View file @
2b0e0ceb
/**
* @deprecated use ngrx reducer creators instead
*
*/
export
function
createReducer
(
iState
,
handlers
):
(
state
,
action
)
=>
any
{
return
(
state
=
iState
,
action
)
=>
{
return
handlers
.
hasOwnProperty
(
action
.
type
)
?
handlers
[
action
.
type
](
state
,
action
)
:
state
;
};
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment