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

aigis

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aigis - npm Package Compare versions

Comparing version 0.0.17 to 0.0.19

49

index.js

@@ -5,3 +5,3 @@ //-----------------------------------------------------

// Site: 666.io
// Version: 0.00.017
// Version: 0.00.019
//

@@ -107,3 +107,3 @@ //-----------------------------------------------------

var result = {};
var result = data;

@@ -142,7 +142,12 @@ for(var field in schema) {

if(nameFunc[0] === "?") {
if(typeof(fieldData) === "undefined")
continue;
switch(typeof(nameFunc)) {
case "string":
if(nameFunc[0] === "?") {
if(typeof(fieldData) === "undefined")
continue;
nameFunc = nameFunc.substring(1);
nameFunc = nameFunc.substring(1);
}
break;
}

@@ -203,7 +208,12 @@

if(nameFunc[0] === "?") {
if(typeof(fieldData) === "undefined")
continue;
switch(typeof(nameFunc)) {
case "string":
if(nameFunc[0] === "?") {
if(typeof(fieldData) === "undefined")
continue;
nameFunc = nameFunc.substring(1);
nameFunc = nameFunc.substring(1);
}
break;
}

@@ -266,7 +276,12 @@

if(nameFunc[0] === "?") {
if(typeof(fieldData) === "undefined")
continue;
switch(typeof(nameFunc)) {
case "string":
if(nameFunc[0] === "?") {
if(typeof(fieldData) === "undefined")
continue;
nameFunc = nameFunc.substring(1);
nameFunc = nameFunc.substring(1);
}
break;
}

@@ -467,5 +482,5 @@

else if(options.ltrim)
input = input.replace(/^\s/g, "");
input = input.replace(/^[\s\uFEFF\xA0]+/g, "");
else if(options.rtrim)
input = input.replace(/\s$/g, "");
input = input.replace(/[\s\uFEFF\xA0]+$/g, "");

@@ -482,3 +497,3 @@ //------------]>

else if(options.rtrim)
input = input.replace(/\s+$/g, "");
input = input.replace(/[\s\uFEFF\xA0]+$/g, "");

@@ -485,0 +500,0 @@ //------------]>

{
"name": "aigis",
"version": "0.0.17",
"version": "0.0.19",
"description": "Simple and Powerful module for strict data control",

@@ -40,4 +40,4 @@

"_id": "aigis@0.0.17",
"_id": "aigis@0.0.19",
"_from": "aigis@"
}

@@ -7,4 +7,4 @@ `npm install aigis -g`

$typenize({name: "string"}, {name: 969, "delThisField": "data"});
$sanitize({name: {type: "string", max: 2}}, {name: "Omnomnomnus"});
$typenize({name: "string"}, {name: 969, "skipThisField": "data"});
$sanitize({name: {type: "string", max: 2}}, {name: "Omnomnomnus", "delThisField": "data"});
$validate("integer", "2");

@@ -40,3 +40,3 @@ ```

| Options | Desc | Val |
| Options | Desc | Val |
|-------------|-------------|-------------|

@@ -64,4 +64,4 @@ | | - ||

| Type | Desc | Params/Options |
|-------------|-------------|-------------|
| Type | Desc | Params/Options |
|-------------|-------------|----------------|
| | - ||

@@ -82,5 +82,5 @@ | | ALL (If `schema` is HashTable) | on |

| Type | Desc | Params/Options |
|-------------|-------------|-------------|
| | - ||
| Type | Desc | Params/Options |
|-------------|-------------|----------------|
| | - ||
| | ALL (If `schema` is HashTable) | on |

@@ -137,3 +137,3 @@ | custom | - | - |

| email | - | - |
| url | Mailto, http, https, ftp, ssh, ws, gopher, news, telnet, ldap | - |
| url | mailto, http, https, ftp, ssh, ws, gopher, news, telnet, ldap | - |
| mongoId | - | - |

@@ -300,2 +300,5 @@ | | - ||

//data = {"name": "DT", "pts": "32", "pswd": "", "pswdCheck": /\w+/g}; //_ #2
console.log("1#", $validate(schema, data));
console.log("2#", $validate(schema, data, {"errors": true}));
```

@@ -302,0 +305,0 @@

@@ -60,4 +60,5 @@ //-----------------------------------------------------

"T0": $typenize(schema, data), //_ { name: ' XX + ', pts: -60, ...}
"T1": $sanitize(schema, data), //_ { name: 'XX', pts: 30, ... }
"T2": $validate(schema, data) //_ false
"T1": $sanitize(schema, data) //_ { name: 'XX', pts: 30, ... }
//"T2": $validate(schema, data) //_ error ("data" without "rule")
}, null, "\t"));

@@ -175,5 +176,6 @@

console.log("0#", $sanitize(schema, data));
console.log("1#", $validate(schema, data));
console.log("2#", $validate(schema, $sanitize(schema, data)));
console.log("0#", $typenize(schema, data));
console.log("1#", $sanitize(schema, data));
console.log("2#", $validate(schema, data));
console.log("3#", $validate(schema, $sanitize(schema, data)));

@@ -180,0 +182,0 @@

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