Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "buffer/reviver/docs/types/index.d"

Index

Functions

Functions

Export assignment reviveBuffer

  • reviveBuffer(key: string, value: any): any
  • Revives a JSON-serialized Buffer.

    Parameters

    • key: string

      key

    • value: any

      value

    Returns any

    value or Buffer

    Example

    var parseJSON = require( '@stdlib/utils/parse-json' );
    
    var str = '{"type":"Buffer","data":[5,3]}';
    
    var buf = parseJSON( str, reviveBuffer );
    // returns <Buffer>[ 5, 3 ]