@typemove/move 1.0.0-rc.7 → 1.0.0-rc.9

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typemove/move",
3
- "version": "1.0.0-rc.7",
3
+ "version": "1.0.0-rc.9",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -16,8 +16,8 @@ import {
16
16
  SPLITTER,
17
17
  upperFirst,
18
18
  VECTOR_STR,
19
+ camel,
19
20
  } from './utils.js'
20
- import { camel } from 'radash'
21
21
  import { TypeDescriptor } from './types.js'
22
22
  import { ChainAdapter } from './chain-adapter.js'
23
23
 
package/src/utils.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { InternalMoveModule, InternalMoveStruct } from './internal-models.js'
2
+ import { camel as camelRadash } from 'radash'
2
3
 
3
4
  export const SPLITTER = '::'
4
5
 
@@ -51,6 +52,8 @@ const KEYWORDS = new Set([
51
52
  'number',
52
53
  'bigint',
53
54
  'any',
55
+ 'new',
56
+ 'delete',
54
57
  ])
55
58
 
56
59
  export function normalizeToJSName(name: string) {
@@ -81,3 +84,8 @@ export function structQname(
81
84
  export function upperFirst(str: string): string {
82
85
  return str.charAt(0).toUpperCase() + str.slice(1)
83
86
  }
87
+
88
+ export function camel(str: string): string {
89
+ const base = camelRadash(str)
90
+ return str.endsWith('_') ? base + '_' : base
91
+ }