mithril-mobs 0.0.2 → 0.0.3

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.
package/README.md CHANGED
@@ -1 +1,2 @@
1
1
  # mithril-mobs
2
+ # mithril-template
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mithril-mobs",
3
3
  "private": false,
4
- "version": "0.0.2",
4
+ "version": "0.0.3",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
package/src/mobs/index.js CHANGED
@@ -235,3 +235,21 @@ const Component = {
235
235
  };
236
236
 
237
237
  export const createComponent = (def) => Component.create(def);
238
+
239
+
240
+
241
+
242
+ /**
243
+ * Repeat Helper
244
+ */
245
+ export const repeat = (times, increment = 1) => {
246
+ return {
247
+ map(cb) {
248
+ const items = []
249
+ for(let i = 0; i < times; i+=increment) {
250
+ items.push(cb(i))
251
+ }
252
+ return items
253
+ }
254
+ }
255
+ }