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

replos

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

replos

REPL on steroids for typescript and javascript

  • 1.0.1-alpha
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

REPLos the repl on steroids for javascript and typescript

REPLos is a tool that enables developers to keep working in a single context.

Without REPLos, you need to switch context every time you verify your codes correctness.

With REPLos, you write a short unit of functionality and immediately check for mistakes, by evaluating just the code you have written and not leaving your IDE.

Additional benefit: You can use the inputs you provided to generate unit tests.

Status: Open Alpha

Installation

1. Install as global npm module

npm i -g replos

2. start replos server

replos-server

default port is set to 9464 can be changed with -p <PORT> e.g. replos-server -p 9465;

3. start using the replos client

replos repl "1 + 1" or replos repl -p <PORT> "1 + 1"

4. Wire your IDE to replos

For Intellij you can register replos as external tool. You can download and import ./ide-integration/intellij/exportedSettings.zip into intellij with File > Import Settings. This settings-package contains replos commands as external tool and key-bindings to them.

Commands

replos <Command> <CommandArgs>

CommandDescription
callCalls first named function1 at location
declareDeclares word at location as variable
findFinds and evaluates $NodeType$ at location
loadLoads file, line or word at location
replPipes input unprocessed to the repl
testGenerates test for function at location

[1] Non-anonymous functions or anonymous functions which are immediately assigned to a variable are considered named functions.

call

replos call $FilePath$ $LineNumber$ $ColumnNumber$

declare

replos declare $FilePath$ $LineNumber$ $ColumnNumber$

find

replos find $NODE$ $FilePath$ $LineNumber$ $ColumnNumber$

Node is a string that matches against node types of the abstract syntax tree (https://babeljs.io/docs/en/babel-types)

e.g.

replos find VariableDeclaration ...
replos find Function ...
replos find Expression ...

load

replos load ...

The behavior depends on the amount of arguments provided

replos load $FilePath$ loads whole file

replos load $FilePath$ $LineNumber$ load line

replos load $FilePath$ $LineNumber$ $ColumnNumber loads word at location

replos load $FilePath$ $SelectionStartLine$ $SelectionStartColumn$ $SelectionEndLine$ $SelectionEndColumn$ loads everything between

repl

sends code directly to to the node repl

e.g.:

replos repl 1 + 1

replos repl .clear

test

Generates a test about the function at the location. Can be configured to use jest or mocha and commonjs or modules.

test $FilePath$ $LineNumber$ $ColumnNumber$

Other usages

Netcat to the repl server.

License

MIT

Copyright (c) 2020-present, Tim Kutscha

Keywords

FAQs

Package last updated on 21 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

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