Sha256: 90c6bee6627ec7fe2f7df803e37409631e0eb4e52eba3fd9a43843bde0ebb000

Contents?: true

Size: 415 Bytes

Versions: 10

Compression:

Stored size: 415 Bytes

Contents

# frozen_string_literal: true

module Handlebarsjs
  module Helpers
    # Miscellaneous cmdlets
    module Misc
      # FormatJson: FormatJson will take an object and write it out as pretty JSON
      class FormatJson < Handlebarsjs::BaseHelper
        register_cmdlet(Cmdlet::Misc::FormatJson)

        def to_proc
          ->(value, _opts) { wrapper(cmdlet.call(value)) }
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
handlebarsjs-0.14.2 lib/handlebarsjs/helpers/misc/format_json.rb
handlebarsjs-0.14.1 lib/handlebarsjs/helpers/misc/format_json.rb
handlebarsjs-0.14.0 lib/handlebarsjs/helpers/misc/format_json.rb
handlebarsjs-0.13.1 lib/handlebarsjs/helpers/misc/format_json.rb
handlebarsjs-0.13.0 lib/handlebarsjs/helpers/misc/format_json.rb
handlebarsjs-0.12.0 lib/handlebarsjs/helpers/misc/format_json.rb
handlebarsjs-0.11.3 lib/handlebarsjs/helpers/misc/format_json.rb
handlebarsjs-0.11.2 lib/handlebarsjs/helpers/misc/format_json.rb
handlebarsjs-0.11.1 lib/handlebarsjs/helpers/misc/format_json.rb
handlebarsjs-0.11.0 lib/handlebarsjs/helpers/misc/format_json.rb