@marianmeres/stuic 1.52.0 → 1.53.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.
@@ -0,0 +1,6 @@
1
+ export declare const omit: (obj: any, keys: string | string[]) => {
2
+ [k: string]: unknown;
3
+ };
4
+ export declare const pick: (obj: any, keys: string | string[]) => {
5
+ [k: string]: unknown;
6
+ };
@@ -0,0 +1,10 @@
1
+ export const omit = (obj, keys) => {
2
+ if (typeof keys === 'string')
3
+ keys = [keys];
4
+ return Object.fromEntries(Object.entries(obj).filter(([k]) => !(keys || []).includes(k)));
5
+ };
6
+ export const pick = (obj, keys) => {
7
+ if (typeof keys === 'string')
8
+ keys = [keys];
9
+ return Object.fromEntries(Object.entries(obj).filter(([k]) => (keys || []).includes(k)));
10
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "1.52.0",
3
+ "version": "1.53.0",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package && node ./scripts/date.js",