MCPcopy Create free account
hub / github.com/SAP/ui5-builder / findResources

Method findResources

lib/lbt/resources/ResourcePool.js:229–234  ·  view source on GitHub ↗

* Finds the resources based matching the given pattern * * @param {ResourceFilterList|RegExp} pattern * @returns {Promise}

(pattern)

Source from the content-addressed store, hash-verified

227 * @returns {Promise}
228 */
229 async findResources(pattern) {
230 if ( pattern instanceof ResourceFilterList ) {
231 return this._resources.filter( (resource) => pattern.matches(resource.name) );
232 }
233 return this._resources.filter( (resource) => pattern.test(resource.name) );
234 }
235
236 get size() {
237 return this._resources.length;

Callers 1

ResourcePool.jsFile · 0.80

Calls 1

matchesMethod · 0.80

Tested by

no test coverage detected