Home / Function/ isGitLfsPlaceholder() — vite Function Reference

isGitLfsPlaceholder() — vite Function Reference

Architecture documentation for the isGitLfsPlaceholder() function in asset.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  a1a54c72_e5af_63a4_544f_313ad8815637["isGitLfsPlaceholder()"]
  e71b94ef_3010_e358_13d8_f3b3acb0a268["asset.ts"]
  a1a54c72_e5af_63a4_544f_313ad8815637 -->|defined in| e71b94ef_3010_e358_13d8_f3b3acb0a268
  f792863c_a1f0_39ad_4cf9_836f9b945919["shouldInline()"]
  f792863c_a1f0_39ad_4cf9_836f9b945919 -->|calls| a1a54c72_e5af_63a4_544f_313ad8815637
  116d8e93_bf90_f56d_0ddc_02033886ac39["assetToDataURL()"]
  116d8e93_bf90_f56d_0ddc_02033886ac39 -->|calls| a1a54c72_e5af_63a4_544f_313ad8815637
  style a1a54c72_e5af_63a4_544f_313ad8815637 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/plugins/asset.ts lines 414–418

function isGitLfsPlaceholder(content: Buffer): boolean {
  if (content.length < GIT_LFS_PREFIX.length) return false
  // Check whether the content begins with the characteristic string of Git LFS placeholders
  return GIT_LFS_PREFIX.compare(content, 0, GIT_LFS_PREFIX.length) === 0
}

Domain

Subdomains

Frequently Asked Questions

What does isGitLfsPlaceholder() do?
isGitLfsPlaceholder() is a function in the vite codebase, defined in packages/vite/src/node/plugins/asset.ts.
Where is isGitLfsPlaceholder() defined?
isGitLfsPlaceholder() is defined in packages/vite/src/node/plugins/asset.ts at line 414.
What calls isGitLfsPlaceholder()?
isGitLfsPlaceholder() is called by 2 function(s): assetToDataURL, shouldInline.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free