Skip to content

pantoken-root / platforms/drupal/src / machineName

Function: machineName() ​

machineName(name): string

Experimental

Convert a display name to a Drupal machine name (lower_snake).

Parameters ​

name ​

string

Returns ​

string

Example ​

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

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