Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
rinore
Advanced tools
Readme
Rich Node.js REPL
Rinore was extracted from CORMO. CORMO console provided an interactive shell like Rails console or django shell.
Rinore has following features additional to the original Node.js REPL.
$ rinore
rinore> path.extname('index.html')
'.html'
For CoffeeScript:
$ rinore -l coffeescript
rinore> path.extname 'index.html'
'.html'
For TypeScript:
$ rinore -l typescript
rinore> path.extname('index.html')
'.html'
Use '-r' or '--require' to load modules:
$ rinore -r lodash
Loading module 'lodash'...
rinore> lodash([1, 2, 3]).map(v => v * 2).reverse().value()
[ 6, 4, 2 ]
You can specify an another name using :
:
$ rinore -r lodash:l
Loading module 'lodash' as 'l'...
rinore> l([1, 2, 3]).map(v => v * 2).reverse().value()
[ 6, 4, 2 ]
If you give a name *
, all exported objects are spread to the global:
$ cat util.js
exports.add = (a, b) => a + b
exports.sub = (a, b) => a - b
$ rinore -r util:*
Loading module 'util' as '*'...
rinore> add(1, 2)
3
rinore> sub(10, 3)
7
Or you can use rinore.context
to expose your objects:
$ cat util.js
const rinore = require('rinore');
rinore.context.add = (a, b) => a + b
$ rinore -r util
Loading module 'util'...
rinore> add(1, 2)
3
If an expression returns Promise, Rinore waits until it resolves:
rinore> new Promise(resolve => resolve('done'))
'done'
You can assign the result of Promise to a variable:
rinore> result = new Promise(resolve => resolve('done'))
'done'
rinore> result.length
4
If you are using TypeScript, you should use await keyword:
$ rinore -l typescript
rinore> const result = await new Promise<string>(resolve => resolve('done'))
undefined
rinore> result.length
4
Rinore can be started in the middle of a running program.
$ cat util.js
const rinore = require('.');
rinore.context.add = (a, b) => a + b
rinore.start();
$ node util.js
rinore> add(1, 2)
3
Rinore shows function arguments when Tab is pressed.
rinore> util.inspect<Tab>
util.inspect(obj, opts)
rinore> console.log(url.parse(<Tab>
url.parse(url, parseQueryString, slashesDenoteHost)
You can specify CLI arguments in the package.json
{
"rinore": {
"language": "coffeescript",
"require": [
"bluebird:Promise",
"lodash"
]
}
}
You can run a Rinore server via --listen argument.
$ rinore --listen 5678
Rinore is listening on 5678
rinore>
Or you can programmatically.
const net = require('net');
const rinore = require('.');
net.createServer((socket) => {
console.log('Starting new session...');
rinore.start({input: socket, output: socket, terminal: true})
.on('exit', () => {
console.log('Session closed.');
socket.end();
});
}).listen(2000, (error) => {
if (error) {
console.log(error);
} else {
console.log('Rinore is listening on 2000');
}
});
You can connect to this server via telnet
or rinore-remote
.
$ telnet localhost 2000
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
rinore> 1+1
1+1
2
rinore> ^]
telnet> quit
Connection closed.
$ rinore-remote 2000
rinore> 1+1
2
To find best REPL experience, Rinore has referred some projects:
MIT licenses. See LICENSE for more details.
FAQs
Rich Node.js REPL
The npm package rinore receives a total of 298 weekly downloads. As such, rinore popularity was classified as not popular.
We found that rinore demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 15 open source maintainers 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.