Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

_

_: "Modify"

Optional index

index: string | ModifyFn

New index template string or function 新的index模板或function方法, 格式同value

Optional next

next should be MiddlewareConfig or "Gather"/"Noop"

Optional regexp

regexp: string | RegExp

process index/value by using RegExp 使用正则表达式去处理value, 如果需要处理index, 需要设定regexpTarget为"index"

example

option.regexp = /(\w+)=(\w+)/g;
option.regexp = "/(\\w+)=(\\w+)/g";

Optional regexpTarget

regexpTarget: "index" | "value"

regexp target 正则表达式的目标

Optional value

value: string | ModifyFn

New value template string or function 新的value模板或function方法

example

// ["i", "v"]
option.value = "value"; // new Value => v
option.value = "'_' + value"; // new Value => _v
option.value = "`@${value}`"; // new Value => @v
option.value = (index, value, _) => index + value; // iv