snabbdom-jsx-lite
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -13,3 +13,3 @@ import { VNode, VNodeData } from 'snabbdom/vnode'; | ||
/** Equivalent of <> (React.Fragment) that that wraps children without a containing dom element */ | ||
export declare function Frag(_props: {}, children?: Array<string | VNode>): VNode; | ||
export declare function Fragment(_props: {}, children?: Array<string | VNode>): VNode; | ||
/** | ||
@@ -16,0 +16,0 @@ * jsx/tsx + hyperscript compatible vnode factory function |
@@ -5,6 +5,6 @@ "use strict"; | ||
/** Equivalent of <> (React.Fragment) that that wraps children without a containing dom element */ | ||
function Frag(_props, children) { | ||
function Fragment(_props, children) { | ||
return vnode_1.vnode(undefined, undefined, children, undefined, undefined); | ||
} | ||
exports.Frag = Frag; | ||
exports.Fragment = Fragment; | ||
function flattenAndFilterFalsey(children, flattened) { | ||
@@ -11,0 +11,0 @@ for (const child of children) { |
{ | ||
"name": "snabbdom-jsx-lite", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Write snabbdom templates in .jsx or .tsx (JSX for TypeScript)", | ||
@@ -13,4 +13,5 @@ "files": [ | ||
"build": "npm run clean && npm run build:dist && npm run build:example", | ||
"build:dist": "tsc -p tsconfig.json && cp src/jsx-intrinsics.d.ts dist/", | ||
"build:dist": "(cd src; tsc -p tsconfig.json) && cp src/jsx-intrinsics.d.ts dist/", | ||
"build:example": "NODE_ENV=production webpack --config example/webpack.config.js", | ||
"tests": "mocha -r ts-node/register/transpile-only tests/*", | ||
"prepublishOnly": "npm run build" | ||
@@ -35,4 +36,7 @@ }, | ||
"devDependencies": { | ||
"@types/chai": "4.2.11", | ||
"@types/mocha": "7.0.2", | ||
"@typescript-eslint/eslint-plugin": "2.31.0", | ||
"@typescript-eslint/parser": "2.31.0", | ||
"chai": "4.2.0", | ||
"copy-webpack-plugin": "5.1.1", | ||
@@ -43,2 +47,3 @@ "eslint": "6.8.0", | ||
"lint-config-nojvek": "1.0.3", | ||
"mocha": "7.1.2", | ||
"prettier": "2.0.5", | ||
@@ -48,2 +53,3 @@ "prettier-eslint": "9.0.1", | ||
"ts-loader": "7.0.3", | ||
"ts-node": "8.10.1", | ||
"typescript": "3.8.3", | ||
@@ -54,3 +60,2 @@ "webpack": "4.41.5", | ||
}, | ||
"dependencies": {}, | ||
"peerDependencies": { | ||
@@ -57,0 +62,0 @@ "snabbdom": ">=0.6.1" |
# snabbdom-jsx-lite | ||
[![Build](https://github.com/nojvek/snabbdom-jsx-lite/workflows/build/badge.svg?branch=master)](https://github.com/nojvek/snabbdom-jsx-lite/actions?query=workflow%3Abuild) | ||
[![NPM version](https://img.shields.io/npm/v/snabbdom-jsx-lite.svg)](https://www.npmjs.com/package/snabbdom-jsx-lite) | ||
Write snabbdom templates in .tsx with Typescript or via Babel in .jsx files. | ||
@@ -4,0 +7,0 @@ |
@@ -15,3 +15,3 @@ import {vnode, VNode, VNodeData} from 'snabbdom/vnode'; | ||
/** Equivalent of <> (React.Fragment) that that wraps children without a containing dom element */ | ||
export function Frag(_props: {}, children?: Array<string | VNode>): VNode { | ||
export function Fragment(_props: {}, children?: Array<string | VNode>): VNode { | ||
return vnode(undefined, undefined, children, undefined, undefined); | ||
@@ -18,0 +18,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17107
10
214
108
20