Socket
Socket
Sign inDemoInstall

text-embedder

Package Overview
Dependencies
3
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    text-embedder

Embed content to text


Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Install size
55.2 kB
Created
Weekly downloads
 

Readme

Source

text-embedder

向文本中嵌入内容

const embedder = require('text-embedder');

embedder({
  text,                  // 原始文本
  embeds: [
    {
      insert: N,         // 在第 N 行之前,插入 content
      content: ...,      // 插入的内容
    },
    {
      replace: [X, Y],   // 从第 X 行到第 Y 行,替换为 content
      content: ...,      // 替换的内容
    },
    {
      insert: N,         // 优先使用 insert
      replace: [X, Y]    // replace 不起作用
      content: ...,
    },
  ],
});

FAQs

Last updated on 08 Jul 2020

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc