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

@bettercorp/tools

Package Overview
Dependencies
Maintainers
2
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bettercorp/tools - npm Package Compare versions

Comparing version 2.1.21 to 2.1.22-rc

1

lib/Tools.d.ts

@@ -26,2 +26,3 @@ import * as MOMENT from "moment";

static cleanString(objectToClean: any, maxLimit: number, strength: CleanStringStrength, returnNullAndUndefined: false): string;
walkFilePath(dir: string, returnFullPath?: boolean): Promise<Array<string>>;
static autoCapitalizeWords(data: string): string;

@@ -28,0 +29,0 @@ static enumKeys<O extends object, K extends keyof O = keyof O>(obj: O): K[];

@@ -8,2 +8,4 @@ "use strict";

const CryptoENC = require("crypto-js/enc-utf8");
const fs_1 = require("fs");
const path = require("path");
const clone = require("just-clone");

@@ -51,2 +53,33 @@ var CleanStringStrength;

}
walkFilePath(dir, returnFullPath = false) {
const self = this;
return new Promise((resolve, reject) => {
let results = [];
(0, fs_1.readdir)(dir, (err, list) => {
if (err)
return reject(err);
var pending = list.length;
if (!pending)
return resolve(results);
list.forEach((file) => {
if (returnFullPath)
file = path.resolve(dir, file);
(0, fs_1.stat)(path.resolve(dir, file), (err, stat) => {
if (stat && stat.isDirectory()) {
self.walkFilePath(file).then((res) => {
results = results.concat(res);
if (!--pending)
resolve(results);
});
}
else {
results.push(file);
if (!--pending)
resolve(results);
}
});
});
});
});
}
static autoCapitalizeWords(data) {

@@ -53,0 +86,0 @@ const words = data.split(" ");

2

package.json

@@ -20,3 +20,3 @@ {

"main": "lib/index.js",
"version": "2.1.21",
"version": "2.1.22-rc",
"devDependencies": {

@@ -23,0 +23,0 @@ "@types/crypto-js": "^4.1.1",

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