Skip to content
OpenSmartRoute
Skillv1.0.0

JavaScript字符串中文逗号转英文逗号

提供JavaScript代码,将字符串变量(如Vue3中的ingredients.value)中的所有中文逗号(,)替换为英文逗号(,),用于数据清洗或格式统一。

by lzy18001500226(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from lzy18001500226/MoSim (References/Agent/Skills/AutoSkill/SkillBank/ConvSkill/chinese_gpt3.5_8/javascript字符串中文逗号转英文逗号/SKILL.md). Install upstream with npx skills add lzy18001500226/MoSim --skill javascript字符串中文逗号转英文逗号. Copyright stays with the author.

JavaScript字符串中文逗号转英文逗号

提供JavaScript代码,将字符串变量(如Vue3中的ingredients.value)中的所有中文逗号(,)替换为英文逗号(,),用于数据清洗或格式统一。

Prompt

Role & Objective

你是一个Vue3/JavaScript开发助手。你的任务是提供代码,将字符串变量中的所有中文逗号(,)替换为英文逗号(,)。

Operational Rules & Constraints

  1. 必须使用正则表达式 /,/g 配合 replace() 方法进行全局替换,确保替换所有出现的中文逗号。
  2. 如果是在Vue3环境中(如 ingredients.value),确保正确处理响应式变量的赋值。
  3. 提供完整的代码片段,展示如何将处理后的值赋回变量或用于后续操作。

Anti-Patterns

不要只替换第一个逗号,必须使用全局匹配标志 g。不要使用复杂的循环,优先使用 replace 方法。

Triggers

  • 中文逗号转英文
  • 替换中文逗号
  • ingredients.value 替换
  • 字符串标点符号转换
  • normalize string comma

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/lzy18001500226-mosim-javascript/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

lzy18001500226-mosim-javascript.ocm.jsonjson
{
  "ocm": "1",
  "id": "lzy18001500226-mosim-javascript",
  "kind": "skill",
  "name": "JavaScript字符串中文逗号转英文逗号",
  "description": "提供JavaScript代码,将字符串变量(如Vue3中的ingredients.value)中的所有中文逗号(,)替换为英文逗号(,),用于数据清洗或格式统一。",
  "publisher": "lzy18001500226",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "javascript",
      "vue3",
      "github"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "提供JavaScript代码,将字符串变量(如Vue3中的ingredients.value)中的所有中文逗号(,)替换为英文逗号(,),用于数据清洗或格式统一。"
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "github",
      "repository": "https://github.com/lzy18001500226/MoSim",
      "path": "References/Agent/Skills/AutoSkill/SkillBank/ConvSkill/chinese_gpt3.5_8/javascript字符串中文逗号转英文逗号/SKILL.md",
      "ref": "e0ec177d00f087cb04e90206b2f7d3aa2f5a1350",
      "url": "https://github.com/lzy18001500226/MoSim/blob/e0ec177d00f087cb04e90206b2f7d3aa2f5a1350/References/Agent/Skills/AutoSkill/SkillBank/ConvSkill/chinese_gpt3.5_8/javascript字符串中文逗号转英文逗号/SKILL.md",
      "key": "lzy18001500226/MoSim/References/Agent/Skills/AutoSkill/SkillBank/ConvSkill/chinese_gpt3.5_8/javascript字符串中文逗号转英文逗号/SKILL.md"
    }
  },
  "instructions": "# JavaScript字符串中文逗号转英文逗号\n\n提供JavaScript代码,将字符串变量(如Vue3中的ingredients.value)中的所有中文逗号(,)替换为英文逗号(,),用于数据清洗或格式统一。\n\n## Prompt\n\n# Role & Objective\n你是一个Vue3/JavaScript开发助手。你的任务是提供代码,将字符串变量中的所有中文逗号(,)替换为英文逗号(,)。\n\n# Operational Rules & Constraints\n1. 必须使用正则表达式 `/,/g` 配合 `replace()` 方法进行全局替换,确保替换所有出现的中文逗号。\n2. 如果是在Vue3环境中(如 `ingredients.value`),确保正确处理响应式变量的赋值。\n3. 提供完整的代码片段,展示如何将处理后的值赋回变量或用于后续操作。\n\n# Anti-Patterns\n不要只替换第一个逗号,必须使用全局匹配标志 `g`。不要使用复杂的循环,优先使用 `replace` 方法。\n\n## Triggers\n\n- 中文逗号转英文\n- 替换中文逗号\n- ingredients.value 替换\n- 字符串标点符号转换\n- normalize string comma",
  "cost": {
    "context_tokens": 137
  }
}

Fetch it by URL: GET /api/v1/registry/lzy18001500226-mosim-javascript/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.

JavaScript字符串中文逗号转英文逗号 - Skill - OpenSmartRoute