https://github.com/wellitongervickas/javascript-shortcode-parser
This function is like a sprintf of php. You'll need to pass a object like {name: 'Foobar' } and a text with shortcodes to be replaced with you short codes.
https://github.com/wellitongervickas/javascript-shortcode-parser
ecmascript helper javascript php sprintf
Last synced: 6 months ago
JSON representation
This function is like a sprintf of php. You'll need to pass a object like {name: 'Foobar' } and a text with shortcodes to be replaced with you short codes.
- Host: GitHub
- URL: https://github.com/wellitongervickas/javascript-shortcode-parser
- Owner: wellitongervickas
- Created: 2018-10-05T00:19:39.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-08T16:41:15.000Z (over 7 years ago)
- Last Synced: 2025-07-07T08:43:46.070Z (7 months ago)
- Topics: ecmascript, helper, javascript, php, sprintf
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# javascript-shortcode-parser
> Create a text dynamically using a function to convert "{{short_code}}" to texts.
### Description
> This function is like a sprintf of php. You'll need to pass a object like {name: 'Foobar' } and a text with shortcodes to be replaced with you short codes.
#### Install
- npm install javascript-shortcode-parser
- import shortCodeParser from 'javascript-shortcode-parser';
#### Example 1
> Input -> shortCodeParser('My name is {{user_name}}, { user_name: 'foobar' });
> Output -> My name is foobar
[Npm](https://www.npmjs.com/package/javascript-shortcode-parser)