ripple 0.2.32 → 0.2.33

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Ripple is a TypeScript UI framework for the web",
4
4
  "license": "MIT",
5
5
  "author": "Dominic Gannaway",
6
- "version": "0.2.32",
6
+ "version": "0.2.33",
7
7
  "type": "module",
8
8
  "module": "src/runtime/index.js",
9
9
  "main": "src/runtime/index.js",
@@ -43,6 +43,7 @@ export {
43
43
  untrack,
44
44
  use_prop,
45
45
  fallback,
46
+ exclude_from_object,
46
47
  } from './runtime.js';
47
48
 
48
49
  export { for_block as for } from './for.js';
@@ -1182,3 +1182,17 @@ export function use_prop() {
1182
1182
  export function fallback(value, fallback) {
1183
1183
  return value === undefined ? fallback : value;
1184
1184
  }
1185
+
1186
+ /**
1187
+ * @param {Record<string, unknown>} obj
1188
+ * @param {string[]} keys
1189
+ * @returns {Record<string, unknown>}
1190
+ */
1191
+ export function exclude_from_object(obj, keys) {
1192
+ obj = { ...obj };
1193
+ let key;
1194
+ for (key of keys) {
1195
+ delete obj[key];
1196
+ }
1197
+ return obj;
1198
+ }