@hairy/utils 1.50.0 → 1.51.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/README.md +57 -0
- package/dist/index.cjs +6 -2
- package/dist/index.mjs +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -622,6 +622,63 @@ leading zeros
|
|
|
622
622
|
|
|
623
623
|
<!-- /automd -->
|
|
624
624
|
|
|
625
|
+
## Directory structure
|
|
626
|
+
|
|
627
|
+
<!-- automd:dir-tree imports=""maxDepth=2 -->
|
|
628
|
+
|
|
629
|
+
```
|
|
630
|
+
├── src/
|
|
631
|
+
│ ├── browser/
|
|
632
|
+
│ │ ├── file.ts
|
|
633
|
+
│ │ ├── index.ts
|
|
634
|
+
│ │ └── util.ts
|
|
635
|
+
│ ├── is/
|
|
636
|
+
│ │ └── index.ts
|
|
637
|
+
│ ├── module/
|
|
638
|
+
│ │ ├── change-case.ts
|
|
639
|
+
│ │ ├── index.ts
|
|
640
|
+
│ │ └── lodash-es.ts
|
|
641
|
+
│ ├── number/
|
|
642
|
+
│ │ └── index.ts
|
|
643
|
+
│ ├── string/
|
|
644
|
+
│ │ └── index.ts
|
|
645
|
+
│ ├── typings/
|
|
646
|
+
│ │ ├── atom.ts
|
|
647
|
+
│ │ ├── deep.ts
|
|
648
|
+
│ │ ├── index.ts
|
|
649
|
+
│ │ └── util.ts
|
|
650
|
+
│ ├── util/
|
|
651
|
+
│ │ ├── compose-promise.ts
|
|
652
|
+
│ │ ├── compose.ts
|
|
653
|
+
│ │ ├── deferred.ts
|
|
654
|
+
│ │ ├── delay.ts
|
|
655
|
+
│ │ ├── ghost.ts
|
|
656
|
+
│ │ ├── index.ts
|
|
657
|
+
│ │ ├── json.ts
|
|
658
|
+
│ │ ├── loop.ts
|
|
659
|
+
│ │ ├── map-deep.ts
|
|
660
|
+
│ │ ├── noop.ts
|
|
661
|
+
│ │ ├── pipe-promise.ts
|
|
662
|
+
│ │ ├── pipe.ts
|
|
663
|
+
│ │ ├── proxy.ts
|
|
664
|
+
│ │ ├── random.ts
|
|
665
|
+
│ │ ├── serialized.ts
|
|
666
|
+
│ │ ├── to-array.ts
|
|
667
|
+
│ │ ├── to.ts
|
|
668
|
+
│ │ ├── typeof.ts
|
|
669
|
+
│ │ ├── unit.ts
|
|
670
|
+
│ │ └── util.ts
|
|
671
|
+
│ ├── index.ts
|
|
672
|
+
│ └── special.ts
|
|
673
|
+
├── test/
|
|
674
|
+
│ └── index.test.ts
|
|
675
|
+
├── package.json
|
|
676
|
+
├── README.md
|
|
677
|
+
└── tsdown.config.ts
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
<!-- /automd -->
|
|
681
|
+
|
|
625
682
|
## Source
|
|
626
683
|
|
|
627
684
|
<!-- automd:file src="./src/index.ts" code lang="ts" -->
|
package/dist/index.cjs
CHANGED
|
@@ -6620,9 +6620,13 @@ function proxy(initObject, initExtend, options) {
|
|
|
6620
6620
|
//#region src/util/ghost.ts
|
|
6621
6621
|
function ghost(strictMessage) {
|
|
6622
6622
|
const placeholder = proxy(void 0, {
|
|
6623
|
-
|
|
6624
|
-
resolve
|
|
6623
|
+
enabled: false,
|
|
6624
|
+
resolve
|
|
6625
6625
|
}, { strictMessage: strictMessage || "Object is not enabled. Call ghost.resolve(value) to enable the object." });
|
|
6626
|
+
function resolve(value) {
|
|
6627
|
+
placeholder.proxy.update(value);
|
|
6628
|
+
placeholder.enabled = true;
|
|
6629
|
+
}
|
|
6626
6630
|
return placeholder;
|
|
6627
6631
|
}
|
|
6628
6632
|
|
package/dist/index.mjs
CHANGED
|
@@ -6591,9 +6591,13 @@ function proxy(initObject, initExtend, options) {
|
|
|
6591
6591
|
//#region src/util/ghost.ts
|
|
6592
6592
|
function ghost(strictMessage) {
|
|
6593
6593
|
const placeholder = proxy(void 0, {
|
|
6594
|
-
|
|
6595
|
-
resolve
|
|
6594
|
+
enabled: false,
|
|
6595
|
+
resolve
|
|
6596
6596
|
}, { strictMessage: strictMessage || "Object is not enabled. Call ghost.resolve(value) to enable the object." });
|
|
6597
|
+
function resolve(value) {
|
|
6598
|
+
placeholder.proxy.update(value);
|
|
6599
|
+
placeholder.enabled = true;
|
|
6600
|
+
}
|
|
6597
6601
|
return placeholder;
|
|
6598
6602
|
}
|
|
6599
6603
|
|