MCPcopy
hub / github.com/facebook/react / escapeUserProvidedKey

Function escapeUserProvidedKey

packages/react/src/ReactChildren.js:61–63  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

59
60const userProvidedKeyEscapeRegex = /\/+/g;
61function escapeUserProvidedKey(text: string): string {
62 return text.replace(userProvidedKeyEscapeRegex, '$&/');
63}
64
65/**
66 * Generate a key string that identifies a element within a set.

Callers 1

mapIntoArrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected