معرفی شرکت ها


caller-path-4.0.0


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Get the path of the caller function
ویژگی مقدار
سیستم عامل -
نام فایل caller-path-4.0.0
نام caller-path
نسخه کتابخانه 4.0.0
نگهدارنده ['sindresorhus']
ایمیل نگهدارنده ['sindresorhus@gmail.com']
نویسنده Sindre Sorhus
ایمیل نویسنده sindresorhus@gmail.com
آدرس صفحه اصلی git+https://github.com/sindresorhus/caller-path.git
آدرس اینترنتی https://github.com/sindresorhus/caller-path#readme
مجوز MIT
# caller-path > Get the path of the caller function ## Install ```sh npm install caller-path ``` ## Usage ```js // foo.js import callerPath from 'caller-path'; export default function foo() { console.log(callerPath()); //=> '/Users/sindresorhus/dev/unicorn/bar.js' } ``` ```js // bar.js import foo from './foo.js'; foo(); ``` If the caller's [callsite](https://github.com/sindresorhus/callsites#api) object `getFileName` was not defined for some reason, it will return `undefined`. ## API ### callerPath(options?) Get the path of the caller function. ##### depth Type: `number`\ Default: `0` The caller path depth, meaning how many levels we follow back on the stack trace. For example: ```js // foo.js import callerPath from 'caller-path'; export default function foo() { console.log(callerPath()); //=> '/Users/sindresorhus/dev/unicorn/foobar.js' console.log(callerPath({depth: 1})); //=> '/Users/sindresorhus/dev/unicorn/bar.js' console.log(callerPath({depth: 2})); //=> '/Users/sindresorhus/dev/unicorn/foo.js' } ``` ```js // bar.js import foo from './foo.js'; export default function bar() { foo(); } ``` ```js // foobar.js import bar from './bar.js'; bar(); ``` --- <div align="center"> <b> <a href="https://tidelift.com/subscription/pkg/npm-caller-path?utm_source=npm-caller-path&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a> </b> <br> <sub> Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. </sub> </div>


نیازمندی

مقدار نام
^5.0.0 caller-callsite


زبان مورد نیاز

مقدار نام
16.10.0 Npm


نحوه نصب


نصب پکیج tgz caller-path-4.0.0:

    npm install caller-path-4.0.0.tgz