MCPcopy Create free account
hub / github.com/microsoft/SandDance / _getOrCreate

Method _getOrCreate

docs/app/js/sanddance-app.js:54863–54871  ·  view source on GitHub ↗
(stat)

Source from the content-addressed store, hash-verified

54861 stats.forEach((stat)=>this._getOrCreate(stat));
54862 }
54863 _getOrCreate(stat) {
54864 if (!stat || !stat.name) return null;
54865 const { name , type } = stat;
54866 if (!this.stats[name]) {
54867 if (stat instanceof (0, _statDefault.default)) this.stats[name] = stat;
54868 else this.stats[name] = new (0, _statDefault.default)(name, type);
54869 }
54870 return this.stats[name];
54871 }
54872}
54873exports.default = Stats;
54874

Callers 2

getMethod · 0.95
_initializeStatsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected