An open API service indexing awesome lists of open source software.

https://github.com/robloach/wren-path

Work with file and directory paths in Wren.
https://github.com/robloach/wren-path

Last synced: 4 months ago
JSON representation

Work with file and directory paths in Wren.

Awesome Lists containing this project

README

          

# wren-path

Utility class for the [Wren scripting language](https://wren.io) to work with file and directory paths.

## Usage

``` js
import "path/to/wren-path/Path" for Path

Path.basename("path/to/something.txt") // => something.txt
Path.extname("something.txt") // => .txt
Path.isAbsolute("/path/to/something.txt") // => true
Path.dirname("/path/to/something.txt") // => /path/to
Path.normalize("path/to/other/../something.txt") // => path/to/something.txt
```

## Testing

```
git submodule update --init
wren_cli test.wren
```