Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/fathym_common/src/common/iterables/json-map-set/jsonMapSetClone.ts>jsonMapSetClone

The Fathym Reference Architecture provides the common foundation for applications built in Typescript.
Latest
function jsonMapSetClone
import { jsonMapSetClone } from "https://deno.land/x/fathym_common@v0.2.160/src/common/iterables/json-map-set/jsonMapSetClone.ts";

Clones a value with Map/Set replacer and reviver applied.

Examples

From direct import

import { jsonMapSetClone } from "@fathym/common/iterables";

const map = new Map([["a", 1], ["b", 2]]);

const set = new Set([1, 2, 3]);

const obj = jsonMapSetClone({ map, set });

From common import

import { jsonMapSetClone } from "@fathym/common";

const map = new Map([["a", 1], ["b", 2]]);

const set = new Set([1, 2, 3]);

const obj = jsonMapSetClone({ map, set });

Parameters

value: T

The value to clone with Map/Set replacer and reviver.

Returns

The cloned value with Map/Set replacer and reviver applied.