Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ianstormtaylor/to-space-case
Convert a string to a space case.
https://github.com/ianstormtaylor/to-space-case
case javascript utility
Last synced: 9 days ago
JSON representation
Convert a string to a space case.
- Host: GitHub
- URL: https://github.com/ianstormtaylor/to-space-case
- Owner: ianstormtaylor
- Created: 2013-09-19T00:06:16.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2016-01-21T19:47:55.000Z (almost 9 years ago)
- Last Synced: 2024-04-30T04:22:32.225Z (6 months ago)
- Topics: case, javascript, utility
- Language: JavaScript
- Homepage:
- Size: 37.1 KB
- Stars: 6
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# to-space-case [![Build Status](https://travis-ci.org/ianstormtaylor/to-space-case.svg?branch=master)](https://travis-ci.org/ianstormtaylor/to-space-case)
Convert a string to a space case. Part of the series of [case helpers](https://github.com/ianstormtaylor/to-case).
## Installation
```
$ npm install to-space-case
```## Example
```js
var toSpaceCase = require('to-space-case')toSpaceCase('camelCase') // "camel case"
toSpaceCase('snake_case') // "snake case"
toSpaceCase('dot.case') // "dot case"
toSpaceCase('-RAnDom -jUNk$__loL!') // "random junk lol"
```## API
### toSpaceCase(string)
Returns the `string` converted to space case.## License
The MIT License (MIT)
Copyright © 2016, Ian Storm Taylor
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.