nuclo 0.1.35 → 0.1.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +6 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -102,12 +102,12 @@ type Todo = { id: number; text: string; done: boolean };
102
102
 
103
103
  let todos: Todo[] = [];
104
104
  let nextId = 1;
105
- let input = '';
105
+ let inputValue = '';
106
106
 
107
107
  function addTodo() {
108
- if (!input.trim()) return;
109
- todos.push({ id: nextId++, text: input, done: false });
110
- input = '';
108
+ if (!inputValue.trim()) return;
109
+ todos.push({ id: nextId++, text: inputValue, done: false });
110
+ inputValue = '';
111
111
  update();
112
112
  }
113
113
 
@@ -116,8 +116,8 @@ const app = div(
116
116
 
117
117
  // Input
118
118
  div(
119
- input({ value: () => input },
120
- on('input', e => { input = e.target.value; update(); }),
119
+ input({ value: () => inputValue },
120
+ on('input', e => { inputValue = e.target.value; update(); }),
121
121
  on('keydown', e => e.key === 'Enter' && addTodo())
122
122
  ),
123
123
  button('Add', on('click', addTodo))
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuclo",
3
3
  "private": false,
4
- "version": "0.1.35",
4
+ "version": "0.1.36",
5
5
  "type": "module",
6
6
  "main": "./dist/nuclo.cjs",
7
7
  "module": "./dist/nuclo.js",