caller-path
Advanced tools
Comparing version 1.0.0 to 2.0.0
'use strict'; | ||
var callerCallsite = require('caller-callsite'); | ||
const callerCallsite = require('caller-callsite'); | ||
module.exports = function () { | ||
return callerCallsite().getFileName(); | ||
}; | ||
module.exports = () => callerCallsite().getFileName(); |
{ | ||
"name": "caller-path", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "Get the path of the caller function", | ||
@@ -13,6 +13,6 @@ "license": "MIT", | ||
"engines": { | ||
"node": ">=0.10.0" | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"test": "node test.js" | ||
"test": "xo && ava" | ||
}, | ||
@@ -37,7 +37,11 @@ "files": [ | ||
"dependencies": { | ||
"caller-callsite": "^1.0.0" | ||
"caller-callsite": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "0.0.4" | ||
"ava": "*", | ||
"xo": "*" | ||
}, | ||
"xo": { | ||
"esnext": true | ||
} | ||
} |
@@ -17,7 +17,7 @@ # caller-path [![Build Status](https://travis-ci.org/sindresorhus/caller-path.svg?branch=master)](https://travis-ci.org/sindresorhus/caller-path) | ||
// foo.js | ||
var callerPath = require('caller-path'); | ||
const callerPath = require('caller-path'); | ||
module.exports = function () { | ||
module.exports = () => { | ||
console.log(callerPath()); | ||
//=> /Users/sindresorhus/dev/unicorn/bar.js | ||
//=> '/Users/sindresorhus/dev/unicorn/bar.js' | ||
} | ||
@@ -28,3 +28,3 @@ ``` | ||
// bar.js | ||
var foo = require('./foo'); | ||
const foo = require('./foo'); | ||
foo(); | ||
@@ -36,2 +36,2 @@ ``` | ||
MIT © [Sindre Sorhus](http://sindresorhus.com) | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2524
4
2
3
+ Addedcaller-callsite@2.0.0(transitive)
+ Addedcallsites@2.0.0(transitive)
- Removedcaller-callsite@1.0.1(transitive)
- Removedcallsites@1.0.1(transitive)
Updatedcaller-callsite@^2.0.0