package melange

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

melange-7.0.0-52.tbz
sha256=4a38934c6244e456366a57dfbfb1a09a2e1e93c3b1cac105242cd6e4311e237f
sha512=2526cfe8c0078d28592e23add72f55dd285c74146d6fb3efacb4f26b086362f36ae4737eb13c3f65cddc426897021f89e5d40c9c30c37a4dd784727a7f5457d6

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