Skip to content

pantoken / 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"