@formvk/shared 0.1.0 → 1.0.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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ # @formvk/shared
2
+
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 65c066c: 添加readme.md文档
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [65c066c]
12
+ - @formvk/path@1.0.0
package/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # @formvk/shared
2
+
3
+ Low-level utilities shared by the Formvk packages: type checkers, array/object iteration, cloning, deep merge, defaults, `Subscribable`, middleware and uid generation. It is installed transitively by the other packages; use it directly only when building Formvk-compatible tooling.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm add @formvk/shared
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```ts
14
+ import { clone, isPlainObj, merge, toArr, uid } from '@formvk/shared'
15
+
16
+ isPlainObj({}) // true
17
+ toArr('a') // ['a']
18
+
19
+ const copy = clone({ a: 1 })
20
+ const merged = merge({ a: 1 }, { b: 2 })
21
+ const id = uid()
22
+ ```
23
+
24
+ ## API
25
+
26
+ - **Checkers** — `isFn`, `isArr`, `isObj`, `isPlainObj`, `isStr`, `isNum`, `isBool`, `isMap`, `isSet`, `isWeakMap`, `isWeakSet`, `isRegExp`, `isNumberLike`, `isReactElement`, `isHTMLElement`, `getType`.
27
+ - **Emptiness** — `isUndef`, `isValid`, `isEmpty`.
28
+ - **Collections** — `toArr`, `each`, `map`, `reduce`, `every`, `some`, `find`, `findIndex`, `includes`, `move`.
29
+ - **Objects** — `clone`, `shallowClone`, `merge`, `lazyMerge`, `defaults`, `instOf`.
30
+ - **Strings** — `stringLength`, `lowerCase`, `pascalCase`.
31
+ - **Path** — `FormPath` (alias of `Path` from `@formvk/path`) and the `FormPathPattern` type.
32
+ - **Infrastructure** — `Subscribable`, `applyMiddleware`, `deprecate`, `uid`, `globalThisPolyfill`, `isEqual`.
33
+
34
+ ## Documentation
35
+
36
+ https://formvk.github.io/core/api/core
37
+
38
+ ## License
39
+
40
+ MIT