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

rehype-document

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rehype-document - npm Package Compare versions

Comparing version 1.2.0 to 2.0.0

4

index.js

@@ -9,3 +9,3 @@ 'use strict';

function attacher(origin, options) {
function attacher(options) {
var settings = options || {};

@@ -26,3 +26,3 @@ var css = settings.css || [];

function transformer(tree, file) {
var title = settings.title || file.filename;
var title = settings.title || file.stem;
var body = tree.children.concat();

@@ -29,0 +29,0 @@ var head = [line(), h('meta', {charset: 'utf-8'})];

{
"name": "rehype-document",
"version": "1.2.0",
"version": "2.0.0",
"description": "Wrap a document around the syntax tree",

@@ -29,10 +29,9 @@ "license": "MIT",

"devDependencies": {
"browserify": "^13.0.1",
"browserify": "^14.1.0",
"esmangle": "^1.0.1",
"nyc": "^10.0.0",
"rehype": "^3.0.0",
"remark-cli": "^2.1.0",
"remark-preset-wooorm": "^1.0.0",
"rehype": "^4.0.0",
"remark-cli": "^3.0.0",
"remark-preset-wooorm": "^2.0.0",
"tape": "^4.0.0",
"unist-util-inspect": "^4.0.0",
"xo": "^0.17.1"

@@ -63,4 +62,4 @@ },

"remarkConfig": {
"presets": "wooorm"
"plugins": ["preset-wooorm"]
}
}

@@ -17,2 +17,3 @@ # rehype-document [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]

var unified = require('unified');
var createStream = require('unified-stream');
var parse = require('remark-parse');

@@ -23,10 +24,12 @@ var mutate = require('remark-rehype');

var processor = unified()
.use(parse)
.use(mutate)
.use(document, {title: 'Hi!'})
.use(stringify);
process.stdin
.pipe(unified())
.use(parse)
.use(mutate)
.use(document, {title: 'Hi!'})
.use(stringify)
.on('error', console.log)
.pipe(process.stdout);
.pipe(createStream(processor))
.pipe(process.stdout)
.on('error', console.error);
```

@@ -33,0 +36,0 @@

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