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

fastrx

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastrx - npm Package Compare versions

Comparing version 1.0.1 to 1.0.3

2

combination.js

@@ -121,3 +121,3 @@ const {

complete(err) {
(--this.context.nLife) === 0 && super.complete(err)
if (err || (--this.context.nLife) === 0) super.complete(err)
}

@@ -124,0 +124,0 @@ }

@@ -100,11 +100,41 @@ const {

//该代理可以实现将pipe模式转成链式编程
const rxProxy = {
get: (target, prop) => target[prop] || ((...args) => new Proxy(exports[prop](...args)(target), rxProxy))
if(Proxy){
//该代理可以实现将pipe模式转成链式编程
const rxProxy = {
get: (target, prop) => target[prop] || ((...args) => new Proxy(exports[prop](...args)(target), rxProxy))
}
exports.rx = new Proxy(f => new Proxy(f, rxProxy), {
get: (target, prop) => (...args) => new Proxy(exports[prop](...args), rxProxy),
set: (target, prop, value) => exports[prop] = value
})
}
exports.rx = new Proxy(f => new Proxy(f, rxProxy), {
get: (target, prop) => (...args) => new Proxy(exports[prop](...args), rxProxy),
set: (target, prop, value) => exports[prop] = value
})
else{
const keys = Object.keys(exports).filter(key=>{
switch(key){
case 'Sink':
case 'pipe':
case 'reusePipe':
return false
default: return true
}
})
function setProps(t){
keys.forEach(key=>{
Object.defineProperty(t,key,{
get(){
return (...args) =>setProps(exports[key](...args)(t))
}
})
})
return t
}
const rx = f => setProps(f)
keys.forEach(key=>{
Object.defineProperty(rx,key,{
get(){
return (...args) =>setProps(exports[key](...args))
}
})
})
exports.rx = rx
}
{
"name": "fastrx",
"version": "1.0.1",
"version": "1.0.3",
"description": "fast rxjs implemention",

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

@@ -100,3 +100,3 @@ const {

exports.bindNodeCallback = (call, thisArg, ...args) => sink => {
const inArgs = args.concat((err, ...rargs) => (err && sink.complete(err)) || (sink.next(rargs.length > 1 ? rargs : rargs[0]), sink.complete()));
const inArgs = args.concat((err, ...rargs) => err ? sink.complete(err) : (sink.next(rargs.length > 1 ? rargs : rargs[0]), sink.complete()));
call.apply ? call.apply(thisArg, inArgs) : call(...inArgs)

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