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

n_shell

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

n_shell - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

26

index.js
#!/usr/bin/env node
'use strict';
// ShellJS plugins
require('shelljs-plugin-inspect');
var repl = require('repl');

@@ -59,13 +62,14 @@ var argv = require('minimist')(process.argv.slice(2));

// Polyfill .inspect() method
if (!ret.inspect) ret.inspect = function() {
if (key === 'echo' || key === 'exec') return '';
if (key === 'pwd' || key === 'which')
return this.stdout.match(/\n$/) ? this.stdout : this.stdout + '\n';
if (this.hasOwnProperty('stdout'))
return this.stdout;
else if (Array.isArray(this))
return this.join('\n');
else
return this;
};
function emptyInspect() {
return '';
}
var oldInspect = ret.inspect.bind(ret);
if (key === 'echo' || key === 'exec') {
ret.inspect = emptyInspect;
} else if (key === 'pwd' || key === 'which') {
ret.inspect = function () {
var oldResult = oldInspect();
return oldResult.match(/\n$/) ? oldResult : oldResult + '\n';
};
}
}

@@ -72,0 +76,0 @@ return ret;

{
"name": "n_shell",
"version": "0.5.0",
"version": "0.5.1",
"description": "A node REPL with ShellJS loaded by default",

@@ -33,3 +33,4 @@ "main": "index.js",

"require-relative": "^0.8.7",
"shelljs": "*"
"shelljs": "*",
"shelljs-plugin-inspect": "^0.1.0"
},

@@ -36,0 +37,0 @@ "devDependencies": {

# n\_shell
[![npm](https://img.shields.io/npm/v/n_shell.svg?style=flat-square)](https://www.npmjs.com/package/n_shell)
A node REPL with ShellJS loaded by default.

@@ -4,0 +6,0 @@

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