From 419ac718e8185ade33ed555e9a14da86e6701f71 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Thu, 20 Aug 2015 16:43:06 +0100 Subject: [PATCH] 2.6.5, bug fixes --- lib/list.js | 16 +++++++++++++--- package.json | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/list.js b/lib/list.js index 55561679c..9d648cb9b 100644 --- a/lib/list.js +++ b/lib/list.js @@ -180,12 +180,22 @@ exports.List.prototype.filter = function( key, value, onlyOne, caseInsen ) { return false; } - var retList = new List( this.discriminator ); + var retList = new exports.List( this.discriminator ); retList.contents = results; 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 ) { var results = []; @@ -218,8 +228,8 @@ exports.List.prototype.deepFilter = function( keys, value, onlyOne ) { if ( onlyOne ) { return false; } - - var retList = new List( this.discriminator ); + + var retList = new exports.List( this.discriminator ); retList.contents = results; return retList; diff --git a/package.json b/package.json index 4d5e3f521..cc7ce9cf4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "discord.js", - "version": "2.6.4", + "version": "2.6.5", "description": "A way to interface with the Discord API", "main": "index.js", "scripts": {