MCPcopy
hub / github.com/vuejs/core / getSource

Function getSource

packages/compiler-sfc/src/style/preprocessors.ts:141–151  ·  view source on GitHub ↗
(
  source: string,
  filename: string,
  additionalData?: string | ((source: string, filename: string) => string),
)

Source from the content-addressed store, hash-verified

139}
140
141function getSource(
142 source: string,
143 filename: string,
144 additionalData?: string | ((source: string, filename: string) => string),
145) {
146 if (!additionalData) return source
147 if (isFunction(additionalData)) {
148 return additionalData(source, filename)
149 }
150 return additionalData + source
151}
152
153export type PreprocessLang = 'less' | 'sass' | 'scss' | 'styl' | 'stylus'
154

Callers 2

scssFunction · 0.85
lessFunction · 0.85

Calls 1

isFunctionFunction · 0.90

Tested by

no test coverage detected