@1k/string 中文文档教程
@1k/string
Usage
npm i @1k/string
# yarn add @1k/string
const OneK = require('@1k/string')
<script src="https://unpkg.com/@1k/string"></script>
<script>
OneK.camelCase('Foo Bar') // => 'fooBar'
OneK.pascalCase('Foo Bar') // => 'FooBar'
OneK.kebabCase('Foo Bar') // => 'foo-bar'
OneK.snakeCase('Foo Bar') // => 'foo_bar'
OneK.dotCase('Foo Bar') // => 'foo.bar'
OneK.constCase('Foo Bar') // => 'FOO_BAR'
OneK.pathCase('Foo Bar') // => 'foo/bar'
</script>
License
MIT © 脚本力量
@1k/string
Usage
npm i @1k/string
# yarn add @1k/string
const OneK = require('@1k/string')
<script src="https://unpkg.com/@1k/string"></script>
<script>
OneK.camelCase('Foo Bar') // => 'fooBar'
OneK.pascalCase('Foo Bar') // => 'FooBar'
OneK.kebabCase('Foo Bar') // => 'foo-bar'
OneK.snakeCase('Foo Bar') // => 'foo_bar'
OneK.dotCase('Foo Bar') // => 'foo.bar'
OneK.constCase('Foo Bar') // => 'FOO_BAR'
OneK.pathCase('Foo Bar') // => 'foo/bar'
</script>
License
MIT © Script Power