Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/modules / ___dist / devtools / remotedevtools / getDecorator.js
Size: Mime:
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = getDecorator;

var _mobx = require("xmobx/mobx");

var _exotic = require("../../exotic");

function getDecorator(func) {
  return (storeOrConfig, config) => {
    if ((0, _exotic.isObj)(storeOrConfig) === true && (0, _mobx.isObservable)(storeOrConfig) === false) {
      return store => func(store, storeOrConfig);
    }

    return func(storeOrConfig, config);
  };
}