Function jsonify

  • Creates a JSON compatible version of the value given. Under the hood this is actually the same as copyThroughJson.

    Type Parameters

    • T

    Parameters

    • value: T

    Returns Jsonify<T>

    import {jsonify} from '@augment-vir/common';

    // `result` is `{b: 'b'}`
    const result = jsonify({
    map: new Map([
    [
    'q',
    'r',
    ],
    [
    's',
    't',
    ],
    ]),
    b: 'b',
    });

    @augment-vir/common