MCPcopy Create free account
hub / github.com/bigcommerce/stencil-cli / getVariationCount

Method getVariationCount

lib/theme-config.js:174–180  ·  view source on GitHub ↗

* Get the number of variations * @returns {number}

()

Source from the content-addressed store, hash-verified

172 * @returns {number}
173 */
174 async getVariationCount() {
175 const { variations } = await this.getConfig();
176 if (!Array.isArray(variations)) {
177 return 0;
178 }
179 return variations.length;
180 }
181
182 /**
183 * Check if the variation exists

Callers 1

variationExistsMethod · 0.95

Calls 1

getConfigMethod · 0.95

Tested by

no test coverage detected