https://github.com/alvarocastro/copy-case
Copy the case from one string into another
https://github.com/alvarocastro/copy-case
case-converter string strings strings-manipulation
Last synced: about 2 months ago
JSON representation
Copy the case from one string into another
- Host: GitHub
- URL: https://github.com/alvarocastro/copy-case
- Owner: alvarocastro
- License: mit
- Created: 2019-09-02T17:36:23.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T14:03:01.000Z (over 3 years ago)
- Last Synced: 2025-02-28T14:46:44.933Z (over 1 year ago)
- Topics: case-converter, string, strings, strings-manipulation
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/copy-case
- Size: 1.33 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Copy Case
[](https://www.npmjs.com/package/copy-case)
[](https://github.com/alvarocastro/copy-case/actions?query=workflow%3Abuild)
[](https://codeclimate.com/github/alvarocastro/copy-case/maintainability)
[](https://coveralls.io/github/alvarocastro/copy-case?branch=master)
[](https://bundlephobia.com/result?p=copy-case)
[](https://github.com/xojs/xo)
[](https://github.com/semantic-release/semantic-release)
Copy the case from one string into another.
- [Install](#install)
- [Usage](#usage)
- [Contributing](#contributing)
- [Support](#support)
## Install
```bash
npm install copy-case
```
## Usage
```js
const copyCase = require('copy-case');
copyCase('something', 'AnYThinG');
// => 'SoMEthiNg'
```
### copyCase(target, source)
Returns `target` string copying `source` string case.
#### target
Type: `String`
String to change the case.
#### source
Type: `String`
String to copy the case form.
## Contributing
Contributions are always welcome! Please run `npm test` beforehand to ensure everything is ok.
## Support
If you use this package please consider starring it :)