MCPcopy
hub / github.com/prisma/prisma / copy

Method copy

helpers/compile/plugins/fill-plugin/fillers/buffer-small.ts:359–380  ·  view source on GitHub ↗
(target: Uint8Array, targetStart = 0, sourceStart = 0, sourceEnd = this.length)

Source from the content-addressed store, hash-verified

357 }
358
359 copy(target: Uint8Array, targetStart = 0, sourceStart = 0, sourceEnd = this.length) {
360 assertUnsigned(targetStart, 'targetStart')
361 assertUnsigned(sourceStart, 'sourceStart', this.length)
362 assertUnsigned(sourceEnd, 'sourceEnd')
363
364 targetStart >>>= 0
365 sourceStart >>>= 0
366 sourceEnd >>>= 0
367
368 let copiedBytes = 0
369 while (sourceStart < sourceEnd) {
370 if (this[sourceStart] === undefined) break
371 if (target[targetStart] === undefined) break
372
373 target[targetStart] = this[sourceStart]
374 copiedBytes++
375 sourceStart++
376 targetStart++
377 }
378
379 return copiedBytes
380 }
381
382 write(string: string, encoding?: Encoding): number
383 write(string: string, offset: number, encoding?: Encoding): number

Callers 7

setupTestSuiteFilesFunction · 0.80
Baseline.test.tsFile · 0.80
cloneSpecificValueFunction · 0.80
jestContext.tsFile · 0.80
vitestContext.tsFile · 0.80
writeMethod · 0.80

Calls 1

assertUnsignedFunction · 0.85

Tested by

no test coverage detected