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

@trailervote/express-render

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trailervote/express-render - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

dist/package.json
{
"name": "@trailervote/express-render",
"version": "1.0.1",
"version": "1.0.2",
"description": "Common render patterns for the TrailerVote ecosystem",

@@ -5,0 +5,0 @@ "main": "dist/src/index.js",

import { Response } from 'express';
import { MediaLinks } from '../headers/link.js';
declare type MediaLike = {
export declare type MediaLike = {
_links?: MediaLinks;
};
export declare type WrappedMediaLike = {
[P: string]: MediaLike;
};
/**

@@ -13,4 +16,3 @@ * Render a MediaLike

*/
export declare function renderMedia(res: Response, content: MediaLike): void;
export declare function renderMedia(res: Response, content: MediaLike | WrappedMediaLike): void;
export declare const media: typeof renderMedia;
export {};
{
"name": "@trailervote/express-render",
"version": "1.0.1",
"version": "1.0.2",
"description": "Common render patterns for the TrailerVote ecosystem",

@@ -5,0 +5,0 @@ "main": "dist/src/index.js",

@@ -1,34 +0,15 @@

# TrailerVote Express Authorization
# TrailerVote Express Render
[![Build Status](https://travis-ci.com/TrailerVote/express-authorization.svg?branch=master)](https://travis-ci.com/TrailerVote/express-authorization)
[![Build Status](https://travis-ci.com/TrailerVote/express-render.svg?branch=master)](https://travis-ci.com/TrailerVote/express-render)
[![NPM Package Version](https://badge.fury.io/js/@trailervote%2Fexpress-authorization.svg)](https://npmjs.org/package/@trailervote/express-authorization)
[![NPM Package Version](https://badge.fury.io/js/@trailervote%2Fexpress-render.svg)](https://npmjs.org/package/@trailervote/express-render)
Authorization middleware for TrailerVote ecosystem
Common render patterns for the TrailerVote ecosystem.
```bash
yarn add @trailervote/express-authorization
yarn add @trailervote/express-render
```
```typescript
import { basic } from '@xpbytes/express-routes-archive'
const root = new RoutesArchive()
root.register('foo', '/test')
root.register('bar', (mountedAt: string, arg: any) => `${mountedAt}/test?bar=${arg}`)
// For example you can create these when you mount a new "Router" and pass it along
// the routes are shared among archives in the chain.
const up = new RoutesArchive('/level', root)
up.register('level', '/two')
up.register('penthouse', (mountedAt: string) => `${mountedAt}/over-9000`)
root.path('bar', 'my-arg')
// => /test?bar=my-arg
root.url('penthouse', req)
// => https://test.xpbytes.com/level/over-9000
import { renderMedia, renderError, addWarning, setLinks } from '@trailervote/express-render'
```
You can use `SSL_ENABLED` to make generated urls `https`.
You can use `SERVER_URL` to mount the path onto that URL instead of the request hostname.

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