def encode_source_map(map)
      return nil unless map
      {
        "version"  => map[:version],
        "file"     => map[:file],
        "mappings" => encode_vlq_mappings(map[:mappings], sources: map[:sources], names: map[:names]),
        "sources"  => map[:sources],
        "names"    => map[:names]
      }
    end
def encode_source_map(map)
      return nil unless map
      {
        "version"  => map[:version],
        "file"     => map[:file],
        "mappings" => encode_vlq_mappings(map[:mappings], sources: map[:sources], names: map[:names]),
        "sources"  => map[:sources],
        "names"    => map[:names]
      }
    end
Public: Compress source map

 Example:

     encode_source_map(map)
     # => {
       "version"  => 3,
       "file"     => "..",
       "mappings" => "AAAA;AACA;..;AACA",
       "sources"  => [..],
       "names"    => [..]
     }

 map - Source map hash (uncompressed)

 Returns a compressed source map hash according to source map spec v3