yarndoesnpm install
yarn add foodoesnpm install foo --save- and for global installs:
yarn global add foois the same asnpm install foo --global
(this was cribbed from here, switched around a little, and will probably become out-dated quite quickly; yarn docs can be found here)