@forklaunch/common
Advanced tools
+8
-1
@@ -64,2 +64,9 @@ declare function isNever(value: never): value is never; | ||
| export { type Flatten, type FlattenKeys, type FlattenValues, type MakePropertyOptionalIfChildrenOptional, type Prettify, type RemoveTrailingSlash, extractArgumentNames, isNever, isRecord }; | ||
| /** | ||
| * Removes all properties with undefined values from an object. Note: this does NOT strip null values. | ||
| * @param obj The object to strip undefined properties from | ||
| * @returns A new object with all undefined properties removed | ||
| */ | ||
| declare function stripUndefinedProperties<T extends Record<string, unknown>>(obj: T): Partial<T>; | ||
| export { type Flatten, type FlattenKeys, type FlattenValues, type MakePropertyOptionalIfChildrenOptional, type Prettify, type RemoveTrailingSlash, extractArgumentNames, isNever, isRecord, stripUndefinedProperties }; |
+8
-1
@@ -64,2 +64,9 @@ declare function isNever(value: never): value is never; | ||
| export { type Flatten, type FlattenKeys, type FlattenValues, type MakePropertyOptionalIfChildrenOptional, type Prettify, type RemoveTrailingSlash, extractArgumentNames, isNever, isRecord }; | ||
| /** | ||
| * Removes all properties with undefined values from an object. Note: this does NOT strip null values. | ||
| * @param obj The object to strip undefined properties from | ||
| * @returns A new object with all undefined properties removed | ||
| */ | ||
| declare function stripUndefinedProperties<T extends Record<string, unknown>>(obj: T): Partial<T>; | ||
| export { type Flatten, type FlattenKeys, type FlattenValues, type MakePropertyOptionalIfChildrenOptional, type Prettify, type RemoveTrailingSlash, extractArgumentNames, isNever, isRecord, stripUndefinedProperties }; |
+11
-2
@@ -25,3 +25,4 @@ "use strict"; | ||
| isNever: () => isNever, | ||
| isRecord: () => isRecord | ||
| isRecord: () => isRecord, | ||
| stripUndefinedProperties: () => stripUndefinedProperties | ||
| }); | ||
@@ -67,2 +68,9 @@ module.exports = __toCommonJS(index_exports); | ||
| } | ||
| // src/utils/stripUndefinedProperties.ts | ||
| function stripUndefinedProperties(obj) { | ||
| return Object.fromEntries( | ||
| Object.entries(obj).filter(([, value]) => value !== void 0) | ||
| ); | ||
| } | ||
| // Annotate the CommonJS export names for ESM import in node: | ||
@@ -72,3 +80,4 @@ 0 && (module.exports = { | ||
| isNever, | ||
| isRecord | ||
| isRecord, | ||
| stripUndefinedProperties | ||
| }); |
+9
-1
@@ -38,6 +38,14 @@ // src/guards/isNever.ts | ||
| } | ||
| // src/utils/stripUndefinedProperties.ts | ||
| function stripUndefinedProperties(obj) { | ||
| return Object.fromEntries( | ||
| Object.entries(obj).filter(([, value]) => value !== void 0) | ||
| ); | ||
| } | ||
| export { | ||
| extractArgumentNames, | ||
| isNever, | ||
| isRecord | ||
| isRecord, | ||
| stripUndefinedProperties | ||
| }; |
+28
-43
| { | ||
| "name": "@forklaunch/common", | ||
| "version": "0.2.0", | ||
| "version": "0.2.1", | ||
| "description": "Common package for base types, interfaces, implementations.", | ||
| "files": [ | ||
| "lib/**" | ||
| ], | ||
| "types": "lib/index.d.ts", | ||
| "homepage": "https://github.com/forklaunch/forklaunch-js#readme", | ||
| "bugs": { | ||
| "url": "https://github.com/forklaunch/forklaunch-js/issues" | ||
| }, | ||
| "repository": { | ||
@@ -13,38 +13,4 @@ "type": "git", | ||
| }, | ||
| "license": "MIT", | ||
| "author": "Rohin Bhargava", | ||
| "license": "MIT", | ||
| "bugs": { | ||
| "url": "https://github.com/forklaunch/forklaunch-js/issues" | ||
| }, | ||
| "homepage": "https://github.com/forklaunch/forklaunch-js#readme", | ||
| "devDependencies": { | ||
| "@eslint/js": "^9.17.0", | ||
| "@types/jest": "^29.5.14", | ||
| "argparse": "^2.0.1", | ||
| "balanced-match": "^3.0.1", | ||
| "brace-expansion": "^4.0.0", | ||
| "entities": "^6.0.0", | ||
| "eslint": "^9.17.0", | ||
| "globals": "^15.14.0", | ||
| "jest": "^29.7.0", | ||
| "linkify-it": "^5.0.0", | ||
| "lunr": "^2.3.9", | ||
| "markdown-it": "^14.1.0", | ||
| "mdurl": "^2.0.0", | ||
| "minimatch": "^10.0.1", | ||
| "punycode.js": "^2.3.1", | ||
| "shiki": "^1.26.1", | ||
| "ts-jest": "^29.2.5", | ||
| "ts-node": "^10.9.2", | ||
| "tsup": "^8.3.5", | ||
| "typedoc": "^0.27.6", | ||
| "typescript": "^5.7.3", | ||
| "typescript-eslint": "^8.19.1", | ||
| "uc.micro": "^2.1.0", | ||
| "vitest": "^2.1.8", | ||
| "yaml": "^2.7.0" | ||
| }, | ||
| "directories": { | ||
| "test": "tests" | ||
| }, | ||
| "exports": { | ||
@@ -58,12 +24,31 @@ ".": { | ||
| }, | ||
| "types": "lib/index.d.ts", | ||
| "directories": { | ||
| "test": "tests" | ||
| }, | ||
| "files": [ | ||
| "lib/**" | ||
| ], | ||
| "devDependencies": { | ||
| "@eslint/js": "^9.18.0", | ||
| "depcheck": "^1.4.7", | ||
| "eslint": "^9.18.0", | ||
| "globals": "^15.14.0", | ||
| "tsup": "^8.3.5", | ||
| "typedoc": "^0.27.6", | ||
| "typescript": "^5.7.3", | ||
| "typescript-eslint": "^8.20.0", | ||
| "vitest": "^3.0.2" | ||
| }, | ||
| "scripts": { | ||
| "test": "vitest --passWithNoTests", | ||
| "build": "tsc --noEmit && tsup index.ts --format cjs,esm --no-splitting --tsconfig tsconfig.json --outDir lib --dts --clean", | ||
| "check": "depcheck", | ||
| "clean": "rm -rf lib pnpm.lock.yaml node_modules", | ||
| "docs": "typedoc --out docs *", | ||
| "format": "prettier --ignore-path=.prettierignore --config .prettierrc '**/*.{ts,tsx,json}' --write", | ||
| "lint": "eslint . -c eslint.config.mjs", | ||
| "lint:fix": "eslint . -c eslint.config.mjs --fix", | ||
| "format": "prettier --ignore-path=.prettierignore --config .prettierrc '**/*.ts' --write", | ||
| "publish:package": "./publish-package.bash" | ||
| "publish:package": "./publish-package.bash", | ||
| "test": "vitest --passWithNoTests" | ||
| } | ||
| } |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
11344
7.66%9
-64%185
12.8%0
-100%