Socket
Socket
Sign inDemoInstall

method-missing

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

method-missing - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

4

lib/method-missing.js

@@ -34,3 +34,5 @@ /*!

method = method || '__call';
return proxy(this, method);
const pro = proxy(this, method);
pro.isProxy = true;
return pro;
}

@@ -37,0 +39,0 @@

{
"name": "method-missing",
"version": "1.0.0",
"version": "1.1.0",
"engines" : {

@@ -5,0 +5,0 @@ "node" : ">=6.0.0"

@@ -105,2 +105,13 @@ # Method Missing Class

Using `extends-classes` you can extend from other classes too:
```js
const classes = require('extends-classes');
const MethodMissing = require('method-missing');
class Test extends classes (A, B, C, MethodMissing) {
}
```
Check out [extends-classes npm package](https://www.npmjs.com/package/extends-classes) to extend multiple classes!
Check out the [test folder](test) for more!

@@ -107,0 +118,0 @@

@@ -97,2 +97,32 @@ /*!

object.one();
object.two();
object.two();
const classes = require('../../extends-classes');
class A {
constructor() {
console.log("A has been initialised");
}
one() {
console.log('One called');
}
};
class B {};
class C {};
class T extends classes (A, B, C, MethodMissing) {
constructor() {
super();
}
__call(name, args) {
console.log(`Couldn't find ${name}`);
}
}
var t = new T();
t.one();
t.goneburgers();
// One called
// Couldn't find goneburgers
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