mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
2.6.5, bug fixes
This commit is contained in:
16
lib/list.js
16
lib/list.js
@@ -180,12 +180,22 @@ exports.List.prototype.filter = function( key, value, onlyOne, caseInsen ) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var retList = new List( this.discriminator );
|
var retList = new exports.List( this.discriminator );
|
||||||
retList.contents = results;
|
retList.contents = results;
|
||||||
|
|
||||||
return retList;
|
return retList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exports.List.prototype.getValues = function( key ){
|
||||||
|
|
||||||
|
var valList = [];
|
||||||
|
for( child of this.contents){
|
||||||
|
valList.push( child[key] );
|
||||||
|
}
|
||||||
|
return valList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
exports.List.prototype.deepFilter = function( keys, value, onlyOne ) {
|
exports.List.prototype.deepFilter = function( keys, value, onlyOne ) {
|
||||||
|
|
||||||
var results = [];
|
var results = [];
|
||||||
@@ -218,8 +228,8 @@ exports.List.prototype.deepFilter = function( keys, value, onlyOne ) {
|
|||||||
if ( onlyOne ) {
|
if ( onlyOne ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var retList = new List( this.discriminator );
|
var retList = new exports.List( this.discriminator );
|
||||||
retList.contents = results;
|
retList.contents = results;
|
||||||
|
|
||||||
return retList;
|
return retList;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "discord.js",
|
"name": "discord.js",
|
||||||
"version": "2.6.4",
|
"version": "2.6.5",
|
||||||
"description": "A way to interface with the Discord API",
|
"description": "A way to interface with the Discord API",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user