{"name":"env-editor","version":"1.2.0","keywords":["env","editor","environment","variable","default","editors","main","user","meta","metadata","info","name","binary","path","sublime","atom","vscode","webstorm","textmate","vim","neovim","intellij","nano","emacs"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"env-editor@1.2.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/env-editor#readme","bugs":{"url":"https://github.com/sindresorhus/env-editor/issues"},"dist":{"shasum":"3013a874c19c8c82641d49dd1eb4e33ba4c68dda","tarball":"http://registry-npm.ywwl.com/env-editor/download/env-editor-1.2.0.tgz","fileCount":5,"integrity":"sha512-95xu95NECgvM/jjiH06J27abnGsJ5vv4Dbq/F+jDqA3V+YSrvEv8/VWaXeqU3M09mzU51biEugHlTwNl0yP2eQ==","signatures":[{"sig":"MEUCIDEGbiiypwwZb5T888dF4CCEWUAAbURQLVsIb9tIoF0wAiEA7aebz/T/knFL6sZzYITKTIR5EZif4Jdx/tHFQCHXqEQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9830,"size":3273,"noattachment":false,"key":"/env-editor/-/env-editor-1.2.0.tgz"},"type":"module","types":"./index.d.ts","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"exports":"./index.js","funding":"https://github.com/sponsors/sindresorhus","gitHead":"526f8d58fc7088138a7254712adc8f8bdbc5458b","scripts":{"test":"xo && ava && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/env-editor.git","type":"git"},"_npmVersion":"10.9.2","description":"Get metadata on the default editor or a specific editor","directories":{},"sideEffects":false,"_nodeVersion":"20.19.1","_hasShrinkwrap":false,"devDependencies":{"xo":"^0.44.0","ava":"^3.15.0","tsd":"^0.17.0"},"_npmOperationalInternal":{"tmp":"tmp/env-editor_1.2.0_1757418256862_0.18572047373817813","host":"s3://npm-registry-packages-npm-production"},"readme":"# env-editor\n\n> Get metadata on the default editor or a specific editor\n\nThis module is used by [`open-editor`](https://github.com/sindresorhus/open-editor).\n\n## Supported editors\n\n- Sublime Text\n- Atom\n- Visual Studio Code\n- Visual Studio Code - Insiders\n- VSCodium\n- WebStorm\n- TextMate\n- Vim\n- NeoVim\n- IntelliJ\n- GNU nano\n- GNU Emacs\n- Android Studio\n- Xcode\n\n## Install\n\n```sh\nnpm install env-editor\n```\n\n## Usage\n\n```js\nimport {defaultEditor, getEditor, allEditors} from 'env-editor';\n\ndefaultEditor();\n/*\n{\n\tid: 'atom',\n\tname: 'Atom',\n\tbinary: 'atom',\n\tisTerminalEditor: false,\n\tpaths: [\n\t\t'/Applications/Atom.app/Contents/Resources/app/atom.sh'\n\t],\n\tkeywords: []\n}\n*/\n\ngetEditor('sublime');\n/*\n{\n\tid: 'sublime',\n\tname: 'Sublime Text',\n\tbinary: 'subl',\n\tisTerminalEditor: false,\n\tpaths: [\n\t\t'/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl',\n\t\t'/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl'\n\t],\n\tkeywords: []\n}\n*/\n\nallEditors();\n/*\n[\n\t{\n\t\tid: 'atom',\n\t\t…\n\t},\n\t{\n\t\tid: 'sublime,\n\t\t…\n\t},\n\t…\n]\n*/\n```\n\n## API\n\n### defaultEditor()\n\nReturns metadata on the default editor.\n\nThe user is expected to have the `$EDITOR` environment variable set, and if not, a user-friendly error is thrown.\n\n### getEditor(editor)\n\nReturns metadata on the specified editor.\n\n#### editor\n\nType: `string`\n\nThis can be pretty flexible. It matches against all the data it has.\n\nFor example, to get Sublime Text, you could write either of the following: `sublime`, `Sublime Text`, `subl`.\n\n### allEditors()\n\nReturns an array with metadata on all the editors.\n","publish_time":1757418257072,"_cnpm_publish_time":1757418257072,"dist-tags":{"latest":"1.3.0"}}