You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
-
# @folder/xdg[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68)[](https://www.npmjs.com/package/@folder/xdg)[](https://npmjs.org/package/@folder/xdg)[](https://npmjs.org/package/@folder/xdg)
1
+
# @folder/xdg[](https://www.npmjs.com/package/@folder/xdg)[](https://npmjs.org/package/@folder/xdg)[](https://npmjs.org/package/@folder/xdg)
2
2
3
-
> Get cross-platform XDG Base Directories or their equivalents. Works with Linux, Windows, or MacOS. No dependencies.
3
+
> Get cross-platform XDG Base Directories or their equivalents. Works with Linux, Windows, or MacOS.
4
4
5
5
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
6
6
7
7
## Install
8
8
9
-
Install with [npm](https://www.npmjs.com/) (requires [Node.js](https://nodejs.org/en/) >=8):
9
+
Install with [npm](https://www.npmjs.com/):
10
10
11
11
```sh
12
12
$ npm install --save @folder/xdg
@@ -260,7 +260,7 @@ Get the XDG Base Directory paths for Linux, or equivalent paths for Windows or M
260
260
*`options`**{Object}**
261
261
*`returns`**{Object}**: Returns an object of paths for the current platform.
262
262
263
-
### [.darwin](index.js#L43)
263
+
### [.darwin](index.js#L44)
264
264
265
265
Get XDG equivalent paths for MacOS. Used by the main export when `process.platform` is `darwin`. Aliased as `xdg.macos()`.
266
266
@@ -277,7 +277,7 @@ const dirs = xdg.darwin();
277
277
constdirs=xdg.macos();
278
278
```
279
279
280
-
### [.linux](index.js#L83)
280
+
### [.linux](index.js#L89)
281
281
282
282
Get XDG equivalent paths for Linux. Used by the main export when `process.platform` is `linux`.
283
283
@@ -290,7 +290,7 @@ Get XDG equivalent paths for Linux. Used by the main export when `process.platfo
290
290
constdirs=xdg.linux();
291
291
```
292
292
293
-
### [.win32](index.js#L124)
293
+
### [.win32](index.js#L136)
294
294
295
295
Get XDG equivalent paths for MacOS. Used by the main export when `process.platform` is `win32`. Aliased as `xdg.windows()`.
296
296
@@ -327,7 +327,7 @@ load each file.
327
327
*`paths`**{Object}**: Optionally pass the paths from the `userdirs()` function to avoid creating them again.
328
328
*`returns`**{Object}**: Returns an object with a `paths` object, and `config`, `defaults`, `dirs`, and `create` functions for actually loading the user-dir files.
329
329
330
-
### [.userdirs.conf()](lib/userdirs.js#L77)
330
+
### [.userdirs.conf()](lib/userdirs.js#L76)
331
331
332
332
Loads and parses the contents of `user-dirs.conf`, if one exists in user home.
Loads and parses the contents of `user-dirs.dirs`, if one exists in user home.
378
378
@@ -395,7 +395,7 @@ console.log(dirs);
395
395
// }
396
396
```
397
397
398
-
### [.userdirs.create()](lib/userdirs.js#L166)
398
+
### [.userdirs.create()](lib/userdirs.js#L165)
399
399
400
400
Get the actual XDG User Directories to use for MacOS. Gets the `user-dirs.conf`, `user-dirs.defaults`, and the `user-dirs.dirs` files and, if not disabled in `user-dirs.conf`, merges the values in defaults and dirs to create the paths to use.
401
401
@@ -422,7 +422,7 @@ console.log(dirs);
422
422
// }
423
423
```
424
424
425
-
### [.userdirs.darwin()](lib/userdirs.js#L182)
425
+
### [.userdirs.darwin()](lib/userdirs.js#L181)
426
426
427
427
Get the XDG User Directories for MacOS. This method is used by the main function when `process.platform` is `darwin`. Exposed as a method so you can call it directly if necessary. Also aliased as `userdirs.macos()`.
428
428
@@ -437,7 +437,7 @@ Get the XDG User Directories for MacOS. This method is used by the main function
437
437
const { dirs, conf, defaults } =userdirs.darwin(); // or userdirs.macos();
438
438
```
439
439
440
-
### [.userdirs.linux()](lib/userdirs.js#L210)
440
+
### [.userdirs.linux()](lib/userdirs.js#L209)
441
441
442
442
Gets the XDG User Directories for Linux. Used by the main export when `process.platform` is `linux`.
443
443
@@ -450,7 +450,7 @@ Gets the XDG User Directories for Linux. Used by the main export when `process.p
450
450
const { dirs, conf, defaults } =userdirs.linux();
451
451
```
452
452
453
-
### [.userdirs.win32()](lib/userdirs.js#L236)
453
+
### [.userdirs.win32()](lib/userdirs.js#L235)
454
454
455
455
Gets the XDG User Directories for MacOS. Used by the `userdirs()` function when `process.platform` is `win32`. Also aliased as `userdirs.windows()`.
456
456
@@ -558,9 +558,9 @@ You might also be interested in these projects:
0 commit comments