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

vamos

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vamos

Local Node.js in the browser

latest
npmnpm
Version
1.0.0-5
Version published
Maintainers
1
Created
Source

vamos

Local Node.js in the browser

Experimental

npm i vamos

Run the local Node.js microservice

vamos

In a client app, import and use the vamos module to evaluate Node.js code, with access to some core Node.js modules.

import React from 'react'
import vamos from 'vamos'

export default class extends React.Component {
  state = {
    files: []
  }

  componentDidMount () {
    vamos.eval('fs.readdir(os.homedir())')
      .then(files => {
        this.setState({ files })
      })

    vamos.run('ls ~/')
      .then(stdout => {
        console.log(stdout)
      })
  }

  render () {
    const { files } = this.state

    return (
      <ul>
        {files.map(file => (
          <li key={file}>
            {file}
          </li>
        ))}
      </ul>
    )
  }
}

Run your application with any build setup.

Why

  • Alternative to Electron for certain tasks
  • Create command line applications with a web interface
  • Quickly build custom utilities without the overhead of a full desktop app

MIT License

FAQs

Package last updated on 08 Jun 2018

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