import { ICollection } from 'debe' ; export function hasPlugin ( collection , name ) { return collection . plugins . indexOf ( name ) !== - 1 ; } export function addPlugin ( collection , name ) { if ( hasPlugin ( collection , name ) ) { return ; } return collection . plugins . push ( name ) ; }