MCPcopy Create free account
hub / github.com/BridgeAR/safe-stable-stringify / getUniqueReplacerSet

Function getUniqueReplacerSet

index.js:202–210  ·  view source on GitHub ↗
(replacerArray)

Source from the content-addressed store, hash-verified

200}
201
202function getUniqueReplacerSet (replacerArray) {
203 const replacerSet = new Set()
204 for (const value of replacerArray) {
205 if (typeof value === 'string' || typeof value === 'number') {
206 replacerSet.add(String(value))
207 }
208 }
209 return replacerSet
210}
211
212function getStrictOption (options) {
213 if (hasOwnProperty.call(options, 'strict')) {

Callers 1

stringifyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected