Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danielpza/directories-js
https://github.com/dirs-dev/directories-rs for javascript
https://github.com/danielpza/directories-js
javascript npm typescript xdg xdg-basedir
Last synced: 27 days ago
JSON representation
https://github.com/dirs-dev/directories-rs for javascript
- Host: GitHub
- URL: https://github.com/danielpza/directories-js
- Owner: danielpza
- Created: 2020-06-25T20:34:43.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T15:16:12.000Z (almost 2 years ago)
- Last Synced: 2024-09-17T07:58:26.207Z (about 2 months ago)
- Topics: javascript, npm, typescript, xdg, xdg-basedir
- Language: TypeScript
- Homepage:
- Size: 187 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# directories
https://github.com/dirs-dev/directories-rs for javascript
## Installation
```js
# from npm
npm install directories-js# or from github:
npm install https://github.com/danielpza/directories-js
```## Usage
```typescript
import { baseDirs, userDirs, projectDirs } from "directories-js";baseDirs.home();
baseDirs.cache();
baseDirs.config();
baseDirs.data();
baseDirs.dataLocal();
baseDirs.executable();
baseDirs.preference();
baseDirs.runtime();userDirs.home();
userDirs.audio();
userDirs.desktop();
userDirs.document();
userDirs.download();
userDirs.font();
userDirs.picture();
userDirs.public();
userDirs.template();
userDirs.video();const project = {
qualifier: "org",
organization: "Baz Corp",
application: "Foo Bar-App",
};
// or const project = "baz-corp/foo-bar-app";
projectDirs.cache(project);
projectDirs.config(project);
projectDirs.data(project);
projectDirs.dataLocal(project);
projectDirs.preference(project);
projectDirs.runtime(project);
```