New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

method

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

method - npm Package Compare versions

Comparing version
1.0.1
to
1.0.2
+9
-8
core.js

@@ -136,2 +136,10 @@ "use strict";

// Create method shortcuts form functions.
var defineMethod = function defineMethod(Type, lambda) {
return define(this, Type, lambda)
}
var implementMethod = function implementMethod(object, lambda) {
return implement(this, object, lambda)
}
// Define `implement` and `define` polymorphic methods to allow definitions

@@ -206,10 +214,2 @@ // and implementations through them.

// Create method shortcuts form functions.
var defineMethod = function defineMethod(Type, lambda) {
return _define(this, Type, lambda)
}
var implementMethod = function implementMethod(object, lambda) {
return _implement(this, object, lambda)
}
// And provided implementations for a polymorphic equivalents.

@@ -223,2 +223,3 @@ _define(define, _define)

Method.Method = Method
Method.method = Method
Method.builtin = builtin

@@ -225,0 +226,0 @@ Method.host = host

# Changes
## 1.0.2 / 2012-12-26
- Delegate to polymorphic methods from `.define` and `.implement` so, they
can be overidden.
## 1.0.1 / 2012-11-11

@@ -4,0 +9,0 @@

{
"name": "method",
"id": "method",
"version": "1.0.1",
"version": "1.0.2",
"description": "Functional polymorphic method dispatch",

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

"test": "~0.x.0",
"repl-utils": "~1.0.0",
"repl-utils": "~2.0.1",
"phantomify": "~0.1.0"

@@ -29,0 +29,0 @@ },

@@ -238,2 +238,36 @@ "use strict";

exports["test override define polymorphic method"] = function(assert) {
var define = Method.define
var implement = Method.implement
var fn = Method("fn")
var methods = {}
implement(define, fn, function(method, label, implementation) {
methods[label] = implementation
})
function foo() {}
define(fn, "foo-case", foo)
assert.equal(methods["foo-case"], foo, "define set property")
}
exports["test override define via method API"] = function(assert) {
var define = Method.define
var implement = Method.implement
var fn = Method("fn")
var methods = {}
define.implement(fn, function(method, label, implementation) {
methods[label] = implementation
})
function foo() {}
define(fn, "foo-case", foo)
assert.equal(methods["foo-case"], foo, "define set property")
}
require("test").run(exports)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet