3.2.0 • Published 9 months ago

@node-kit/extra.path v3.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@node-kit/extra.path

Some shared extra utilities for nodejs build-in path modules

NPM version Codacy Badge Test coverage npm download License

Sonar

Install

# use pnpm
$ pnpm install -D @node-kit/extra.path

# use yarn
$ yarn add -D @node-kit/extra.path

# use npm
$ npm install -D @node-kit/extra.path

Usage

use import

import { dirname } from '@node-kit/extra.path'

dirname()

use require

const { dirname } = require('@node-kit/extra.path')

dirname()

API reference

1. dirname

get dirname from path

  • Usage: dirname(path)
  • Parameters:
ParamDescriptionTypeOptional valueRequiredDefault value
pathsimple pathstring-true-
  • Types:
declare function dirname(path: string): string
  • Demos:
  1. simple use
import { dirname } from '@node-kit/extra.path'

const data = dirname('/path/of/dir/saqqdy')
// data => saqqdy

Issues & Support

Please open an issue here.

License

MIT

3.2.0

9 months ago

3.1.1

11 months ago

3.1.0

11 months ago

3.0.0-beta.1

11 months ago

3.0.0-beta.3

11 months ago

3.0.0-beta.2

11 months ago

3.0.0

11 months ago

3.0.0-beta.5

11 months ago

3.0.0-beta.4

11 months ago

2.3.0

1 year ago

2.5.0

1 year ago

2.4.0

1 year ago

2.5.1

1 year ago

2.2.1

1 year ago

2.2.0

1 year ago

2.1.0

1 year ago

2.0.0

1 year ago

2.0.0-beta.1

1 year ago