Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcf24aac

Browse files
committed
renamed codepen example to juicr
1 parentc966726 commitcf24aac

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

‎_codepen/todoJuicr.js‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
window.createToDoJuicer=(state)=>{
2-
constjuicer=newwindow.Juicer({initialState:state,dev:true})
1+
window.createToDoJuicr=(state)=>{
2+
constjuicr=newwindow.Juicr({initialState:state,dev:true})
33

44
letid=0
55

@@ -8,7 +8,7 @@ window.createToDoJuicer = (state) => {
88
returntodos[i]
99
}
1010

11-
juicer.action('addTodo',({},_state)=>{
11+
juicr.action('addTodo',({},_state)=>{
1212
if(_state.newTodo.length===0){
1313
return{errorText:"cannot create empty todo"}
1414
}else{
@@ -25,15 +25,15 @@ window.createToDoJuicer = (state) => {
2525
}
2626
})
2727

28-
juicer.action('textInput',({ text},_state)=>{
28+
juicr.action('textInput',({ text},_state)=>{
2929
return{newTodo:text}
3030
})
3131

32-
juicer.action('setFilter',({ filter},_state)=>{
32+
juicr.action('setFilter',({ filter},_state)=>{
3333
return{ filter}
3434
})
3535

36-
juicer.action('toggleAll',({},_state)=>{
36+
juicr.action('toggleAll',({},_state)=>{
3737
return{
3838
todos:_state.todos.map((t)=>{
3939
t.isComplete=true
@@ -42,7 +42,7 @@ window.createToDoJuicer = (state) => {
4242
}
4343
})
4444

45-
juicer.action('toggleDone',({ id},_state)=>{
45+
juicr.action('toggleDone',({ id},_state)=>{
4646
consttodo=findToDoFromId(_state.todos,id)
4747
if(todo){
4848
todo.isComplete=!todo.isComplete
@@ -52,7 +52,7 @@ window.createToDoJuicer = (state) => {
5252
}
5353
})
5454

55-
juicer.action('toggleEdit',({ id},_state)=>{
55+
juicr.action('toggleEdit',({ id},_state)=>{
5656
consttodo=findToDoFromId(_state.todos,id)
5757
if(todo){
5858
todo.isEditing=!todo.isEditing
@@ -62,7 +62,7 @@ window.createToDoJuicer = (state) => {
6262
}
6363
})
6464

65-
juicer.action('updateTodo',({ id, title},_state)=>{
65+
juicr.action('updateTodo',({ id, title},_state)=>{
6666
consttodo=findToDoFromId(_state.todos,id)
6767
if(todo){
6868
todo.title=title
@@ -72,15 +72,15 @@ window.createToDoJuicer = (state) => {
7272
}
7373
})
7474

75-
juicer.action('clearCompleted',({},_state)=>{
75+
juicr.action('clearCompleted',({},_state)=>{
7676
return{todos:_state.todos.filter(t=>t.isComplete===false)}
7777
})
7878

79-
juicer.action('delete',({ id},_state)=>{
79+
juicr.action('delete',({ id},_state)=>{
8080
return{todos:_state.todos.filter(t=>t.id!==id)}
8181
})
8282

83-
juicer.reaction(["todos","filter"],(changedState,_state)=>{
83+
juicr.reaction(["todos","filter"],(changedState,_state)=>{
8484
constfilters={
8585
all:(t)=>{returnt},
8686
completed:(t)=>{returnt.isComplete===true},
@@ -93,5 +93,5 @@ window.createToDoJuicer = (state) => {
9393
}
9494
})
9595

96-
returnjuicer
96+
returnjuicr
9797
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp