package melange

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

melange-7.0.0-55.tbz
sha256=f71d2910599c230506efe01f43e02d16d4468fdaea34b537e9e3dfd7383cdf56
sha512=d18c9c0fee084eea8ff6ffa218d384ebea9b9934a15c45ad39fedf2d2f60754e3c8b36fb336014988f78c1ba8d2a50b2bcedb700fb02116195e78f07ee7b86b3

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