is-kit 1.11.6 → 1.11.7

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 CHANGED
@@ -528,6 +528,23 @@ The library is organized around a few small building blocks:
528
528
 
529
529
  For the full API list and dedicated pages, use the docs site below.
530
530
 
531
+ ### v2 migration notice
532
+
533
+ Six low-level utility adapters remain available in v1 for compatibility but are
534
+ deprecated and will no longer be exported from the package root in v2:
535
+
536
+ | Deprecated export | Migration path |
537
+ | ------------------------- | ---------------------------------------------------------------------- |
538
+ | `everyArrayValue` | Use `Array.prototype.every` or the `arrayOf` guard. |
539
+ | `everyTupleValue` | Use the `tupleOf` guard or compare tuple values directly. |
540
+ | `everySetValue` | Use the `setOf` guard or iterate the set directly. |
541
+ | `everyMapEntry` | Use the `mapOf` guard or iterate the map directly. |
542
+ | `everyOwnEnumerableEntry` | Use the `recordOf` guard or `Object.entries(value).every(...)`. |
543
+ | `toBooleanPredicates` | Use the original predicate array directly; this helper is an identity. |
544
+
545
+ The underlying internal helpers may remain in the implementation. Only their
546
+ public root exports are planned for removal.
547
+
531
548
  ## 📚 Full Documentation
532
549
 
533
550
  For detailed API pages and more examples, see:
package/dist/index.d.mts CHANGED
@@ -721,6 +721,8 @@ type BooleanPredicate<T> = (value: T) => boolean;
721
721
  /**
722
722
  * Checks whether every array element satisfies the provided predicate.
723
723
  *
724
+ * @deprecated Use `Array.prototype.every` for boolean iteration or `arrayOf`
725
+ * for a narrowing guard. This root export will be removed in is-kit v2.
724
726
  * @param values Array values to validate.
725
727
  * @param predicate Predicate applied to each element.
726
728
  * @returns Whether all elements satisfy `predicate`.
@@ -729,6 +731,8 @@ declare const everyArrayValue: (values: readonly unknown[], predicate: BooleanPr
729
731
  /**
730
732
  * Checks whether a tuple matches the provided element predicates in order.
731
733
  *
734
+ * @deprecated Use `tupleOf` for a narrowing guard or compare the tuple length
735
+ * and predicates directly. This root export will be removed in is-kit v2.
732
736
  * @param values Tuple candidate values.
733
737
  * @param predicates Predicates aligned to each tuple index.
734
738
  * @returns Whether lengths match and each index passes.
@@ -737,6 +741,8 @@ declare const everyTupleValue: (values: readonly unknown[], predicates: readonly
737
741
  /**
738
742
  * Checks whether every set value satisfies the provided predicate.
739
743
  *
744
+ * @deprecated Use `setOf` for a narrowing guard or iterate the set directly.
745
+ * This root export will be removed in is-kit v2.
740
746
  * @param values Set values to validate.
741
747
  * @param predicate Predicate applied to each value.
742
748
  * @returns Whether all set values satisfy `predicate`.
@@ -745,6 +751,8 @@ declare const everySetValue: (values: ReadonlySet<unknown>, predicate: BooleanPr
745
751
  /**
746
752
  * Checks whether every map entry satisfies the provided key and value predicates.
747
753
  *
754
+ * @deprecated Use `mapOf` for a narrowing guard or iterate the map directly.
755
+ * This root export will be removed in is-kit v2.
748
756
  * @param values Map values to validate.
749
757
  * @param keyPredicate Predicate applied to each key.
750
758
  * @param valuePredicate Predicate applied to each value.
@@ -754,6 +762,9 @@ declare const everyMapEntry: (values: ReadonlyMap<unknown, unknown>, keyPredicat
754
762
  /**
755
763
  * Checks whether every own enumerable string key/value pair satisfies the provided predicates.
756
764
  *
765
+ * @deprecated Use `recordOf` for a narrowing guard or
766
+ * `Object.entries(value).every(...)` for boolean iteration. This root export
767
+ * will be removed in is-kit v2.
757
768
  * @param values Plain object values to validate.
758
769
  * @param keyPredicate Predicate applied to each enumerable own string key.
759
770
  * @param valuePredicate Predicate applied to each corresponding value.
@@ -764,6 +775,8 @@ declare const everyOwnEnumerableEntry: (values: Record<string, unknown>, keyPred
764
775
  /**
765
776
  * Converts predicates to plain boolean predicates for iteration helpers.
766
777
  *
778
+ * @deprecated Use the original predicate array directly. This identity helper
779
+ * will no longer be exported from the package root in is-kit v2.
767
780
  * @param predicates Predicates to be treated as simple boolean functions.
768
781
  * @returns Readonly array of boolean-returning functions.
769
782
  */
