Comparing version 1.0.0 to 2.0.0
@@ -72,3 +72,3 @@ // Generated by CoffeeScript 2.3.2 | ||
//------------------------------------------------------------------------------------------------------- | ||
export_methods() { | ||
export() { | ||
/* Return an object with methods, bound to the current instance. */ | ||
@@ -216,3 +216,3 @@ var R, k, ref, ref1, v; | ||
info('µ002-8', intertype_2.isa.new_on_it1(1, 2, 3)); | ||
({isa, declare} = intertype_1.export_methods()); | ||
({isa, declare} = intertype_1.export()); | ||
info('µ002-9', isa('new_on_it1', 1, 2, 3)); | ||
@@ -224,3 +224,3 @@ return info('µ002-10', isa.new_on_it1(1, 2, 3)); | ||
example_using_multimix = function() { | ||
var Intertype, Multimix, declare, intertype_1, intertype_2, isa, object_with_class_properties, object_with_instance_properties; | ||
var Intertype, Multimix, declare, intertype_1, intertype_2, isa, object_with_class_properties, object_with_instance_properties, target; | ||
Multimix = require('../..'); | ||
@@ -326,5 +326,8 @@ //========================================================================================================= | ||
info('µ002-8', intertype_2.isa.new_on_it1(1, 2, 3)); | ||
({isa, declare} = intertype_1.export_methods()); | ||
target = {}; | ||
({isa, declare} = intertype_1.export(target)); | ||
info('µ002-9', isa('new_on_it1', 1, 2, 3)); | ||
return info('µ002-10', isa.new_on_it1(1, 2, 3)); | ||
info('µ002-10', isa.new_on_it1(1, 2, 3)); | ||
info('µ002-11', target.isa('new_on_it1', 1, 2, 3)); | ||
return info('µ002-12', target.isa.new_on_it1(1, 2, 3)); | ||
}; | ||
@@ -331,0 +334,0 @@ |
@@ -71,6 +71,6 @@ // Generated by CoffeeScript 2.3.2 | ||
//--------------------------------------------------------------------------------------------------------- | ||
export_methods() { | ||
export(target = null) { | ||
/* Return an object with methods, bound to the current instance. */ | ||
var R, k, ref, ref1, v; | ||
R = {}; | ||
R = target != null ? target : {}; | ||
ref = this; | ||
@@ -77,0 +77,0 @@ for (k in ref) { |
{ | ||
"name": "multimix", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "flexible object copying", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
@@ -34,5 +34,5 @@ | ||
purpose and included the code as a demo how to implement such a thing. | ||
* `export_methods: ->`—when called on an instance, returns an object with bound instance methods; this | ||
allows to 'export' instance methods into a namespace without fearing 'JavaScript method tear-off | ||
symptome': | ||
* `export: ( target = null ) ->`—when called on an instance, returns an object with bound instance | ||
methods; this allows to 'export' instance methods into a namespace without fearing 'JavaScript method | ||
tear-off symptome': | ||
@@ -47,2 +47,4 @@ ```coffee | ||
When argument `target` is given, methods will be attached on that object (overwriting existing ones). | ||
Code: | ||
@@ -49,0 +51,0 @@ |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1585957
415
132
0