Just a minor point here that perhaps it would be clearer to use: `if (namespaces.length === 0) {`.