Comparing version 0.1.2 to 0.2.0
@@ -0,1 +1,7 @@ | ||
v0.2.0 / 2015-09-24 | ||
================== | ||
* `path` is optional (@nswbmw) | ||
* Test `node`@4 | ||
v0.1.2 / 2015-09-08 | ||
@@ -2,0 +8,0 @@ ================== |
@@ -6,3 +6,3 @@ 'use strict'; | ||
* @subpackage main | ||
* @version 0.1.0 | ||
* @version 0.2.0 | ||
* @author hex7c0 <hex7c0@gmail.com> | ||
@@ -32,4 +32,5 @@ * @copyright hex7c0 2014 | ||
return basename(path, extname(path)); | ||
var p = path || module.parent.filename; | ||
return basename(p, extname(p)); | ||
} | ||
module.exports = filename; |
{ | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"name": "filename", | ||
@@ -9,3 +9,3 @@ "description": "tiny module for get script filename", | ||
"preferGlobal": false, | ||
"homepage": "http://supergiovane.tk/#/filename", | ||
"homepage": "https://github.com/hex7c0/filename", | ||
"author": { | ||
@@ -12,0 +12,0 @@ "name": "hex7c0", |
@@ -1,2 +0,2 @@ | ||
# [filename](http://supergiovane.tk/#/filename) | ||
# [filename](https://github.com/hex7c0/filename) | ||
@@ -29,10 +29,12 @@ [![NPM version](https://img.shields.io/npm/v/filename.svg)](https://www.npmjs.com/package/filename) | ||
var name = filename(); | ||
// equal | ||
var name = filename(__filename); | ||
``` | ||
### filename(path) | ||
### filename([path]) | ||
#### path | ||
- `path` - **String** Path to normalize *(default "required")* | ||
- `path` - **String** Path to normalize *(default "module.parent.filename")* | ||
@@ -39,0 +41,0 @@ ## Examples |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
38219
31
1
45