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

disposable-component

Package Overview
Dependencies
Maintainers
4
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

disposable-component - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

156

lib/rx4.js

@@ -1,137 +0,27 @@

(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("rx"));
else if(typeof define === 'function' && define.amd)
define(["rx"], factory);
else if(typeof exports === 'object')
exports["disposable-component"] = factory(require("rx"));
else
root["disposable-component"] = factory(root["rx"]);
})(window, function(__WEBPACK_EXTERNAL_MODULE_rx__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = "./src/rx4.js");
/******/ })
/************************************************************************/
/******/ ({
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(["exports", "rx"], factory);
} else if (typeof exports !== "undefined") {
factory(exports, require("rx"));
} else {
var mod = {
exports: {}
};
factory(mod.exports, global.rx);
global.disposableComponent = mod.exports;
}
})(this, function (_exports, _rx) {
"use strict";
/***/ "./src/rx4.js":
/*!********************!*\
!*** ./src/rx4.js ***!
\********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.default = mountComponent;
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
function mountComponent(mount, unmount) {
return _rx.Observable.create(observer => {
mount(observer.onNext.bind(observer), observer.onCompleted.bind(observer), observer.onError.bind(observer));
}).finally(unmount);
}
});
exports.default = mountComponent;
var _rx = __webpack_require__(/*! rx */ "rx");
function mountComponent(mount, unmount) {
return _rx.Observable.create(function (observer) {
mount(observer.onNext.bind(observer), observer.onCompleted.bind(observer), observer.onError.bind(observer));
}).finally(unmount);
}
/***/ }),
/***/ "rx":
/*!*********************!*\
!*** external "rx" ***!
\*********************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_rx__;
/***/ })
/******/ });
});
//# sourceMappingURL=rx4.js.map

37

package.json
{
"name": "disposable-component",
"version": "0.3.1",
"version": "0.3.2",
"description": "A simple reactive API for mounting and unmounting components to the DOM",

@@ -9,19 +9,22 @@ "main": "lib/rx4.js",

"license": "MIT",
"browserslist": [
"extends browserslist-config-canopy"
],
"scripts": {
"prepublish": "npm run dev",
"build": "webpack --mode production",
"build": "rimraf lib && babel src --out-dir lib --source-maps --ignore 'src/**/*.spec.js','src/**/*.test.js'",
"prepublish": "in-publish && yarn build || not-in-publish",
"test": "jest --coverage --config ./jest.json",
"test-watch": "jest --watch --config ./jest.json",
"dev": "webpack --mode development"
"test-watch": "jest --watch --config ./jest.json"
},
"devDependencies": {
"@babel/cli": "^7.0.0-beta.46",
"@babel/core": "^7.0.0-beta.46",
"@babel/preset-env": "^7.0.0-beta.46",
"babel-core": "^7.0.0-0",
"babel-jest": "^22.4.3",
"babel-loader": "^7.1.4",
"babel-cli": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"jest": "^21.2.1",
"@babel/cli": "^7.2.3",
"@babel/core": "^7.2.2",
"@babel/plugin-transform-modules-umd": "^7.2.0",
"@babel/preset-env": "^7.2.3",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^23.6.0",
"browserslist-config-canopy": "^2.0.0",
"in-publish": "^2.0.0",
"jest": "^23.6.0",
"rimraf": "^2.6.2",
"rx": "^4.1.0",

@@ -33,7 +36,3 @@ "rxjs": "^6.3.3"

"src"
],
"dependencies": {
"webpack": "^4.20.2",
"webpack-cli": "^3.1.2"
}
]
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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