https://github.com/hex7c0/filename
tiny module for get script filename for Nodejs
https://github.com/hex7c0/filename
filename nodejs
Last synced: about 2 months ago
JSON representation
tiny module for get script filename for Nodejs
- Host: GitHub
- URL: https://github.com/hex7c0/filename
- Owner: hex7c0
- License: gpl-3.0
- Created: 2014-09-12T18:30:47.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2023-04-15T22:25:40.000Z (about 3 years ago)
- Last Synced: 2025-10-10T01:58:15.361Z (8 months ago)
- Topics: filename, nodejs
- Language: JavaScript
- Homepage: https://github.com/hex7c0/filename
- Size: 72.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# [filename](https://github.com/hex7c0/filename)
[](https://www.npmjs.com/package/filename)
[](https://travis-ci.org/hex7c0/filename)
[](https://ci.appveyor.com/project/hex7c0/filename)
[](https://david-dm.org/hex7c0/filename)
[](https://coveralls.io/r/hex7c0/filename)
Tiny module for get script filename
## Installation
Install through NPM
```bash
npm install filename
```
or
```bash
git clone git://github.com/hex7c0/filename.git
```
## API
inside nodejs script
```js
var filename = require('filename');
var name = filename();
// equal
var name = filename(__filename);
```
### filename([path])
#### path
- `path` - **String** Path to normalize *(default "module.parent.filename")*
## Examples
Take a look at my [examples](examples)
### [License GPLv3](LICENSE)