New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

alanode

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alanode

The Binary To Run Node.JS Files With Import And Export Statements.

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

alanode

npm version

alanode is The Binary To Run Node.JS Files With Import And Export Statements.

yarn add -DE alanode # project-based
yarn global add alanode # user-based

Table Of Contents

CLI

The package can be run from the CLI:

$ alanode source

It uses ÀLaMode regex-based transpiler to change import and export statements into require calls and module.export expressions (no Babel). It also normalises process.argv to hide its presence, so that programs can safely keep using the argv array without unexpected results.

With the following file that uses an import:

import { constants } from 'os'
console.log(process.argv)
console.log(constants.signals.SIGINT)

$ alanode t will generate the result successfully:

[
  '/Users/anton/.nvm/versions/node/v12.14.1/bin/node',
  '/Users/anton/a-la/alanode/test/fixture/t'
]
2

(c) À La Mode 2019

Keywords

alamode

FAQs

Package last updated on 15 Apr 2020

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