Skip to content

hex7c0/filename

Repository files navigation

NPM version Linux Status Windows Status Dependency Status Coveralls

Tiny module for get script filename

Installation

Install through NPM

npm install filename

or

git clone git://github.com/hex7c0/filename.git

API

inside nodejs script

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