Skip to content

pantoken-root / platforms/drupal/src / machineName

函数: machineName() ​

machineName(name): string

实验性

将显示名称转换为 Drupal 机器名称 (lower_snake)。

参数 ​

name ​

string

返回值 ​

string

示例 ​

ts
import { machineName } from "@pantoken/drupal";

machineName("Instructure"); // "instructure"
machineName("My Canvas Theme"); // "my_canvas_theme"