{"ast":null,"code":"import { map } from './map';\nexport function pluck() {\n  for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n    properties[_key] = arguments[_key];\n  }\n\n  var length = properties.length;\n\n  if (length === 0) {\n    throw new Error('list of properties cannot be empty.');\n  }\n\n  return function (source) {\n    return map(plucker(properties, length))(source);\n  };\n}\n\nfunction plucker(props, length) {\n  var mapper = function mapper(x) {\n    var currentProp = x;\n\n    for (var i = 0; i < length; i++) {\n      var p = currentProp != null ? currentProp[props[i]] : undefined;\n\n      if (p !== void 0) {\n        currentProp = p;\n      } else {\n        return undefined;\n      }\n    }\n\n    return currentProp;\n  };\n\n  return mapper;\n} //# sourceMappingURL=pluck.js.map","map":null,"metadata":{},"sourceType":"module"}