Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-model-x

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-model-x - npm Package Compare versions

Comparing version 0.5.2 to 0.5.3

19

esm/plugin.js
import { AppContainer } from './AppContainer';
export function vueModelXPlugin(Vue, opts) {
if (opts === void 0) {
opts = {};
}
export function vueModelXPlugin(Vue, _temp) {
var _ref = _temp === void 0 ? {} : _temp,
appContainer = _ref.appContainer,
state = _ref.state,
_ref$injectProperty = _ref.injectProperty,
injectProperty = _ref$injectProperty === void 0 ? '$app' : _ref$injectProperty;
var _opts = opts,
appContainer = _opts.appContainer;
var appContainerProp = opts.injectProperty || '$app';
if (!appContainer) {
appContainer = new AppContainer(opts.state);
appContainer = new AppContainer(state);
}

@@ -18,5 +16,6 @@

var stores = this.$options.stores;
this[appContainerProp] = appContainer;
if (stores) {
this[injectProperty] = appContainer;
var _arr = Object.keys(stores);

@@ -23,0 +22,0 @@

@@ -8,13 +8,11 @@ "use strict";

function vueModelXPlugin(Vue, opts) {
if (opts === void 0) {
opts = {};
}
function vueModelXPlugin(Vue, _temp) {
var _ref = _temp === void 0 ? {} : _temp,
appContainer = _ref.appContainer,
state = _ref.state,
_ref$injectProperty = _ref.injectProperty,
injectProperty = _ref$injectProperty === void 0 ? '$app' : _ref$injectProperty;
var _opts = opts,
appContainer = _opts.appContainer;
var appContainerProp = opts.injectProperty || '$app';
if (!appContainer) {
appContainer = new _AppContainer.AppContainer(opts.state);
appContainer = new _AppContainer.AppContainer(state);
}

@@ -25,5 +23,6 @@

var stores = this.$options.stores;
this[appContainerProp] = appContainer;
if (stores) {
this[injectProperty] = appContainer;
var _arr = Object.keys(stores);

@@ -30,0 +29,0 @@

{
"name": "vue-model-x",
"version": "0.5.2",
"version": "0.5.3",
"description": "MobX-like state management library for Vue.js",

@@ -34,5 +34,5 @@ "main": "./lib/index.js",

"@babel/preset-env": "7.0.0-beta.44",
"@vue/test-utils": "1.0.0-beta.13",
"@vue/test-utils": "1.0.0-beta.15",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "8.2.2",
"babel-eslint": "8.2.3",
"babel-jest": "22.4.3",

@@ -39,0 +39,0 @@ "eslint": "4.19.1",

import {AppContainer} from './AppContainer';
export function vueModelXPlugin(Vue, opts = {}) {
let {appContainer} = opts;
const appContainerProp = opts.injectProperty || '$app';
export function vueModelXPlugin(Vue,
{
appContainer,
state,
injectProperty = '$app'
} = {}
) {
if (!appContainer) {
appContainer = new AppContainer(opts.state);
appContainer = new AppContainer(state);
}

@@ -16,5 +19,5 @@

this[appContainerProp] = appContainer;
if (stores) {
this[injectProperty] = appContainer;
if (stores) {
for (const propName of Object.keys(stores)) {

@@ -21,0 +24,0 @@ this[propName] = appContainer.getStore(stores[propName]);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc