Files
common/packages/util/src/string/camelCase.ts
T
2021-01-03 11:20:22 +01:00

14 lines
419 B
TypeScript

// Copyright 2017-2021 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import camelcase from 'camelcase';
/**
* @name stringCamelCase
* @summary Convert a dash/dot/underscore/space separated string/String to camelCase
*/
// eslint-disable-next-line @typescript-eslint/ban-types
export function stringCamelCase (value: string | String): string {
return camelcase(value.toString());
}