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

constipated

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

constipated - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

22

index.js

@@ -0,10 +1,8 @@

var fs = require('fs');
var glob = require('glob');
var fs = require('fs');
module.exports = {relieveGlob, relieveFile, relieveString};
module.exports = {relieveFile, relieveGlob, relieveString};
function relieveGlob (pattern) {
var files = glob.sync(pattern);
files.forEach(relieveFile);
function readFile(file) {
return fs.readFileSync(file, 'utf8');
}

@@ -18,2 +16,8 @@

function relieveGlob (pattern) {
var files = glob.sync(pattern);
files.forEach(relieveFile);
}
function relieveString (str) {

@@ -23,8 +27,4 @@ return str.replace(/const(\s*[^\s]+\s*=\s*)/gmi, 'var$1');

function readFile(file) {
return fs.readFileSync(file, 'utf8');
}
function writeFile(file, contents) {
return fs.writeFileSync(file, contents, 'utf8');
}
}
{
"name": "constipated",
"version": "1.0.1",
"version": "1.0.2",
"description": "Turns your consts in to vars, relieve those variables.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -18,8 +18,2 @@ # constipated

### relieveString(str) : string
``` javascript
var {relieveString} = require('constipated');
var relievedString = relieveString('const constipated = true');
```
### relieveFile(file) : void

@@ -37,2 +31,8 @@ ``` javascript

### relieveString(str) : string
``` javascript
var {relieveString} = require('constipated');
var relievedString = relieveString('const constipated = true');
```
## License

@@ -39,0 +39,0 @@ The MIT License

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