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

shescape

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shescape - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

index.d.ts

5

CHANGELOG.md

@@ -12,2 +12,7 @@ # Changelog

## [1.2.1] - 2021-04-24
- Provide TypeScript type definitions.
- Update documentation to use ECMAScript module in examples.
## [1.2.0] - 2021-04-14

@@ -14,0 +19,0 @@

6

index.js

@@ -6,8 +6,8 @@ /**

* @example
* const cp = require("child_process");
* const shescape = require("shescape");
* import cp from "child_process";
* import * as shescape from "shescape";
* cp.spawn("command", shescape.escapeAll(userInput), options);
*
* @module shescape
* @version 1.2.0
* @version 1.2.1
* @license MPL-2.0

@@ -14,0 +14,0 @@ * @author Eric Cornelissen <ericornelissen@gmail.com>

{
"name": "shescape",
"version": "1.2.0",
"version": "1.2.1",
"description": "simple shell escape library",

@@ -13,4 +13,5 @@ "homepage": "https://ericcornelissen.github.io/shescape/",

},
"typings": "index.d.ts",
"scripts": {
"clean": "rm -rf .corpus coverage crash-* index.cjs",
"clean": "rm -rf .corpus/ .nyc_output/ .stryker-tmp/ reports/ crash-* index.cjs",
"format": "prettier --write ./**/*.{cjs,js,md,yml}",

@@ -24,3 +25,4 @@ "prefuzz": "npm run transpile",

"test": "mocha test/**/*.test.js",
"test:coverage": "c8 --reporter=lcov --reporter=text npm run test",
"test:coverage": "c8 --reports-dir=reports/coverage --reporter=lcov --reporter=text npm run test",
"test:mutation": "stryker run",
"transpile": "ncc build index.js && mv dist/index.js index.cjs && rm -rf dist"

@@ -46,2 +48,3 @@ },

"devDependencies": {
"@stryker-mutator/core": "^4.6.0",
"@vercel/ncc": "^0.28.3",

@@ -48,0 +51,0 @@ "c8": "^7.7.1",

@@ -22,4 +22,4 @@ # Shescape

```js
const cp = require("child_process");
const shescape = require("shescape");
import cp from "child_process";
import * as shescape from "shescape";

@@ -26,0 +26,0 @@ cp.spawn("command", shescape.escapeAll(userInput), options);

@@ -37,11 +37,7 @@ /**

export function escapeShellArgByPlatform(arg, platform) {
let argAsString = arg;
if (typeof arg !== "string") {
if (!isStringable(arg)) {
throw new TypeError(typeError);
}
argAsString = arg.toString();
if (!isStringable(arg)) {
throw new TypeError(typeError);
}
const argAsString = arg.toString();
switch (platform) {

@@ -48,0 +44,0 @@ case win32:

Sorry, the diff of this file is not supported yet

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