If you want to make a list with bullets or a numbered list, the result is this:
- Item1
- Item2
- Item3
- [object Object]
- function forEach() {
[native code]
}- function () {
return this.filter($defined);
}- function (keys) {
var obj = {}, length = Math.min(this.length, keys.length);
for (var i = 0; i < length; i++) {
obj[keys[i]] = this[i];
}
return obj;
}- function (object) {
var result = {};
for (var i = 0, l = this.length; i < l; i++) {
for (var key in object) {
if (object[key](this[i])) {
result[key] = this[i];
delete object[key];
break;
}
}
}
return result;
}- function (item, from) {
return this.indexOf(item, from) != -1;
}- function (array) {
for (var i = 0, j = array.length; i < j; i++) {
this.push(array[i]);
}
return this;
}- function () {
return this.length ? this[this.length - 1] : null;
}- function () {
return this.length ? this[$random(0, this.length - 1)] : null;
}- function (item) {
if (!this.contains(item)) {
this.push(item);
}
return this;
}- function (array) {
for (var i = 0, l = array.length; i < l; i++) {
this.include(array[i]);
}
return this;
}- function (item) {
for (var i = this.length; i--; i) {
if (this[i] === item) {
this.splice(i, 1);
}
}
return this;
}- function () {
this.length = 0;
return this;
}- function () {
var array = [];
for (var i = 0, l = this.length; i < l; i++) {
var type = $type(this[i]);
if (!type) {
continue;
}
array = array.concat(type == "array" || type == "collection" || type == "arguments" ? Array.flatten(this[i]) : this[i]);
}
return array;
}- function (array) {
if (this.length != 3) {
return null;
}
var rgb = this.map(function (value) {if (value.length == 1) {value += value;}return value.toInt(16);});
return array ? rgb : "rgb(" + rgb + ")";
}- function (array) {
if (this.length < 3) {
return null;
}
if (this.length == 4 && this[3] == 0 && !array) {
return "transparent";
}
var hex = [];
for (var i = 0; i < 3; i++) {
var bit = (this[i] - 0).toString(16);
hex.push(bit.length == 1 ? "0" + bit : bit);
}
return array ? hex : "#" + hex.join("");
}- function () {
return JSON.encode(this);
}












LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks