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

input-filter

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

input-filter - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

README.md

9

package.json
{
"name": "input-filter",
"version": "0.0.4",
"description": "InputFilter implementation",
"version": "0.0.5",
"description": "InputFilter js implementation",
"main": "main.js",

@@ -14,3 +14,5 @@ "scripts": {

"browserify": {
"transform": ["babelify"]
"transform": [
"babelify"
]
},

@@ -26,2 +28,3 @@ "keywords": [

"devDependencies": {
"babel": "^5.1.11",
"babelify": "^6.0.2",

@@ -28,0 +31,0 @@ "gulp": "^3.8.11",

class Chain {
constuctor() {
constructor() {
this.chain = []

@@ -6,0 +6,0 @@ this.messages = {}

@@ -12,3 +12,3 @@

add(input) {
this.inputes[input.name] = input
this.inputs[input.name] = input

@@ -35,19 +35,22 @@ return this

}
this.promise = new Promise((resolve, reject) => {
let promises = []
for (let name in this.inputs) {
if (this.inputs.hasOwnProperty(name)) {
let value = this.data[name]
let input = this.inputs[name]
let promise = input.setValue(value).isValid(this.data)
promise.then(
() => {},
(messages) => {
this.messages[name] = messages
let promises = []
for (let name in this.inputs) {
if (this.inputs.hasOwnProperty(name)) {
let value = this.data[name]
let input = this.inputs[name]
let promise = input.setValue(value).isValid(this.data)
promise.then(
() => {},
(messages) => {
if (!this.messages[name]) {
this.messages[name] = []
}
)
promises.push(promise)
}
this.messages[name].push(messages)
}
)
promises.push(promise)
}
Promise.all(promises)
}
this.promise = Promise.all(promises).catch(() => {
throw this.messages
})

@@ -59,3 +62,3 @@

},
(messages) => {
() => {
this.valid = false

@@ -62,0 +65,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