• Version 5.0.0
  • Published
  • 25.9 kB
  • No dependencies
  • MIT license


npm i devalue
yarn add devalue
pnpm add devalue


Gets the job done when JSON.stringify can't



namespace devalue

module 'devalue' {}

    function parse

    parse: (
    serialized: string,
    revivers?: Record<string, (value: any) => any>
    ) => any;
    • Revive a value serialized with devalue.stringify

    function stringify

    stringify: (
    value: any,
    reducers?: Record<string, (value: any) => any>
    ) => string;
    • Turn a value into a JSON string that can be parsed with devalue.parse

    function uneval

    uneval: (value: any, replacer?: (value: any) => string | void) => string;
    • Turn a value into the JavaScript that creates an equivalent value

    function unflatten

    unflatten: (
    parsed: number | any[],
    revivers?: Record<string, (value: any) => any>
    ) => any;
    • Revive a value flattened with devalue.stringify

    Package Files (1)

    Dependencies (0)

    No dependencies.

    Dev Dependencies (4)

    Peer Dependencies (0)

    No peer dependencies.


    To add a badge like this badgeto your package's README, use the codes available below.

    You may also use to create a custom badge linking to

    • Markdown
    • HTML
      <a href=""><img src="" alt=""></a>