@jamesrock/rockjs 1.12.0 → 1.13.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 +6 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -26,6 +26,12 @@ export const getDateTimeString = (type = 'short') => `${getDateString(type)} ${g
26
26
  export const isValidKey = (key, options) => options.includes(key);
27
27
  export const makeArray = (length, mapper = (a, i) => i) => Array.from({length}, mapper);
28
28
 
29
+ export const empty = (node) => {
30
+ while(node.firstChild) {
31
+ node.removeChild(node.firstChild);
32
+ };
33
+ };
34
+
29
35
  export const shuffle = (a) => {
30
36
  for(let i = 0; i < a.length; i++) {
31
37
  const b = Math.floor(Math.random() * a.length);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jamesrock/rockjs",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "utility bliss",
5
5
  "license": "ISC",
6
6
  "author": "James Rock",