
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
atom-selected-requires
Advanced tools
Retrieve the paths of any require statements in the current selection.
Retrieve the paths of any require statements in the current selection. Originally extracted from atom-node-resolver, and syntax-aware, just like browserify.
paths = selectedRequires([editor])Given an editor, check all of the current selections and return an array of require paths. If no editor is
supplied, the currently active editor will be used.
For example, given a file like so:
const a = require('atom-selected-requires')
const b = require('@scoped/package')
const c = require('./local-file')
You could run the following:
const selectedRequires = require('atom-selected-requires')
const editor = atom.workspace.getActiveEditor()
console.log(selectedRequires(editor))
And receive an array like so in return:
[
'atom-selected-requires',
'@scoped/package',
'./local-file'
]
MIT. See LICENSE.md for details.
FAQs
Retrieve the paths of any require statements in the current selection.
The npm package atom-selected-requires receives a total of 12 weekly downloads. As such, atom-selected-requires popularity was classified as not popular.
We found that atom-selected-requires demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.