locutusjs / locutus

Bringing stdlibs of other programming languages to JavaScript for educational purposes

Home Page:https://locutus.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: Cannot read property '$locutus' of undefined

etjson opened this issue · comments

How is it used in Vue?

Vue.prototype.$locutus = require('locutus');

....$locutus.php.array.ksort(...);

TypeError: Cannot read property '$locutus' of undefined
var $global = typeof window !== 'undefined' ? window : global;
  $global.$locutus = $global.$locutus || {};
  var $locutus = $global.$locutus;
  $locutus.php = $locutus.php || {};
  $locutus.php.locales = $locutus.php.locales || {};

does this part of the source code need to be compatible with Vue?