Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hex7c0/filename
tiny module for get script filename for Nodejs
https://github.com/hex7c0/filename
filename nodejs
Last synced: about 1 month 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 (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-04-15T22:25:40.000Z (over 1 year ago)
- Last Synced: 2024-11-09T06:54:50.794Z (about 2 months ago)
- Topics: filename, nodejs
- Language: JavaScript
- Homepage: https://github.com/hex7c0/filename
- Size: 72.3 KB
- Stars: 1
- Watchers: 2
- 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)
[![NPM version](https://img.shields.io/npm/v/filename.svg)](https://www.npmjs.com/package/filename)
[![Linux Status](https://img.shields.io/travis/hex7c0/filename.svg?label=linux-osx)](https://travis-ci.org/hex7c0/filename)
[![Windows Status](https://img.shields.io/appveyor/ci/hex7c0/filename.svg?label=windows)](https://ci.appveyor.com/project/hex7c0/filename)
[![Dependency Status](https://img.shields.io/david/hex7c0/filename.svg)](https://david-dm.org/hex7c0/filename)
[![Coveralls](https://img.shields.io/coveralls/hex7c0/filename.svg)](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)