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

reshow-build

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reshow-build - npm Package Compare versions

Comparing version 0.16.0 to 0.16.1

5

build/cjs/src/__tests__/buildTest.js

@@ -30,2 +30,7 @@ "use strict";

describe("Test build", function () {
it("test build string", function () {
var vdom = (0, _index["default"])("foo")();
var actual = (0, _reshowUnit.shallow)(vdom).html();
(0, _chai.expect)(actual).to.equal("<span>foo</span>");
});
it("test function with error", function () {

@@ -32,0 +37,0 @@ var run = function run() {

10

build/cjs/src/index.js
"use strict";
var _interopRequireWildcard = require("reshow-runtime/helpers/interopRequireWildcard");
var _interopRequireDefault = require("reshow-runtime/helpers/interopRequireDefault");

@@ -12,3 +14,3 @@

var _react = require("react");
var _react = _interopRequireWildcard(require("react"));

@@ -56,2 +58,4 @@ var _reshowConstant = require("reshow-constant");

var build = function build(component, componentOption) {
var _span;
return function (props, child) {

@@ -71,2 +75,6 @@ if (!component) {

}
} else {
if (_reshowConstant.STRING === (0, _typeof2["default"])(component)) {
component = _span || (_span = /*#__PURE__*/_react["default"].createElement("span", null, component));
}
}

@@ -73,0 +81,0 @@

@@ -15,2 +15,7 @@ import _objectWithoutProperties from "reshow-runtime/es/helpers/objectWithoutProperties";

describe("Test build", function () {
it("test build string", function () {
var vdom = build("foo")();
var actual = shallow(vdom).html();
expect(actual).to.equal("<span>foo</span>");
});
it("test function with error", function () {

@@ -17,0 +22,0 @@ var run = function run() {

10

build/es/src/index.js
import _typeof from "reshow-runtime/es/helpers/typeof";
import { isValidElement, cloneElement, createElement, Children } from "react";
import { FUNCTION, T_NULL, T_TRUE, TYPE_ERROR } from "reshow-constant";
import React, { isValidElement, cloneElement, createElement, Children } from "react";
import { STRING, FUNCTION, T_NULL, T_TRUE, TYPE_ERROR } from "reshow-constant";
import { removeEmpty } from "array.merge";

@@ -43,2 +43,4 @@

var build = function build(component, componentOption) {
var _span;
return function (props, child) {

@@ -58,2 +60,6 @@ if (!component) {

}
} else {
if (STRING === _typeof(component)) {
component = _span || (_span = /*#__PURE__*/React.createElement("span", null, component));
}
}

@@ -60,0 +66,0 @@

{
"name": "reshow-build",
"version": "0.16.0",
"version": "0.16.1",
"description": "A simple util help u build or create component from react instance or function",

@@ -35,4 +35,3 @@ "main": "./build/cjs/src/index.js",

"README.md"
],
"gitHead": "be1806f6f2d188920e2c36ff2c150e584ef7d7fc"
]
}
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