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

validate-glob-opts

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

validate-glob-opts - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

70

index-es5.js

@@ -14,3 +14,2 @@ /*!

'true, false, \'FILE\', \'DIR\' or an array';
var INVALID_STAT_CACHE_MESSAGE = 'Expected every value in the `statCache` option to be a ' +

@@ -53,2 +52,5 @@ 'fs.Stats instance';

realPath: 'realpath',
realPathCache: 'realpathCache',
realpathCaches: 'realpathCache',
realPathCaches: 'realpathCache',
caches: 'cache',

@@ -111,5 +113,3 @@ statcache: 'statCache',

if (!isPlainObj(obj.cache)) {
results.push(new TypeError(
("node-glob expected `cache` option to be an object, but got " + (inspect(obj.cache)) + ".")
));
results.push(new TypeError(("node-glob expected `cache` option to be an object, but got " + (inspect(obj.cache)) + ".")));
} else {

@@ -123,9 +123,25 @@ for (var i$2 = 0, list$2 = Object.keys(obj.cache); i$2 < list$2.length; i$2 += 1) {

if (typeof val$2 !== 'boolean' && !Array.isArray(val$2)) {
results.push(new TypeError(
(INVALID_CACHE_MESSAGE + ", but got an invalid value " + (inspect(val$2)) + " in `" + field + "` property.")
));
results.push(new TypeError((INVALID_CACHE_MESSAGE + ", but found an invalid value " + (inspect(val$2)) + " in `" + field + "` property.")));
}
} else if (val$2 !== 'FILE' && val$2 !== 'DIR') {
results.push(new Error(
(INVALID_CACHE_MESSAGE + ", but got an invalid string " + (inspect(val$2)) + " in `" + field + "` property.")
results.push(new Error((INVALID_CACHE_MESSAGE + ", but found an invalid string " + (inspect(val$2)) + " in `" + field + "` property.")));
}
}
}
}
if (obj.realpathCache !== undefined) {
if (!isPlainObj(obj.realpathCache)) {
results.push(new TypeError(
("node-glob expected `realpathCache` option to be an object, but got " + (inspect(obj.realpathCache)) + ".")
));
} else {
for (var i$3 = 0, list$3 = Object.keys(obj.realpathCache); i$3 < list$3.length; i$3 += 1) {
var field$1 = list$3[i$3];
var val$3 = obj.realpathCache[field$1];
if (typeof val$3 !== 'string') {
results.push(new TypeError(
("Expected every value in the `realpathCache` option to be a string, but found a non-string value " + (inspect(val$3)) + " in `" + field$1 + "` property.")
));

@@ -143,14 +159,14 @@ }

} else {
for (var i$3 = 0, list$3 = Object.keys(obj.statCache); i$3 < list$3.length; i$3 += 1) {
var field$1 = list$3[i$3];
for (var i$4 = 0, list$4 = Object.keys(obj.statCache); i$4 < list$4.length; i$4 += 1) {
var field$2 = list$4[i$4];
var val$3 = obj.statCache[field$1];
var val$4 = obj.statCache[field$2];
if (val$3 === null || typeof val$3 !== 'object' || Array.isArray(val$3)) {
if (val$4 === null || typeof val$4 !== 'object' || Array.isArray(val$4)) {
results.push(new TypeError(
(INVALID_STAT_CACHE_MESSAGE + ", but got an invalid value " + (inspect(val$3)) + " in `" + field$1 + "` property.")
(INVALID_STAT_CACHE_MESSAGE + ", but found an invalid value " + (inspect(val$4)) + " in `" + field$2 + "` property.")
));
} else if (typeof val$3.mode !== 'number') {
} else if (typeof val$4.mode !== 'number') {
results.push(new Error(
(INVALID_STAT_CACHE_MESSAGE + ", but got an invalid object " + (inspect(val$3)) + " in `" + field$1 + "` property, which doesn't have a valid file mode.")
(INVALID_STAT_CACHE_MESSAGE + ", but found an invalid object " + (inspect(val$4)) + " in `" + field$2 + "` property, which doesn't have a valid file mode.")
));

@@ -168,10 +184,10 @@ }

} else {
for (var i$4 = 0, list$4 = Object.keys(obj.symlinks); i$4 < list$4.length; i$4 += 1) {
var field$2 = list$4[i$4];
for (var i$5 = 0, list$5 = Object.keys(obj.symlinks); i$5 < list$5.length; i$5 += 1) {
var field$3 = list$5[i$5];
var val$4 = obj.symlinks[field$2];
var val$5 = obj.symlinks[field$3];
if (typeof val$4 !== 'boolean') {
if (typeof val$5 !== 'boolean') {
results.push(new TypeError(
("Expected every value in the `symlink` option to be Boolean, but got an invalid value " + (inspect(val$4)) + " in `" + field$2 + "` property.")
("Expected every value in the `symlink` option to be Boolean, but found an invalid value " + (inspect(val$5)) + " in `" + field$3 + "` property.")
));

@@ -191,9 +207,9 @@ }

} else {
for (var i$5 = 0, list$5 = obj.ignore; i$5 < list$5.length; i$5 += 1) {
var val$5 = list$5[i$5];
for (var i$6 = 0, list$6 = obj.ignore; i$6 < list$6.length; i$6 += 1) {
var val$6 = list$6[i$6];
if (typeof val$5 !== 'string') {
if (typeof val$6 !== 'string') {
results.push(new TypeError(
'Expected every value in the `ignore` option to be a string, ' +
"but the array includes a non-string value " + (inspect(val$5)) + "."
"but the array includes a non-string value " + (inspect(val$6)) + "."
));

@@ -205,4 +221,4 @@ }

for (var i$6 = 0, list$6 = Object.keys(obj); i$6 < list$6.length; i$6 += 1) {
var key = list$6[i$6];
for (var i$7 = 0, list$7 = Object.keys(obj); i$7 < list$7.length; i$7 += 1) {
var key = list$7[i$7];

@@ -209,0 +225,0 @@ var correctName = typos[key];

{
"name": "validate-glob-opts",
"version": "0.2.0",
"version": "0.2.1",
"description": "Validate glob options",

@@ -32,3 +32,3 @@ "repository": "shinnn/validate-glob-opts",

"buble": "^0.15.2",
"eslint": "^3.14.0",
"eslint": "^3.14.1",
"graceful-fs": "^4.1.11",

@@ -35,0 +35,0 @@ "istanbul": "^0.4.5",

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