MCPcopy
hub / github.com/webpack/webpack / extractYamlArray

Function extractYamlArray

test/test262.spectest.js:558–567  ·  view source on GitHub ↗
(meta, key)

Source from the content-addressed store, hash-verified

556 });
557
558const extractYamlArray = (meta, key) => {
559 const regex = new RegExp(`${key}:\\s*\\[?([^\\]\\n]+)\\]?`);
560 const match = meta.match(regex);
561 if (!match) return [];
562
563 return match[1]
564 .split(",")
565 .map((s) => s.trim().replace(/['"]/g, ""))
566 .filter(Boolean);
567};
568
569const getTest262Meta = (content) => {
570 const metaMatch = content.match(/\/\*---([\s\S]*?)---\*\//);

Callers 1

getTest262MetaFunction · 0.85

Calls 2

splitMethod · 0.80
replaceMethod · 0.45

Tested by

no test coverage detected