npm install --save lodash npm install --save-dev @types/lodash
Then just import in your component the library and use it :
import * as _ from 'lodash'; var tmpHero: Hero = _.find(heroes, (hero) => hero.id == id);
References
https://medium.com/@coco.boudard/install-lodash-with-angular-4-only-to-get-rid-of-it-eebe5869e784