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

@factor/filters

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@factor/filters - npm Package Compare versions

Comparing version 1.0.0-alpha.20 to 1.0.0-alpha.24

28

index.js

@@ -36,5 +36,4 @@ module.exports.default = Factor => {

// https://github.com/WebReflection/flatted#flatted
const { stringify } = require('flatted/cjs')
const { stringify } = require("flatted/cjs")
str = stringify(obj)
}

@@ -46,3 +45,8 @@

return str.split("").reduce((prevHash, currVal) => ((prevHash << 5) - prevHash + currVal.charCodeAt(0)) | 0, 0)
return str
.split("")
.reduce(
(prevHash, currVal) => ((prevHash << 5) - prevHash + currVal.charCodeAt(0)) | 0,
0
)
}

@@ -112,3 +116,2 @@

this._filters[name][id] = { callback, context, priority }

@@ -119,2 +122,17 @@

push(id, item, options = {}) {
this.add(
id,
(_, args) => {
item = typeof item == "function" ? item(args) : item
if (Array.isArray(_)) {
return [..._, item]
} else if (typeof _ == "object") {
return { ..._, [this.uniqueHash(item)]: item }
}
},
options
)
}
// Add callbacks into an array of promises, meant to be used with $filters.run

@@ -136,5 +154,3 @@ callback(id, callback, options = {}) {

}
})()
}
{
"name": "@factor/filters",
"version": "1.0.0-alpha.20",
"version": "1.0.0-alpha.24",
"license": "GPL-2.0",

@@ -9,3 +9,3 @@ "publishConfig": {

"factor": {},
"gitHead": "e11cbda7b934f3aedf067d0e1b642491bc5f753d",
"gitHead": "f68d8c51c38873d0a6b6c830d1461bf19bd926a9",
"dependencies": {

@@ -12,0 +12,0 @@ "flatted": "^2.0.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