@alexgyver/component 1.0.11 → 1.0.13

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/component.js +9 -0
  2. package/package.json +1 -1
package/component.js CHANGED
@@ -135,4 +135,13 @@ export class Component {
135
135
  }
136
136
  return $el;
137
137
  }
138
+
139
+ /**
140
+ * Создать массив компонентов из массива объектов конфигурации
141
+ * @param {array} arr массив объектов конфигурации
142
+ * @returns {array} of Elements
143
+ */
144
+ static makeArray(arr) {
145
+ return arr.map(x => Component.make(x.tag, x));
146
+ }
138
147
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexgyver/component",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "Simple HTML element builder",
5
5
  "main": "./component.js",
6
6
  "module": "./component.js",