package/dist/index.d.ts CHANGED
@@ -721,6 +721,8 @@ type BooleanPredicate<T> = (value: T) => boolean;
721
721
  /**
722
722
  * Checks whether every array element satisfies the provided predicate.
723
723
  *
724
+ * @deprecated Use `Array.prototype.every` for boolean iteration or `arrayOf`
725
+ * for a narrowing guard. This root export will be removed in is-kit v2.
724
726
  * @param values Array values to validate.
725
727
  * @param predicate Predicate applied to each element.
726
728
  * @returns Whether all elements satisfy `predicate`.
@@ -729,6 +731,8 @@ declare const everyArrayValue: (values: readonly unknown[], predicate: BooleanPr
729
731
  /**
730
732
  * Checks whether a tuple matches the provided element predicates in order.
731
733
  *
734
+ * @deprecated Use `tupleOf` for a narrowing guard or compare the tuple length
735
+ * and predicates directly. This root export will be removed in is-kit v2.
732
736
  * @param values Tuple candidate values.
733
737
  * @param predicates Predicates aligned to each tuple index.
734
738
  * @returns Whether lengths match and each index passes.
@@ -737,6 +741,8 @@ declare const everyTupleValue: (values: readonly unknown[], predicates: readonly
737
741
  /**
738
742
  * Checks whether every set value satisfies the provided predicate.
739
743
  *
744
+ * @deprecated Use `setOf` for a narrowing guard or iterate the set directly.
745
+ * This root export will be removed in is-kit v2.
740
746
  * @param values Set values to validate.
741
747
  * @param predicate Predicate applied to each value.
742
748
  * @returns Whether all set values satisfy `predicate`.
@@ -745,6 +751,8 @@ declare const everySetValue: (values: ReadonlySet<unknown>, predicate: BooleanPr
745
751
  /**
746
752
  * Checks whether every map entry satisfies the provided key and value predicates.
747
753
  *
754
+ * @deprecated Use `mapOf` for a narrowing guard or iterate the map directly.
755
+ * This root export will be removed in is-kit v2.
748
756
  * @param values Map values to validate.
749
757
  * @param keyPredicate Predicate applied to each key.
750
758
  * @param valuePredicate Predicate applied to each value.
@@ -754,6 +762,9 @@ declare const everyMapEntry: (values: ReadonlyMap<unknown, unknown>, keyPredicat
754
762
  /**
755
763
  * Checks whether every own enumerable string key/value pair satisfies the provided predicates.
756
764
  *
765
+ * @deprecated Use `recordOf` for a narrowing guard or
766
+ * `Object.entries(value).every(...)` for boolean iteration. This root export
767
+ * will be removed in is-kit v2.
757
768
  * @param values Plain object values to validate.
758
769
  * @param keyPredicate Predicate applied to each enumerable own string key.
759
770
  * @param valuePredicate Predicate applied to each corresponding value.
@@ -764,6 +775,8 @@ declare const everyOwnEnumerableEntry: (values: Record<string, unknown>, keyPred
764
775
  /**
765
776
  * Converts predicates to plain boolean predicates for iteration helpers.
766
777
  *
778
+ * @deprecated Use the original predicate array directly. This identity helper
779
+ * will no longer be exported from the package root in is-kit v2.
767
780
  * @param predicates Predicates to be treated as simple boolean functions.
768
781
  * @returns Readonly array of boolean-returning functions.
769
782
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "is-kit",
3
- "version": "1.11.6",
3
+ "version": "1.11.7",
4
4
  "description": "Zero-dependency TypeScript runtime validation toolkit for composable type guards and natural type narrowing.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",