MCPcopy Create free account
hub / github.com/codecombat/codecombat / vueNonReactiveInstall

Function vueNonReactiveInstall

app/core/utils.js:1305–1316  ·  view source on GitHub ↗
(Vue)

Source from the content-addressed store, hash-verified

1303// to prevent Vue traversing our large and expensive game objects.
1304// Reference Library: https://github.com/rpkilby/vue-nonreactive
1305const vueNonReactiveInstall = function (Vue) {
1306 const Observer = (new Vue())
1307 .$data
1308 .__ob__
1309 .constructor
1310
1311 return Vue.nonreactive = function (value) {
1312 // Vue sees the noop Observer and stops traversing the structure.
1313 value.__ob__ = new Observer({})
1314 return value
1315 }
1316}
1317
1318const yearsSinceMonth = function (birth, now) {
1319 if (!birth) { return undefined }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected