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

unified

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unified - npm Package Compare versions

Comparing version 8.0.1 to 8.1.0

2

package.json
{
"name": "unified",
"version": "8.0.1",
"version": "8.1.0",
"description": "Interface for processing text using syntax trees",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -18,6 +18,12 @@ // TypeScript Version: 3.0

* @param plugin unified plugin
* @param options Configuration for plugin]
* @param options Configuration for plugin
* @param extraOptions Additional configuration for plugin
* @returns The processor on which use is invoked
*/
use(plugin: Plugin, options?: unknown): Processor
use<T = Settings, S = undefined>(
plugin: Plugin<T, S>,
options?: T,
extraOptions?: S
): Processor
/**

@@ -27,7 +33,16 @@ * @param preset `Object` with an optional plugins (set to list), and/or an optional settings object

use(preset: Preset): Processor
/**
* @param pluginTuple pairs, plugin and options in an array
*/
use(pluginTuple: PluginTuple): Processor
use<T = Settings>(pluginTuple: PluginTuple<T>): Processor
/**
* @param pluginTriple plugin, options, and extraOptions in an array
*/
use<T = Settings, S = undefined>(
pluginTriple: PluginTriple<T, S>
): Processor
/**
* @param list List of plugins, presets, and pairs

@@ -150,3 +165,3 @@ */

type Plugin = Attacher
type Plugin<T = Settings, S = undefined> = Attacher<T, S>
type Settings = {

@@ -163,5 +178,10 @@ [key: string]: unknown

}
type PluginTuple = [Plugin, Settings]
type Pluggable = Plugin | Preset | PluginTuple
type PluggableList = Pluggable[]
type PluginTuple<T = Settings> = [Plugin<T>, T]
type PluginTriple<T = Settings, S = undefined> = [Plugin<T, S>, T, S]
type Pluggable<T = Settings, S = undefined> =
| Plugin<T>
| Preset
| PluginTuple<T>
| PluginTriple<T, S>
type PluggableList = Array<Pluggable<any, any>>

@@ -176,6 +196,7 @@ /**

* @param options Configuration
* @param extraOptions Secondary configuration
* @returns Optional.
*/
interface Attacher {
(this: Processor, options?: unknown): Transformer | void
interface Attacher<T = Settings, S = undefined> {
(this: Processor, options?: T, extraOptions?: S): Transformer | void
}

@@ -182,0 +203,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