Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dpmland/draco
File and folder multiplatform utils for Deno!
https://github.com/dpmland/draco
deno deno-module filesystem library typescript utils-library
Last synced: about 1 month ago
JSON representation
File and folder multiplatform utils for Deno!
- Host: GitHub
- URL: https://github.com/dpmland/draco
- Owner: dpmland
- License: gpl-3.0
- Created: 2022-01-17T19:23:09.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-19T01:12:43.000Z (almost 3 years ago)
- Last Synced: 2024-10-16T22:26:13.532Z (about 2 months ago)
- Topics: deno, deno-module, filesystem, library, typescript, utils-library
- Language: TypeScript
- Homepage: https://deno.land/x/draco
- Size: 26.4 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-deno - draco - File and folder multiplatform utils for Deno! (Modules / Utils)
README
## Dpm - Draco :sauropod:
[![Discord](https://img.shields.io/discord/932381618851692565?label=Discord&logo=discord&logoColor=white)](https://discord.gg/Um27YPJKud)
[![Twitter](https://img.shields.io/twitter/follow/dpm_land?label=Dpm%20Land&style=social)](https://twitter.com/intent/follow?screen_name=dpm_land)
[![GitHub license](https://img.shields.io/github/license/dpmland/draco?label=License)](./LICENSE)
![Github Workflow](https://img.shields.io/github/workflow/status/dpmland/draco/CI)Is a collection of utils for the system, directories, deno and files
informations :p## Usage
> Draco Info -> Show the os and deno information
```ts
import { dracoInfo } from 'https://deno.land/x/[email protected]/mod.ts';// Prints the os in was running
console.log(dracoInfo.platform());
// Show the architecture was running
console.log(dracoInfo.arch());
// Show the hostname
console.log(dracoInfo.hostname());
// Show the total memory on the machine
console.log(dracoInfo.memoryTotal());
// Show the memory free on the machine
console.log(dracoInfo.memoryFree());
// Show the memory avaliable
console.log(dracoInfo.memoryAvaliable());// Shows the deno version running now
console.log(dracoInfo.DenoVersion);
// Shows the deno typescript version
console.log(dracoInfo.DenoTypescript);
// Shows the deno v8 version
console.log(dracoInfo.DenoV8);
```> Draco Files -> Show the file utils and directory utils.
```ts
import { dracoFiles } from 'https://deno.land/x/[email protected]/mod.ts';// Show the current directory
console.log(dracoFiles.currentDir());
// Show the cache dir for a application
console.log(dracoFiles.cacheDir('app_example'));
// Show the config dir for a application
console.log(dracoFiles.configDir('app_example'));
// Show the temp directory on the current os
console.log(dracoFiles.tempDir());
// Show the home directory
console.log(dracoFiles.homeDir());// Check if file or folder exists and return true if exists and false if not
console.log(dracoFiles.exists('./examples/dracoInfo.ts'));
// Write a json file from a object
console.log(
dracoFiles.writeJson('./examples/json_example.json', { data: 'hello' }),
);
```---
Made with :heart: in :earth_americas: