can.List.prototype.sort -- where is it?
I can't find it.
by prometh
HTML
<script src="http://canjs.us/release/latest/can.jquery.js"></script>
<script src="http://canjs.us/release/latest/can.construct.proxy.js"></script>
<script src="http://canjs.us/release/latest/can.control.plugin.js"></script>
<script src="http://canjs.us/release/latest/can.view.modifiers.js"></script>
<script src="http://canjs.us/release/latest/can.construct.super.js"></script>
<script src="http://canjs.us/release/latest/can.object.js"></script>
<script src="http://canjs.us/release/latest/can.ejs.js"></script>
<script src="http://canjs.us/release/latest/can.map.attributes.js"></script>
<script src="http://canjs.us/release/latest/can.map.backup.js"></script>
<script src="http://canjs.us/release/latest/can.map.delegate.js"></script>
<script src="http://canjs.us/release/latest/can.map.setter.js"></script>
<script src="http://canjs.us/release/latest/can.map.validations.js"></script>
<script src="http://canjs.com/release/latest/can.fixture.js"></script>
<script src="http://canjs.com/release/latest/can.stache.js"></script>
JavaScript
can.Component.extend({
tag: "some-thing",
template: "{{{sort}}}",
scope: {
list: [2,1],
sort: can.compute( function() {
var sort = this.attr("list").sort !== undefined;
var slice = this.attr("list").slice !== undefined;
return "has sort: "+sort+"<br/>has slice: "+slice;
})
}
});
$(document.body).append( can.mustache("<some-thing/>")() );
$(document.body).append( can.stache("<hr/><some-thing/>")() );