https://github.com/justjavac/deno_is_relative
Whether the filepath is a relative file path.
https://github.com/justjavac/deno_is_relative
deno deno-mod deno-module deno-modules filesystem path
Last synced: about 2 months ago
JSON representation
Whether the filepath is a relative file path.
- Host: GitHub
- URL: https://github.com/justjavac/deno_is_relative
- Owner: justjavac
- License: mit
- Created: 2020-08-24T02:28:49.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-24T02:35:24.000Z (almost 6 years ago)
- Last Synced: 2025-03-08T09:47:24.254Z (over 1 year ago)
- Topics: deno, deno-mod, deno-module, deno-modules, filesystem, path
- Language: TypeScript
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# deno_is_relative
[](https://github.com/justjavac/deno_is_relative/releases)
[](https://github.com/justjavac/deno_is_relative/actions)
[](https://github.com/justjavac/deno_is_relative/blob/master/LICENSE)
Whether the filepath is a **relative** file path.
> Base on [jonschlinkert/is-relative](https://github.com/jonschlinkert/is-relative)
## Usage
```ts
import isRelative from "https://deno.land/x/is_relative/mod.ts";
// return true
isRelative("foo.txt")
isRelative("./foo.txt")
isRelative("./bar/foo.txt")
isRelative("./bar/foo/")
// return false
isRelative('/User/dev/foo/bar.txt')
isRelative('e://foo/bar.txt')
isRelative('e:/foo/bar.txt')
isRelative('\\User\\foo\\bar.txt')
```
## License
[deno_is_relative](https://github.com/justjavac/deno_is_relative) is released under the MIT License. See the bundled [LICENSE](./LICENSE) file for details.