Comments (6)
_.extend() simply loops over the publicly accessible members of an object/struct and copies them to the new object/struct.
Coldfusion's component extends="..." syntax allows you to define actual inheritance, which is what it sounds like you're looking for?
from underscorecf.
bump
from underscorecf.
not necessarily looking for extends, looking to take the function definitions of one cfc and use them as mixin functions on another cfc.
extends only allows one cfc, but if we want to make two diff cfc's mixin to the existing cfc.
from underscorecf.
similar to how you can include("mixin_functions.cfm") within a component and pull in a cfm of functions but without the need for the cfm file :)
maybe a new module for handling mixins...? :D
component name="core" {
...
public any function includes(mixins...) {
for (mixin in mixins) {
var mixinFuncs = getComponentMetaData(mixin);
for (func in mixinFuncs) {
this[func.name] = func;
}
}
}
...
}
component name="someBasicClass" extends="foundry.core" {
includes("./someMixinFuncs");
}
from underscorecf.
Hmm, can you provide an example of how you're trying to use _.extend() ?
from underscorecf.
i just reviewed this again, and i'm not sure that this sort of functionality makes sense for this project, given that it is intended to be a port of Underscore.js and there isn't anything in Underscore.js that does mixins for classes (yet)
from underscorecf.
Related Issues (20)
- Make toQuery(arrayOfStructs) handle variable-size structs
- Docs CSS and formatting HOT 8
- XML support for toQuery() HOT 1
- Add toXml(collection, [*elementNames])
- Add examples for object()
- Compatibility: Railo for-in loops on structs are wrong
- xml support for _.size()
- _.type(variable)
- _.toArray(string) should return an array of characters
- Port 1.4.4 changes HOT 1
- Port changes to _.uniq and _.times
- Add _.REReplace(string, regex, callback, [scope], [context])
- implement _.transform(collection, callback, accumulator, context) : any (from lo-dash)
- toArray() uses for-in loop on a list variable which is not supported HOT 4
- Get Travis-CI working HOT 4
- variables._ is undefined HOT 5
- Test in Coldfusion 11 HOT 15
- is this still an active project? HOT 1
- Publish to ForgeBox.io? HOT 3
- Calling slice with a "to" 1 value greater than the length of the array causes an error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from underscorecf.