Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marcuswhybrow/strfix
prefix & suffix strings simply
https://github.com/marcuswhybrow/strfix
Last synced: 27 days ago
JSON representation
prefix & suffix strings simply
- Host: GitHub
- URL: https://github.com/marcuswhybrow/strfix
- Owner: marcuswhybrow
- Created: 2016-10-07T19:12:56.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-07T19:39:20.000Z (about 8 years ago)
- Last Synced: 2024-11-09T22:28:17.522Z (about 1 month ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Affix strings, arrays and objects, with prefixes and suffixes:
`npm install strfix`
Usage:
```node
const strfix = require('strfix');strfix('input', {prefix: 'pre-', suffix: '-post'});
// pre-input-poststrfix(['input1', 'input2'], {prefix: 'pre-', suffix: '-post'});
// [ 'pre-input1-post', 'pre-input2-post' ]strfix({key1: 'val1', key2: 'val2'}, {prefix: 'pre-', suffix: '-post'});
// { key1: 'pre-val1-post', key2: 'pre-val2-post' }
```