New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cycle-classic-dom

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cycle-classic-dom - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

2

lib/example/index.js

@@ -31,3 +31,3 @@ "use strict";

data$: data$,
vnode: readme_1.makeElement(function (el) {
vnode: readme_1.makeVNode(function (el) {
term.open(el);

@@ -34,0 +34,0 @@ term.refresh(0, term.rows - 1);

@@ -0,3 +1,14 @@

/**
* cycle-classic-dom
* -------------------
*
* A tiny helper library for working with classic JS libraries.
*
* That is to say, any JS library that works by taking a reference
* to an element and manipulating the DOM directly.
*
* `npm install cycle-classic-dom`
*/
import { VNode } from "@cycle/dom";
export declare type Constructor = (el: HTMLElement) => void;
export declare function makeElement(ctor: Constructor): VNode;
export declare function makeVNode(ctor: Constructor): VNode;
"use strict";
/**
* cycle-classic-dom
* -------------------
*
* A tiny helper library for working with classic JS libraries.
*
* That is to say, any JS library that works by taking a reference
* to an element and manipulating the DOM directly.
*
* `npm install cycle-classic-dom`
*/
Object.defineProperty(exports, "__esModule", { value: true });
var dom_1 = require("@cycle/dom");
function makeElement(ctor) {
function makeVNode(ctor) {
return dom_1.div({

@@ -10,2 +21,29 @@ key: Math.random().toString(),

}
exports.makeElement = makeElement;
exports.makeVNode = makeVNode;
/**
* Example, sets up a simple xterm.js powered terminal:
*
* import { makeVNode } from 'cycle-classic-dom';
* import { makeDOMDriver } from '@cycle/dom';
* import { Terminal } from 'xterm'
* import xs from 'xstream';
*
* function main() {
* const terminal = new Terminal();
*
* terminal.write("Hello from \x1B[1;3;31mxterm.js\x1B[0m $ ");
*
* const terminalVNode = makeVNode(element => {
* terminal.open(element);
* terminal.refresh(0, terminal.rows - 1);
* });
*
* return {
* DOM: xs.of(terminalVNode)
* }
* }
*
* run(main, {DOM: makeDOMDriver(document.body)});
*
* For a larger example including capturing output, see the example directory
*/
{
"name": "cycle-classic-dom",
"version": "1.0.0",
"version": "2.0.0",
"description": "",

@@ -10,3 +10,4 @@ "main": "lib/readme.js",

"lib": "tsc",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"prepublish": "npm run lib"
},

@@ -13,0 +14,0 @@ "keywords": [],

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