dasherize

Function

Dasherize a string

 import { dasherize } from '@esri/hub-common';
 dasherize('innerHTML');                // 'inner-html'
 dasherize('action_name');              // 'action-name'
 dasherize('css-class-name');           // 'css-class-name'
 dasherize('my favorite items');        // 'my-favorite-items'
 dasherize('privateDocs/ownerInvoice';  // 'private-docs/owner-invoice'

Extracted and modified from Ember.js source code - MIT license @param value @returns

  • dasherize(value: string) : string

Parameters

Parameter Type Default Notes
value Required string

Returns

string

Function defined in common/src/utils/dasherize.ts:17