pythonlib 0.1.0 → 0.2.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.
Files changed (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +41 -138
  3. package/dist/{chunk-P3SGIF72.js → chunk-4KYJT3DR.js} +8 -6
  4. package/dist/chunk-4KYJT3DR.js.map +1 -0
  5. package/dist/{chunk-3CSEXTA7.js → chunk-4QG3772L.js} +53 -53
  6. package/dist/chunk-4QG3772L.js.map +1 -0
  7. package/dist/{chunk-IVYYI2VR.js → chunk-6POEDI34.js} +1 -1
  8. package/dist/chunk-6POEDI34.js.map +1 -0
  9. package/dist/{chunk-UFMTN4T4.js → chunk-6ZAJ37MR.js} +6 -5
  10. package/dist/chunk-6ZAJ37MR.js.map +1 -0
  11. package/dist/{chunk-V63LKSA3.js → chunk-7TH4FCVQ.js} +24 -24
  12. package/dist/chunk-7TH4FCVQ.js.map +1 -0
  13. package/dist/{chunk-TJFGYXBJ.js → chunk-CXKGPD5D.js} +64 -61
  14. package/dist/chunk-CXKGPD5D.js.map +1 -0
  15. package/dist/{chunk-OMQNGE6T.js → chunk-EE7SK2GV.js} +33 -27
  16. package/dist/chunk-EE7SK2GV.js.map +1 -0
  17. package/dist/{chunk-WAONBJE5.js → chunk-H76SKASU.js} +36 -36
  18. package/dist/chunk-H76SKASU.js.map +1 -0
  19. package/dist/{chunk-TOI6IG3T.js → chunk-HQ42WNKZ.js} +43 -16
  20. package/dist/chunk-HQ42WNKZ.js.map +1 -0
  21. package/dist/{chunk-HA5Y7PKO.js → chunk-LWO6BIAD.js} +36 -35
  22. package/dist/chunk-LWO6BIAD.js.map +1 -0
  23. package/dist/{collections-xN9Gi0TA.d.ts → collections-CJur5Wg-.d.ts} +5 -3
  24. package/dist/collections.d.ts +1 -1
  25. package/dist/collections.js +1 -1
  26. package/dist/{datetime-DRwFAiGV.d.ts → datetime-Bpce8gG2.d.ts} +17 -15
  27. package/dist/datetime.d.ts +1 -1
  28. package/dist/datetime.js +1 -1
  29. package/dist/{functools-St5GqpKG.d.ts → functools-NrsZAqJk.d.ts} +42 -26
  30. package/dist/functools.d.ts +1 -1
  31. package/dist/functools.js +19 -17
  32. package/dist/index.d.ts +56 -158
  33. package/dist/index.js +47 -137
  34. package/dist/index.js.map +1 -1
  35. package/dist/{itertools-Bj8XivI6.d.ts → itertools-Sjl1LB_0.d.ts} +35 -17
  36. package/dist/itertools.d.ts +1 -1
  37. package/dist/itertools.js +15 -11
  38. package/dist/{json-Xpk0kwSd.d.ts → json-DAlvCadU.d.ts} +7 -5
  39. package/dist/json.d.ts +1 -1
  40. package/dist/json.js +1 -1
  41. package/dist/{math-BrT4Aw3E.d.ts → math-DwEGjjQ-.d.ts} +2 -0
  42. package/dist/math.d.ts +1 -1
  43. package/dist/math.js +1 -1
  44. package/dist/{os-FRSJbEUH.d.ts → os-C6Nt7Ijx.d.ts} +45 -42
  45. package/dist/os.d.ts +1 -1
  46. package/dist/os.js +23 -23
  47. package/dist/{random-D5S5iSV3.d.ts → random-BJv_rSpL.d.ts} +24 -22
  48. package/dist/random.d.ts +1 -1
  49. package/dist/random.js +21 -21
  50. package/dist/{re-DSxiURqN.d.ts → re-B1CHCgyr.d.ts} +17 -15
  51. package/dist/re.d.ts +1 -1
  52. package/dist/re.js +7 -7
  53. package/dist/string.d.ts +51 -48
  54. package/dist/string.js +13 -13
  55. package/package.json +30 -11
  56. package/dist/chunk-3CSEXTA7.js.map +0 -1
  57. package/dist/chunk-HA5Y7PKO.js.map +0 -1
  58. package/dist/chunk-IVYYI2VR.js.map +0 -1
  59. package/dist/chunk-OMQNGE6T.js.map +0 -1
  60. package/dist/chunk-P3SGIF72.js.map +0 -1
  61. package/dist/chunk-TJFGYXBJ.js.map +0 -1
  62. package/dist/chunk-TOI6IG3T.js.map +0 -1
  63. package/dist/chunk-UFMTN4T4.js.map +0 -1
  64. package/dist/chunk-V63LKSA3.js.map +0 -1
  65. package/dist/chunk-WAONBJE5.js.map +0 -1
@@ -3,6 +3,9 @@
3
3
  *
4
4
  * Provides operating system interface functions matching Python's os module.
5
5
  * Note: This is a browser-compatible subset. Some functions are stubs.
6
+ *
7
+ * @see {@link https://docs.python.org/3/library/os.html | Python os documentation}
8
+ * @see {@link https://docs.python.org/3/library/os.path.html | Python os.path documentation}
6
9
  */
7
10
  /** Environment variables (browser-safe empty object or Node's process.env) */
8
11
  declare const environ: Record<string, string | undefined>;
@@ -11,17 +14,17 @@ declare function getenv(key: string, defaultValue?: string): string | undefined;
11
14
  /** Path separator for the current platform */
12
15
  declare const sep: string;
13
16
  /** Alternative path separator (Windows has both / and \) */
14
- declare const altsep: string | null;
17
+ declare const altSep: string | null;
15
18
  /** Path list separator (: on Unix, ; on Windows) */
16
- declare const pathsep: string;
19
+ declare const pathSep: string;
17
20
  /** Line separator */
18
- declare const linesep: string;
21
+ declare const lineSep: string;
19
22
  /** Current directory string */
20
- declare const curdir = ".";
23
+ declare const curDir = ".";
21
24
  /** Parent directory string */
22
- declare const pardir = "..";
25
+ declare const parDir = "..";
23
26
  /** Extension separator */
24
- declare const extsep = ".";
27
+ declare const extSep = ".";
25
28
  declare const path: {
26
29
  /** Join path components intelligently */
27
30
  join(...paths: string[]): string;
@@ -32,54 +35,54 @@ declare const path: {
32
35
  /** Split pathname into (head, tail) */
33
36
  split(p: string): [string, string];
34
37
  /** Split pathname into root and extension */
35
- splitext(p: string): [string, string];
38
+ splitExt(p: string): [string, string];
36
39
  /** Return the extension of pathname */
37
- extname(p: string): string;
40
+ extName(p: string): string;
38
41
  /** Test whether a path is absolute */
39
- isabs(p: string): boolean;
42
+ isAbs(p: string): boolean;
40
43
  /** Normalize a pathname */
41
- normpath(p: string): string;
44
+ normPath(p: string): string;
42
45
  /** Return normalized absolutized version of pathname */
43
- abspath(p: string): string;
46
+ absPath(p: string): string;
44
47
  /** Return canonical path, eliminating symlinks (stub - just normalizes) */
45
- realpath(p: string): string;
48
+ realPath(p: string): string;
46
49
  /** Return relative path from start to path */
47
- relpath(p: string, start?: string): string;
50
+ relPath(p: string, start?: string): string;
48
51
  /** Return common path prefix */
49
- commonpath(paths: string[]): string;
52
+ commonPath(paths: string[]): string;
50
53
  /** Expand ~ and ~user (stub - returns unchanged in browser) */
51
- expanduser(p: string): string;
54
+ expandUser(p: string): string;
52
55
  /** Expand shell variables (stub - returns unchanged) */
53
- expandvars(p: string): string;
56
+ expandVars(p: string): string;
54
57
  /** Test if path exists (stub - always returns false in browser) */
55
58
  exists(_p: string): boolean;
56
59
  /** Test if path is a file (stub - always returns false in browser) */
57
- isfile(_p: string): boolean;
60
+ isFile(_p: string): boolean;
58
61
  /** Test if path is a directory (stub - always returns false in browser) */
59
- isdir(_p: string): boolean;
62
+ isDir(_p: string): boolean;
60
63
  /** Test if path is a symbolic link (stub - always returns false in browser) */
61
- islink(_p: string): boolean;
64
+ isLink(_p: string): boolean;
62
65
  /** Return size of file (stub - returns 0 in browser) */
63
- getsize(_p: string): number;
66
+ getSize(_p: string): number;
64
67
  /** Return modification time (stub - returns 0 in browser) */
65
- getmtime(_p: string): number;
68
+ getMtime(_p: string): number;
66
69
  /** Return access time (stub - returns 0 in browser) */
67
- getatime(_p: string): number;
70
+ getAtime(_p: string): number;
68
71
  /** Return creation time (stub - returns 0 in browser) */
69
- getctime(_p: string): number;
72
+ getCtime(_p: string): number;
70
73
  };
71
74
  /** Get current working directory */
72
- declare function getcwd(): string;
73
- /** Get current working directory as bytes (same as getcwd in TS) */
74
- declare function getcwdb(): string;
75
+ declare function getCwd(): string;
76
+ /** Get current working directory as bytes (same as getCwd in TS) */
77
+ declare function getCwdb(): string;
75
78
  /** Change current working directory (stub in browser) */
76
79
  declare function chdir(p: string): void;
77
80
  /** List directory contents (stub - returns empty array in browser) */
78
- declare function listdir(_p?: string): string[];
81
+ declare function listDir(_p?: string): string[];
79
82
  /** Create a directory (stub in browser) */
80
83
  declare function mkdir(_p: string, _mode?: number): void;
81
84
  /** Create a directory and parents (stub in browser) */
82
- declare function makedirs(_p: string, _mode?: number, _existOk?: boolean): void;
85
+ declare function makeDirs(_p: string, _mode?: number, _existOk?: boolean): void;
83
86
  /** Remove a file (stub in browser) */
84
87
  declare function remove(_p: string): void;
85
88
  /** Remove a file (alias for remove) */
@@ -87,7 +90,7 @@ declare const unlink: typeof remove;
87
90
  /** Remove a directory (stub in browser) */
88
91
  declare function rmdir(_p: string): void;
89
92
  /** Remove directory tree (stub in browser) */
90
- declare function removedirs(_p: string): void;
93
+ declare function removeDirs(_p: string): void;
91
94
  /** Rename a file or directory (stub in browser) */
92
95
  declare function rename(_src: string, _dst: string): void;
93
96
  /** Rename with automatic directory creation (stub in browser) */
@@ -110,24 +113,24 @@ declare function stat(_p: string): {
110
113
  /** Operating system name */
111
114
  declare const name: string;
112
115
 
113
- declare const osModule_altsep: typeof altsep;
116
+ declare const osModule_altSep: typeof altSep;
114
117
  declare const osModule_chdir: typeof chdir;
115
- declare const osModule_curdir: typeof curdir;
118
+ declare const osModule_curDir: typeof curDir;
116
119
  declare const osModule_environ: typeof environ;
117
- declare const osModule_extsep: typeof extsep;
118
- declare const osModule_getcwd: typeof getcwd;
119
- declare const osModule_getcwdb: typeof getcwdb;
120
+ declare const osModule_extSep: typeof extSep;
121
+ declare const osModule_getCwd: typeof getCwd;
122
+ declare const osModule_getCwdb: typeof getCwdb;
120
123
  declare const osModule_getenv: typeof getenv;
121
- declare const osModule_linesep: typeof linesep;
122
- declare const osModule_listdir: typeof listdir;
123
- declare const osModule_makedirs: typeof makedirs;
124
+ declare const osModule_lineSep: typeof lineSep;
125
+ declare const osModule_listDir: typeof listDir;
126
+ declare const osModule_makeDirs: typeof makeDirs;
124
127
  declare const osModule_mkdir: typeof mkdir;
125
128
  declare const osModule_name: typeof name;
126
- declare const osModule_pardir: typeof pardir;
129
+ declare const osModule_parDir: typeof parDir;
127
130
  declare const osModule_path: typeof path;
128
- declare const osModule_pathsep: typeof pathsep;
131
+ declare const osModule_pathSep: typeof pathSep;
129
132
  declare const osModule_remove: typeof remove;
130
- declare const osModule_removedirs: typeof removedirs;
133
+ declare const osModule_removeDirs: typeof removeDirs;
131
134
  declare const osModule_rename: typeof rename;
132
135
  declare const osModule_renames: typeof renames;
133
136
  declare const osModule_replace: typeof replace;
@@ -137,7 +140,7 @@ declare const osModule_stat: typeof stat;
137
140
  declare const osModule_unlink: typeof unlink;
138
141
  declare const osModule_walk: typeof walk;
139
142
  declare namespace osModule {
140
- export { osModule_altsep as altsep, osModule_chdir as chdir, osModule_curdir as curdir, osModule_environ as environ, osModule_extsep as extsep, osModule_getcwd as getcwd, osModule_getcwdb as getcwdb, osModule_getenv as getenv, osModule_linesep as linesep, osModule_listdir as listdir, osModule_makedirs as makedirs, osModule_mkdir as mkdir, osModule_name as name, osModule_pardir as pardir, osModule_path as path, osModule_pathsep as pathsep, osModule_remove as remove, osModule_removedirs as removedirs, osModule_rename as rename, osModule_renames as renames, osModule_replace as replace, osModule_rmdir as rmdir, osModule_sep as sep, osModule_stat as stat, osModule_unlink as unlink, osModule_walk as walk };
143
+ export { osModule_altSep as altSep, osModule_chdir as chdir, osModule_curDir as curDir, osModule_environ as environ, osModule_extSep as extSep, osModule_getCwd as getCwd, osModule_getCwdb as getCwdb, osModule_getenv as getenv, osModule_lineSep as lineSep, osModule_listDir as listDir, osModule_makeDirs as makeDirs, osModule_mkdir as mkdir, osModule_name as name, osModule_parDir as parDir, osModule_path as path, osModule_pathSep as pathSep, osModule_remove as remove, osModule_removeDirs as removeDirs, osModule_rename as rename, osModule_renames as renames, osModule_replace as replace, osModule_rmdir as rmdir, osModule_sep as sep, osModule_stat as stat, osModule_unlink as unlink, osModule_walk as walk };
141
144
  }
142
145
 
143
- export { name as A, altsep as a, pardir as b, curdir as c, extsep as d, environ as e, path as f, getenv as g, getcwd as h, getcwdb as i, chdir as j, listdir as k, linesep as l, mkdir as m, makedirs as n, osModule as o, pathsep as p, rmdir as q, remove as r, sep as s, removedirs as t, unlink as u, rename as v, renames as w, replace as x, walk as y, stat as z };
146
+ export { name as A, altSep as a, parDir as b, curDir as c, extSep as d, environ as e, path as f, getenv as g, getCwd as h, getCwdb as i, chdir as j, listDir as k, lineSep as l, mkdir as m, makeDirs as n, osModule as o, pathSep as p, rmdir as q, remove as r, sep as s, removeDirs as t, unlink as u, rename as v, renames as w, replace as x, walk as y, stat as z };
package/dist/os.d.ts CHANGED
@@ -1 +1 @@
1
- export { a as altsep, j as chdir, c as curdir, e as environ, d as extsep, h as getcwd, i as getcwdb, g as getenv, l as linesep, k as listdir, n as makedirs, m as mkdir, A as name, b as pardir, f as path, p as pathsep, r as remove, t as removedirs, v as rename, w as renames, x as replace, q as rmdir, s as sep, z as stat, u as unlink, y as walk } from './os-FRSJbEUH.js';
1
+ export { a as altSep, j as chdir, c as curDir, e as environ, d as extSep, h as getCwd, i as getCwdb, g as getenv, l as lineSep, k as listDir, n as makeDirs, m as mkdir, A as name, b as parDir, f as path, p as pathSep, r as remove, t as removeDirs, v as rename, w as renames, x as replace, q as rmdir, s as sep, z as stat, u as unlink, y as walk } from './os-C6Nt7Ijx.js';
package/dist/os.js CHANGED
@@ -1,22 +1,22 @@
1
1
  import {
2
- altsep,
2
+ altSep,
3
3
  chdir,
4
- curdir,
4
+ curDir,
5
5
  environ,
6
- extsep,
7
- getcwd,
8
- getcwdb,
6
+ extSep,
7
+ getCwd,
8
+ getCwdb,
9
9
  getenv,
10
- linesep,
11
- listdir,
12
- makedirs,
10
+ lineSep,
11
+ listDir,
12
+ makeDirs,
13
13
  mkdir,
14
14
  name,
15
- pardir,
15
+ parDir,
16
16
  path,
17
- pathsep,
17
+ pathSep,
18
18
  remove,
19
- removedirs,
19
+ removeDirs,
20
20
  rename,
21
21
  renames,
22
22
  replace,
@@ -25,27 +25,27 @@ import {
25
25
  stat,
26
26
  unlink,
27
27
  walk
28
- } from "./chunk-TJFGYXBJ.js";
28
+ } from "./chunk-CXKGPD5D.js";
29
29
  import "./chunk-PZ5AY32C.js";
30
30
  export {
31
- altsep,
31
+ altSep,
32
32
  chdir,
33
- curdir,
33
+ curDir,
34
34
  environ,
35
- extsep,
36
- getcwd,
37
- getcwdb,
35
+ extSep,
36
+ getCwd,
37
+ getCwdb,
38
38
  getenv,
39
- linesep,
40
- listdir,
41
- makedirs,
39
+ lineSep,
40
+ listDir,
41
+ makeDirs,
42
42
  mkdir,
43
43
  name,
44
- pardir,
44
+ parDir,
45
45
  path,
46
- pathsep,
46
+ pathSep,
47
47
  remove,
48
- removedirs,
48
+ removeDirs,
49
49
  rename,
50
50
  renames,
51
51
  replace,
@@ -6,15 +6,17 @@
6
6
  *
7
7
  * Note: This is NOT cryptographically secure. For security-sensitive
8
8
  * applications, use the Web Crypto API instead.
9
+ *
10
+ * @see {@link https://docs.python.org/3/library/random.html | Python random documentation}
9
11
  */
10
12
  /** Return a random floating point number in the range [0.0, 1.0) */
11
13
  declare function random(): number;
12
14
  /** Return a random floating point number N such that a <= N <= b */
13
15
  declare function uniform(a: number, b: number): number;
14
16
  /** Return a random integer N such that a <= N <= b (inclusive) */
15
- declare function randint(a: number, b: number): number;
17
+ declare function randInt(a: number, b: number): number;
16
18
  /** Return a randomly selected element from range(start, stop, step) */
17
- declare function randrange(start: number, stop?: number, step?: number): number;
19
+ declare function randRange(start: number, stop?: number, step?: number): number;
18
20
  /** Return a random element from the non-empty sequence */
19
21
  declare function choice<T>(seq: T[] | string): T | string;
20
22
  /** Return a k-length list of elements chosen from the population with replacement */
@@ -29,44 +31,44 @@ declare function shuffle(x: unknown[]): void;
29
31
  /** Gaussian distribution with mean mu and standard deviation sigma */
30
32
  declare function gauss(mu?: number, sigma?: number): number;
31
33
  /** Normal distribution (alias for gauss) */
32
- declare const normalvariate: typeof gauss;
34
+ declare const normalVariate: typeof gauss;
33
35
  /** Triangular distribution with low, high, and mode */
34
36
  declare function triangular(low?: number, high?: number, mode?: number): number;
35
37
  /** Beta distribution with alpha and beta parameters */
36
- declare function betavariate(alpha: number, beta: number): number;
38
+ declare function betaVariate(alpha: number, beta: number): number;
37
39
  /** Exponential distribution with mean 1/lambd */
38
- declare function expovariate(lambd: number): number;
40
+ declare function expoVariate(lambd: number): number;
39
41
  /** Gamma distribution with shape alpha and scale beta */
40
- declare function gammavariate(alpha: number, beta: number): number;
42
+ declare function gammaVariate(alpha: number, beta: number): number;
41
43
  /** Log normal distribution */
42
- declare function lognormvariate(mu: number, sigma: number): number;
44
+ declare function logNormVariate(mu: number, sigma: number): number;
43
45
  /** Von Mises distribution (circular data) */
44
- declare function vonmisesvariate(mu: number, kappa: number): number;
46
+ declare function vonMisesVariate(mu: number, kappa: number): number;
45
47
  /** Pareto distribution */
46
- declare function paretovariate(alpha: number): number;
48
+ declare function paretoVariate(alpha: number): number;
47
49
  /** Weibull distribution */
48
- declare function weibullvariate(alpha: number, beta: number): number;
50
+ declare function weibullVariate(alpha: number, beta: number): number;
49
51
 
50
- declare const randomModule_betavariate: typeof betavariate;
52
+ declare const randomModule_betaVariate: typeof betaVariate;
51
53
  declare const randomModule_choice: typeof choice;
52
54
  declare const randomModule_choices: typeof choices;
53
- declare const randomModule_expovariate: typeof expovariate;
54
- declare const randomModule_gammavariate: typeof gammavariate;
55
+ declare const randomModule_expoVariate: typeof expoVariate;
56
+ declare const randomModule_gammaVariate: typeof gammaVariate;
55
57
  declare const randomModule_gauss: typeof gauss;
56
- declare const randomModule_lognormvariate: typeof lognormvariate;
57
- declare const randomModule_normalvariate: typeof normalvariate;
58
- declare const randomModule_paretovariate: typeof paretovariate;
59
- declare const randomModule_randint: typeof randint;
58
+ declare const randomModule_logNormVariate: typeof logNormVariate;
59
+ declare const randomModule_normalVariate: typeof normalVariate;
60
+ declare const randomModule_paretoVariate: typeof paretoVariate;
61
+ declare const randomModule_randInt: typeof randInt;
62
+ declare const randomModule_randRange: typeof randRange;
60
63
  declare const randomModule_random: typeof random;
61
- declare const randomModule_randrange: typeof randrange;
62
64
  declare const randomModule_sample: typeof sample;
63
65
  declare const randomModule_shuffle: typeof shuffle;
64
66
  declare const randomModule_triangular: typeof triangular;
65
67
  declare const randomModule_uniform: typeof uniform;
66
- declare const randomModule_vonmisesvariate: typeof vonmisesvariate;
67
- declare const randomModule_weibullvariate: typeof weibullvariate;
68
+ declare const randomModule_vonMisesVariate: typeof vonMisesVariate;
69
+ declare const randomModule_weibullVariate: typeof weibullVariate;
68
70
  declare namespace randomModule {
69
- export { randomModule_betavariate as betavariate, randomModule_choice as choice, randomModule_choices as choices, randomModule_expovariate as expovariate, randomModule_gammavariate as gammavariate, randomModule_gauss as gauss, randomModule_lognormvariate as lognormvariate, randomModule_normalvariate as normalvariate, randomModule_paretovariate as paretovariate, randomModule_randint as randint, randomModule_random as random, randomModule_randrange as randrange, randomModule_sample as sample, randomModule_shuffle as shuffle, randomModule_triangular as triangular, randomModule_uniform as uniform, randomModule_vonmisesvariate as vonmisesvariate, randomModule_weibullvariate as weibullvariate };
71
+ export { randomModule_betaVariate as betaVariate, randomModule_choice as choice, randomModule_choices as choices, randomModule_expoVariate as expoVariate, randomModule_gammaVariate as gammaVariate, randomModule_gauss as gauss, randomModule_logNormVariate as logNormVariate, randomModule_normalVariate as normalVariate, randomModule_paretoVariate as paretoVariate, randomModule_randInt as randInt, randomModule_randRange as randRange, randomModule_random as random, randomModule_sample as sample, randomModule_shuffle as shuffle, randomModule_triangular as triangular, randomModule_uniform as uniform, randomModule_vonMisesVariate as vonMisesVariate, randomModule_weibullVariate as weibullVariate };
70
72
  }
71
73
 
72
- export { random as a, randint as b, randrange as c, choice as d, choices as e, shuffle as f, gauss as g, betavariate as h, expovariate as i, gammavariate as j, lognormvariate as l, normalvariate as n, paretovariate as p, randomModule as r, sample as s, triangular as t, uniform as u, vonmisesvariate as v, weibullvariate as w };
74
+ export { random as a, randInt as b, randRange as c, choice as d, choices as e, shuffle as f, gauss as g, betaVariate as h, expoVariate as i, gammaVariate as j, logNormVariate as l, normalVariate as n, paretoVariate as p, randomModule as r, sample as s, triangular as t, uniform as u, vonMisesVariate as v, weibullVariate as w };
package/dist/random.d.ts CHANGED
@@ -1 +1 @@
1
- export { h as betavariate, d as choice, e as choices, i as expovariate, j as gammavariate, g as gauss, l as lognormvariate, n as normalvariate, p as paretovariate, b as randint, a as random, c as randrange, s as sample, f as shuffle, t as triangular, u as uniform, v as vonmisesvariate, w as weibullvariate } from './random-D5S5iSV3.js';
1
+ export { h as betaVariate, d as choice, e as choices, i as expoVariate, j as gammaVariate, g as gauss, l as logNormVariate, n as normalVariate, p as paretoVariate, b as randInt, c as randRange, a as random, s as sample, f as shuffle, t as triangular, u as uniform, v as vonMisesVariate, w as weibullVariate } from './random-BJv_rSpL.js';
package/dist/random.js CHANGED
@@ -1,42 +1,42 @@
1
1
  import {
2
- betavariate,
2
+ betaVariate,
3
3
  choice,
4
4
  choices,
5
- expovariate,
6
- gammavariate,
5
+ expoVariate,
6
+ gammaVariate,
7
7
  gauss,
8
- lognormvariate,
9
- normalvariate,
10
- paretovariate,
11
- randint,
8
+ logNormVariate,
9
+ normalVariate,
10
+ paretoVariate,
11
+ randInt,
12
+ randRange,
12
13
  random,
13
- randrange,
14
14
  sample,
15
15
  shuffle,
16
16
  triangular,
17
17
  uniform,
18
- vonmisesvariate,
19
- weibullvariate
20
- } from "./chunk-WAONBJE5.js";
18
+ vonMisesVariate,
19
+ weibullVariate
20
+ } from "./chunk-H76SKASU.js";
21
21
  import "./chunk-PZ5AY32C.js";
22
22
  export {
23
- betavariate,
23
+ betaVariate,
24
24
  choice,
25
25
  choices,
26
- expovariate,
27
- gammavariate,
26
+ expoVariate,
27
+ gammaVariate,
28
28
  gauss,
29
- lognormvariate,
30
- normalvariate,
31
- paretovariate,
32
- randint,
29
+ logNormVariate,
30
+ normalVariate,
31
+ paretoVariate,
32
+ randInt,
33
+ randRange,
33
34
  random,
34
- randrange,
35
35
  sample,
36
36
  shuffle,
37
37
  triangular,
38
38
  uniform,
39
- vonmisesvariate,
40
- weibullvariate
39
+ vonMisesVariate,
40
+ weibullVariate
41
41
  };
42
42
  //# sourceMappingURL=random.js.map
@@ -8,6 +8,8 @@
8
8
  * - Lookbehind assertions (limited support in modern JS)
9
9
  * - Named groups use different syntax (?P<name>...) vs (?<name>...)
10
10
  * - Verbose mode (x flag) is not supported
11
+ *
12
+ * @see {@link https://docs.python.org/3/library/re.html | Python re documentation}
11
13
  */
12
14
  /** Ignore case */
13
15
  declare const IGNORECASE = 2;
@@ -36,7 +38,7 @@ declare class Match {
36
38
  /** Return a tuple containing all subgroups */
37
39
  groups(defaultValue?: string): (string | undefined)[];
38
40
  /** Return a dictionary of named groups */
39
- groupdict(defaultValue?: string): Record<string, string | undefined>;
41
+ groupDict(defaultValue?: string): Record<string, string | undefined>;
40
42
  /** Return the start index of the match */
41
43
  start(groupNum?: number): number;
42
44
  /** Return the end index of the match */
@@ -48,9 +50,9 @@ declare class Match {
48
50
  /** Return end position of search */
49
51
  get endpos(): number;
50
52
  /** Return the last matched group index */
51
- get lastindex(): number | undefined;
53
+ get lastIndex(): number | undefined;
52
54
  /** Return the name of the last matched group */
53
- get lastgroup(): string | undefined;
55
+ get lastGroup(): string | undefined;
54
56
  /** Return the pattern object */
55
57
  get re(): Pattern;
56
58
  /** Return the input string */
@@ -72,13 +74,13 @@ declare class Pattern {
72
74
  /** Match pattern at start of string */
73
75
  match(string: string, pos?: number, endpos?: number): Match | null;
74
76
  /** Match pattern against entire string */
75
- fullmatch(string: string, pos?: number, endpos?: number): Match | null;
77
+ fullMatch(string: string, pos?: number, endpos?: number): Match | null;
76
78
  /** Split string by pattern */
77
79
  split(string: string, maxsplit?: number): string[];
78
80
  /** Find all matches */
79
- findall(string: string, pos?: number, endpos?: number): (string | string[])[];
81
+ findAll(string: string, pos?: number, endpos?: number): (string | string[])[];
80
82
  /** Find all matches as iterator */
81
- finditer(string: string, pos?: number, endpos?: number): Generator<Match>;
83
+ findIter(string: string, pos?: number, endpos?: number): Generator<Match>;
82
84
  /** Replace pattern in string */
83
85
  sub(repl: string | ((match: Match) => string), string: string, count?: number): string;
84
86
  /** Replace pattern and return (newstring, count) */
@@ -90,7 +92,7 @@ declare class Pattern {
90
92
  /** Return number of groups */
91
93
  get groups(): number;
92
94
  /** Return named groups mapping */
93
- get groupindex(): Record<string, number>;
95
+ get groupIndex(): Record<string, number>;
94
96
  toString(): string;
95
97
  }
96
98
  /** Compile a regular expression pattern */
@@ -100,13 +102,13 @@ declare function search(pattern: string | Pattern, string: string, flags?: numbe
100
102
  /** Match pattern at start of string */
101
103
  declare function match(pattern: string | Pattern, string: string, flags?: number): Match | null;
102
104
  /** Match pattern against entire string */
103
- declare function fullmatch(pattern: string | Pattern, string: string, flags?: number): Match | null;
105
+ declare function fullMatch(pattern: string | Pattern, string: string, flags?: number): Match | null;
104
106
  /** Split string by pattern */
105
107
  declare function split(pattern: string | Pattern, string: string, maxsplit?: number, flags?: number): string[];
106
108
  /** Find all matches */
107
- declare function findall(pattern: string | Pattern, string: string, flags?: number): (string | string[])[];
109
+ declare function findAll(pattern: string | Pattern, string: string, flags?: number): (string | string[])[];
108
110
  /** Find all matches as iterator */
109
- declare function finditer(pattern: string | Pattern, string: string, flags?: number): Generator<Match>;
111
+ declare function findIter(pattern: string | Pattern, string: string, flags?: number): Generator<Match>;
110
112
  /** Replace pattern in string */
111
113
  declare function sub(pattern: string | Pattern, repl: string | ((match: Match) => string), string: string, count?: number, flags?: number): string;
112
114
  /** Replace pattern and return (newstring, count) */
@@ -132,9 +134,9 @@ declare const reModule_U: typeof U;
132
134
  declare const reModule_UNICODE: typeof UNICODE;
133
135
  declare const reModule_compile: typeof compile;
134
136
  declare const reModule_escape: typeof escape;
135
- declare const reModule_findall: typeof findall;
136
- declare const reModule_finditer: typeof finditer;
137
- declare const reModule_fullmatch: typeof fullmatch;
137
+ declare const reModule_findAll: typeof findAll;
138
+ declare const reModule_findIter: typeof findIter;
139
+ declare const reModule_fullMatch: typeof fullMatch;
138
140
  declare const reModule_match: typeof match;
139
141
  declare const reModule_purge: typeof purge;
140
142
  declare const reModule_search: typeof search;
@@ -142,7 +144,7 @@ declare const reModule_split: typeof split;
142
144
  declare const reModule_sub: typeof sub;
143
145
  declare const reModule_subn: typeof subn;
144
146
  declare namespace reModule {
145
- export { reModule_A as A, reModule_ASCII as ASCII, reModule_DOTALL as DOTALL, reModule_I as I, reModule_IGNORECASE as IGNORECASE, reModule_M as M, reModule_MULTILINE as MULTILINE, reModule_Match as Match, reModule_Pattern as Pattern, reModule_S as S, reModule_U as U, reModule_UNICODE as UNICODE, reModule_compile as compile, reModule_escape as escape, reModule_findall as findall, reModule_finditer as finditer, reModule_fullmatch as fullmatch, reModule_match as match, reModule_purge as purge, reModule_search as search, reModule_split as split, reModule_sub as sub, reModule_subn as subn };
147
+ export { reModule_A as A, reModule_ASCII as ASCII, reModule_DOTALL as DOTALL, reModule_I as I, reModule_IGNORECASE as IGNORECASE, reModule_M as M, reModule_MULTILINE as MULTILINE, reModule_Match as Match, reModule_Pattern as Pattern, reModule_S as S, reModule_U as U, reModule_UNICODE as UNICODE, reModule_compile as compile, reModule_escape as escape, reModule_findAll as findAll, reModule_findIter as findIter, reModule_fullMatch as fullMatch, reModule_match as match, reModule_purge as purge, reModule_search as search, reModule_split as split, reModule_sub as sub, reModule_subn as subn };
146
148
  }
147
149
 
148
- export { ASCII as A, DOTALL as D, IGNORECASE as I, MULTILINE as M, Pattern as P, S, UNICODE as U, I as a, M as b, U as c, A as d, Match as e, compile as f, fullmatch as g, split as h, findall as i, finditer as j, sub as k, subn as l, match as m, escape as n, purge as p, reModule as r, search as s };
150
+ export { ASCII as A, DOTALL as D, IGNORECASE as I, MULTILINE as M, Pattern as P, S, UNICODE as U, I as a, M as b, U as c, A as d, Match as e, compile as f, fullMatch as g, split as h, findAll as i, findIter as j, sub as k, subn as l, match as m, escape as n, purge as p, reModule as r, search as s };
package/dist/re.d.ts CHANGED
@@ -1 +1 @@
1
- export { d as A, A as ASCII, D as DOTALL, a as I, I as IGNORECASE, b as M, M as MULTILINE, e as Match, P as Pattern, S, c as U, U as UNICODE, f as compile, n as escape, i as findall, j as finditer, g as fullmatch, m as match, p as purge, s as search, h as split, k as sub, l as subn } from './re-DSxiURqN.js';
1
+ export { d as A, A as ASCII, D as DOTALL, a as I, I as IGNORECASE, b as M, M as MULTILINE, e as Match, P as Pattern, S, c as U, U as UNICODE, f as compile, n as escape, i as findAll, j as findIter, g as fullMatch, m as match, p as purge, s as search, h as split, k as sub, l as subn } from './re-B1CHCgyr.js';
package/dist/re.js CHANGED
@@ -13,16 +13,16 @@ import {
13
13
  UNICODE,
14
14
  compile,
15
15
  escape,
16
- findall,
17
- finditer,
18
- fullmatch,
16
+ findAll,
17
+ findIter,
18
+ fullMatch,
19
19
  match,
20
20
  purge,
21
21
  search,
22
22
  split,
23
23
  sub,
24
24
  subn
25
- } from "./chunk-V63LKSA3.js";
25
+ } from "./chunk-7TH4FCVQ.js";
26
26
  import "./chunk-PZ5AY32C.js";
27
27
  export {
28
28
  A,
@@ -39,9 +39,9 @@ export {
39
39
  UNICODE,
40
40
  compile,
41
41
  escape,
42
- findall,
43
- finditer,
44
- fullmatch,
42
+ findAll,
43
+ findIter,
44
+ fullMatch,
45
45
  match,
46
46
  purge,
47
47
  search,