Dependency Inversion principle

up:: SOLID Low-level modules care about storage and so on. High-level modules care about output and data.

High-level modules should not depend on low-level data. If the data processing function gets the data from a low-level function, but you decide to change the way the data is stored (eg. from Array to Object), it breaks the high-level function.

Instead, depend on abstractions (which aren’t really implemented in JavaScript).