-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathdeno_path.deno.txt
70 lines (50 loc) · 2.21 KB
/
deno_path.deno.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
┏━━━━━━━━━━━━━━━┓
┃ DENO_PATH ┃
┗━━━━━━━━━━━━━━━┛
VERSION ==> #Part of Deno
#Browser compatible
PATH vs URL ==> #URLs and 'file://...' are cross-OS
#Unlike Node, PATHs are always OS-specific, i.e. should avoid
@std/path/posix|windows/... #Same as @std/path/... but for a specific OS
@std/path/[unstable-]normalize
normalize('PATH'|URL)->'PATH' #Like Node
!#Can pass URL
@std/path/[unstable-]join
join('PATH'|URL[, 'PATH...']) #Like Node
->'PATH2' !#Can pass URL
@std/path/resolve
resolve('PATH',...)->'PATH2' #Like Node
@std/path/relative
relative('PATH', 'PATH2')->'PATH3'#Like Node
@std/path/is-absolute
isAbsolute('PATH')->BOOL #Like Node
@std/path/[unstable-]dirname
dirname('PATH'|URL)->'DIR' #Like Node
!#Can pass URL
@std/path/[unstable-]basename
basename('PATH'|URL[, '.EXT'])
->'FILENAME' #Like Node
!#Can pass URL
@std/path/[unstable-]extname
extname('PATH'|URL)->'.EXT' #Like Node
!#Can pass URL
@std/path/parse
parse('PATH')->PATH_OBJ #Like Node
@std/path/format
format(PATH_OBJ)->'PATH' #Like Node
@std/path/to-namespaced-path
toNamespacedPath('PATH')->'PATH' #Like Node
@std/path/constants
SEPARATOR #Like Node sep
SEPARATOR_PATTERN #/\/+/ (Unix) or /[\\/]+/ (Windows)
DELIMITER #Like Node
@std/path/from-file-url
fromFileUrl(URI|'URI')->'PATH' #Like Node fileURLToPath()
@std/path/to-file-url
toFileUrl('PATH')->URI #Like Node pathToFileURL()
@std/path/normalize-glob
normalizeGlob('GLOB'[, O]) #Like normalize(), but has OPTS:
->'GLOB' # - globstar true (def: false): keep **
@std/path/join-globs
joinGlobs('GLOB'_ARR[, O])
->'GLOB' #Like join(). Same O as normalizeGlob()