Socket
Book a DemoInstallSign in
Socket

mat-tms

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mat-tms

include tms

latest
Source
npmnpm
Version
0.3.1
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

mat-tms

mat读取tms文件,目前是基于filesync-client。

安装

$ npm install mat-tms

Example


var mat  = require('mat')
var mat-tms = require('mat-tms')

// 反向代理
mat.task('daily', function () {
  mat.url([/\.html/])
    .use(mat-tms({
      tmsRegex: /<!--TMS:(:<prefix>rgn)?\/?(:<url>[^,]*),(:<encoding>[^,]*),\d:TMS-->/ig
    }))
    .use(mat-tms({
      tmsRegex: /\{\{tms\("(:<url>[^"]*)","(:<prefix>\w*)"\)}}/ig
    }))
})
  • 通过正则表达式过滤出url,以前其他参数,其他参数支持 midway-tms的参数
  • 本来正则表达时不支持分组命名,用了一个组件:named-regexp

License

MIT

FAQs

Package last updated on 23 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.