@naturalcycles/js-lib 14.108.0 → 14.108.1

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.
@@ -1,10 +1,21 @@
1
+ import type { Integer } from '../types';
1
2
  export interface ReadingTimeOptions {
3
+ /**
4
+ * A function that returns a boolean value depending on if a character is considered as a word bound.
5
+ * Default: spaces, new lines and tabs
6
+ */
2
7
  wordBound?: (char: string) => boolean;
8
+ /**
9
+ * Default 200
10
+ */
3
11
  wordsPerMinute?: number;
4
12
  }
5
13
  export interface ReadingTimeStats {
6
- time: number;
7
- minutes: number;
14
+ /**
15
+ * Number of milliseconds.
16
+ */
17
+ time: Integer;
18
+ minutes: Integer;
8
19
  }
9
20
  export interface WordCountStats {
10
21
  total: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/js-lib",
3
- "version": "14.108.0",
3
+ "version": "14.108.1",
4
4
  "scripts": {
5
5
  "prepare": "husky install",
6
6
  "build-prod": "build-prod-esm-cjs",
@@ -9,14 +9,26 @@ Reasons:
9
9
 
10
10
  */
11
11
 
12
+ import type { Integer } from '../types'
13
+
12
14
  export interface ReadingTimeOptions {
15
+ /**
16
+ * A function that returns a boolean value depending on if a character is considered as a word bound.
17
+ * Default: spaces, new lines and tabs
18
+ */
13
19
  wordBound?: (char: string) => boolean
20
+ /**
21
+ * Default 200
22
+ */
14
23
  wordsPerMinute?: number
15
24
  }
16
25
 
17
26
  export interface ReadingTimeStats {
18
- time: number
19
- minutes: number
27
+ /**
28
+ * Number of milliseconds.
29
+ */
30
+ time: Integer
31
+ minutes: Integer
20
32
  }
21
33
 
22
34
  export interface WordCountStats {