package melange

  1. Overview
  2. Docs
Toolchain to produce JS from Reason/OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

melange-7.0.1-55.tbz
sha256=8377c0860da82528ebde16a0133f270c1a03de35036bd44bbd8cfb87070a7afb
sha512=a33c1979f9928c9189d519cbc367b40cc9c0735f29735ef0f1ee5e66c204cf73b8a418ed85cb39442637a3369d3287a8c712a9e747c22bb7d0ac3daae59e6bd8

doc/src/melange.js_parser/parse_error_utils.ml.html

Source file parse_error_utils.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
(*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *)

let camelize str =
  match String.split_on_char '-' str with
  | [] -> str
  | [str] -> str
  | hd :: rest ->
    let parts = hd :: List.map String.capitalize_ascii rest in
    String.concat "" parts