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

atom-package-path

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atom-package-path

Get path of requirer apm module from your npm module

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
47
increased by20.51%
Maintainers
2
Weekly downloads
 
Created
Source

Atom-Package-Path

An npm module to get path of requirer apm module from your npm module

API
export function guess(): ?string
export function guessFromCallIndex(index: number): ?string
export function guessFromFilePath(filePath: string): ?string
Usage
import {guess} from 'atom-package-path'

export function doSomething() {
  console.log('this package was required in apm package', guess())
}
Notes

This package guesses filePath of requirer based on the stack. It expects the stack to come from the Atom package, therefore it will work only when you call this method when your module is called from an Atom package.

License

This project is licensed under the terms of MIT License. Check the LICENSE file for more info.

Keywords

FAQs

Package last updated on 16 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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