Path helpers for Nextcloud https://npmjs.org/@nextcloud/paths
Перейти к файлу
dependabot[bot] 73ec625622
chore(deps): Bump fsfe/reuse-action from 4.0.0 to 5.0.0
Bumps [fsfe/reuse-action](https://github.com/fsfe/reuse-action) from 4.0.0 to 5.0.0.
- [Release notes](https://github.com/fsfe/reuse-action/releases)
- [Commits](3ae3c6bdf1...bb774aa972)

---
updated-dependencies:
- dependency-name: fsfe/reuse-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 18:22:47 +00:00
.github chore(deps): Bump fsfe/reuse-action from 4.0.0 to 5.0.0 2024-11-18 18:22:47 +00:00
LICENSES
lib
test fix: Correctly setup Typescript root to emit declarations 2024-07-25 11:59:48 +02:00
.gitignore
AUTHORS.md
CHANGELOG.md chore: Prepare v2.2.1 2024-07-25 12:02:43 +02:00
LICENSE
README.md docs: Add REUSE badge 2024-07-17 11:57:44 +02:00
REUSE.toml fix: Correctly setup Typescript root to emit declarations 2024-07-25 11:59:48 +02:00
package-lock.json Merge pull request #720 from nextcloud-libraries/dependabot/npm_and_yarn/vitest/coverage-v8-2.1.5 2024-11-16 02:28:46 +00:00
package.json Merge pull request #720 from nextcloud-libraries/dependabot/npm_and_yarn/vitest/coverage-v8-2.1.5 2024-11-16 02:28:46 +00:00
tsconfig.json fix: Correctly setup Typescript root to emit declarations 2024-07-25 11:59:48 +02:00
vite.config.ts
vitest.config.ts fix: Correctly setup Typescript root to emit declarations 2024-07-25 11:59:48 +02:00

README.md

@nextcloud/paths

REUSE status npm Documentation

Path helpers for Nextcloud apps.

Installation

npm i -S @nextcloud/paths

Usage

import { basename, dirname, encodePath, isSamePath, joinPaths } from '@nextcloud/paths'

basename('/my/file.txt')
// -> 'file.txt'

dirname('/my/file.txt')
// -> '/my'

encodePath('/my/other file.txt')
// -> '/my/other%20file'

isSamePath('/my/file.txt', 'my/file.txt')
// -> true

joinPaths('/my', 'folder', 'file.txt')
// -> '/my/folder/file.txt'