samchon / typia

Super-fast/easy runtime validators and serializers via transformation
https://typia.io/
MIT License
4.45k stars 153 forks source link

incorrect casing with camel #1172

Closed stephen-dahl closed 1 month ago

stephen-dahl commented 1 month ago

📝 Summary

Write detailed description in here. My object is PASCAL_CASE. When I pass it to assertCamel the returned keys are not camelCase they are cAMELCASE image

EXAMPLE_ONE becomes eXAMPLEONE instead of exampleOne

⏯ Playground Link

https://typia.io/playground/?script=JYWwDg9gTgLgBDAnmYBDANHA3g1BzAZzgF84AzKCEOAIiRVRoG4AoUSWbAY1RAFMANqQpU4AcnpoA9AOAAjKQDsIMVDGARFBMSzaKYfKGVRc+cAJIBZPiDmHsLOHADSAUQCaAfQDyAOVcAXHAEMFDAinisTm5eACoA6t5BIWERUS4enrEAEgBKroHBoeGRLMS6Anzw4WAArvAAvA7RmX6FYpp8YuiOGXGJQRIA7hDdvTFZeQWDMAAWUHxdZcFqwARkwHxEVjZ2ULpcmiFwEPV1jXA8-AIAPDu2hgB8ABQ19QCUB0cQlQB0AhA8M9TjBzu8mHAWEA

💻 Code occuring the bug

import typia, { tags } from "typia";
import {camel} from 'typia/lib/notations'

interface IMember {
  KEY_ONE: string;
  KEY_TWO: string;
  KEY_THREE: string;
}

let input = {
  KEY_ONE: 'one',
  KEY_TWO: 'two',
  KEY_THREE: 'three'
} satisfies IMember

const output = camel<IMember>(input)

console.log(output); 
samchon commented 1 month ago

Upgrade to v6.5.3, then be fixed.