@jamesrock/rockjs 1.21.0 → 1.22.0

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/index.js +8 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -91,6 +91,14 @@ export const createNode = (type, className) => {
91
91
  return node;
92
92
  };
93
93
 
94
+ export const createSVGNode = (type = 'svg', className) => {
95
+ const node = document.createElementNS('http://www.w3.org/2000/svg', type);
96
+ if(className) {
97
+ node.classList.add(className);
98
+ };
99
+ return node;
100
+ };
101
+
94
102
  export const createButton = (label = '{label}', className) => {
95
103
  const btn = createNode('button', className);
96
104
  btn.innerText = label;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jamesrock/rockjs",
3
- "version": "1.21.0",
3
+ "version": "1.22.0",
4
4
  "description": "utility bliss",
5
5
  "license": "ISC",
6
6
  "author": "James Rock",