A library and set of code conventions to allow directives to become extendable with hooks