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

@noreajs/core

Package Overview
Dependencies
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@noreajs/core - npm Package Compare versions

Comparing version 1.1.9 to 2.0.0-0

2

dist/request/validation/validator.d.ts

@@ -5,3 +5,3 @@ /// <reference types="qs" />

type DataOriginType = "query" | "body" | "params";
type FieldType = "string" | "object" | "array" | "bool" | "date" | "timestamp" | "double" | "int" | "long" | "decimal";
type FieldType = "string" | "object" | "array" | "bool" | "date" | "timestamp" | "number" | "double" | "int" | "long" | "decimal";
interface RuleType {

@@ -8,0 +8,0 @@ message?: string | ((value: any, field: string, origin: DataOriginType, options: FieldValidationOptions, data: any) => string | Promise<string>);

@@ -216,6 +216,7 @@ "use strict";

/**
* Decimal types
* Integer
*/
case "decimal":
case "double":
case "int":
case "long":
case "timestamp":
switch (origin) {

@@ -235,3 +236,3 @@ case "body":

case "params":
if (isNaN(parseFloat(`${value}`))) {
if (isNaN(parseInt(`${value}`))) {
addError({

@@ -249,7 +250,6 @@ origin,

/**
* Integer
* Decimal types
*/
case "int":
case "long":
case "timestamp":
case "decimal":
case "double":
switch (origin) {

@@ -269,3 +269,3 @@ case "body":

case "params":
if (isNaN(parseInt(`${value}`))) {
if (isNaN(parseFloat(`${value}`))) {
addError({

@@ -283,2 +283,16 @@ origin,

/**
* Global number
*/
case "number":
if (value !== `${Number(value)}`) {
addError({
origin,
field: field,
type: fieldType,
value,
message: [typeErrorMessage],
});
}
break;
/**
* Object

@@ -285,0 +299,0 @@ */

{
"name": "@noreajs/core",
"version": "1.1.9",
"version": "2.0.0-0",
"description": "Norea.Js is a sets of tools for the development of API with Node.Js.",

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

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