Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

filename

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filename - npm Package Compare versions

Comparing version 0.1.2 to 0.2.0

6

History.md

@@ -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 @@ ==================

5

index.js

@@ -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;

4

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc