"use strict";Object.defineProperty(exports,"__esModule",{value:true});varmap_1=require("./map");functionpluck(){varproperties=[];for(var_i=0;_i<arguments.length;_i++){properties[_i]=arguments[_i];}varlength=properties.length;if(length===0){thrownewError('list of properties cannot be empty.');}returnfunction(source){returnmap_1.map(plucker(properties,length))(source);};}exports.pluck=pluck;functionplucker(props,length){varmapper=function(x){varcurrentProp=x;for(vari=0;i<length;i++){varp=currentProp[props[i]];if(typeofp!=='undefined'){currentProp=p;}else{returnundefined;}}returncurrentProp;};returnmapper;}//# sourceMappingURL=pluck.js.map