@nonara/ts-helpers
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.0.3](https://github.com/nonara/ts-helpers/compare/v0.0.2...v0.0.3) (2021-07-07) | ||
### Bug Fixes | ||
* **general-utils:** Add class support for snake converters & fix return type for camelToSnake ([b62f65f](https://github.com/nonara/ts-helpers/commit/b62f65f7f8ae4cceadfe33520b7d3e05cdd1df71)) | ||
### [0.0.2](https://github.com/nonara/ts-helpers/compare/v0.0.1...v0.0.2) (2021-07-07) | ||
@@ -7,0 +14,0 @@ |
@@ -52,3 +52,3 @@ import { CamelToSnakeCase, SnakeToCamelCase } from './type-helpers'; | ||
*/ | ||
export declare function snakeToCamel<T extends object>(obj: T): T extends Function ? T : T extends Array<infer U> ? T : T extends null ? T : { | ||
export declare function snakeToCamel<T extends object>(obj: T): T extends Array<infer U> ? T : T extends null ? T : { | ||
[K in keyof T as SnakeToCamelCase<K>]: T[K]; | ||
@@ -59,9 +59,9 @@ }; | ||
*/ | ||
export declare function camelToSnake<T extends string | object>(str: T): CamelToSnakeCase<T>; | ||
export declare function camelToSnake<T extends string>(str: T): CamelToSnakeCase<T>; | ||
/** | ||
* Shallow copies object, converting property keys from camelCase to snake_case | ||
*/ | ||
export declare function camelToSnake<T extends string | object>(obj: T): T extends Function ? T : T extends Array<infer U> ? T : T extends null ? T : { | ||
export declare function camelToSnake<T extends object>(obj: T): T extends Array<infer U> ? T : T extends null ? T : { | ||
[K in keyof T as CamelToSnakeCase<K>]: T[K]; | ||
}; | ||
export { deepMerge, deepCopy }; |
{ | ||
"name": "@nonara/ts-helpers", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Helpers for TypeScript projects", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
52473
0