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

rapidoc-core

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rapidoc-core - npm Package Compare versions

Comparing version 0.0.1-alfa.7 to 0.0.1-alfa.8

2

package.json
{
"name": "rapidoc-core",
"version": "0.0.1-alfa.7",
"version": "0.0.1-alfa.8",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/rapidoc-core.js",

@@ -1,18 +0,16 @@

import _ from 'lodash';
import { html, renderToString } from '@popeindustries/lit-html-server';
// import html from '@popeindustries/lit-html-server';
import numRef from './ref.json';
import {
html,
renderToString,
renderToStream,
renderToBuffer,
} from '@popeindustries/lit-html-server';
export function numToWord(num) {
return _.reduce(numRef, (accum, ref) => (ref.num === num ? ref.word : accum), '');
export function helloWorld(name) {
return `Hello ${name}`;
}
export function wordToNum(word) {
return _.reduce(numRef, (accum, ref) => (ref.word === word && word.toLowerCase() ? ref.num : accum), -1);
}
function cardTemplate(data) {
/* Dont work across node packages */
function cardHtml(data, type) {
return html`
<h1> ${data.title}</h1>
<h1> ${data.title} - ${type} </h1>
<h3> ${data.text}</h3>

@@ -22,5 +20,13 @@ `;

export async function cardHtml(data) {
const resultHtml = await renderToString(cardTemplate(data));
return resultHtml;
export async function cardString(data = { title: 'My Title', text: 'My Text' }) {
const result = await renderToString(cardHtml(data, 'String'));
return result;
}
export async function cardStream(data = { title: 'My Title', text: 'My Text' }) {
return renderToStream(cardHtml(data, 'Stream'));
}
export async function cardBuffer(data = { title: 'My Title', text: 'My Text' }) {
return renderToBuffer(cardHtml(data, 'Buffer'));
}

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

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