New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

singlequote

Package Overview
Dependencies
Maintainers
9
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

singlequote

Transform all doubel quote strings in a piece of JavaScript code to single quoted strings

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
9
Created
Source

singlequote

Transform all double quote strings in a piece of JavaScript code to single quoted strings

npm install singlequote

usage

var singlequote = require("singlequote");

function x(){
	return "hello\" I am a string's for sure";
}

var singleQuoteStringsCode = singlequote(x.toString())

//singleQuoteStringsCode will contain the string:
function x(){
	return 'hello" I am a string\'s for sure';
}

singlequote will throw an exception if the JavaScript code can not be parsed.

singlequote will throw an error if there is a bug in singlequote, that would produce invalid JavaScript code.

running singlequote on an entire directory of .js files

Use the command line tool jsq

License

MIT

Keywords

FAQs

Package last updated on 28 Aug 2016

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