Comparing version 0.1.3 to 0.1.4
import capitalize from './capitalize'; | ||
import chop from './chop'; | ||
import currency from './currency'; | ||
import date from './date'; | ||
@@ -7,2 +8,3 @@ import json from './json'; | ||
import reverse from './reverse'; | ||
import sandwich from './sandwich'; | ||
import uppercase from './uppercase'; | ||
@@ -13,2 +15,3 @@ | ||
chop(Vue); | ||
currency(Vue); | ||
date(Vue); | ||
@@ -18,3 +21,4 @@ json(Vue); | ||
reverse(Vue); | ||
sandwich(Vue); | ||
uppercase(Vue); | ||
}; |
@@ -6,3 +6,3 @@ { | ||
"name": "morphling", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "A collection of VueJs filters.", | ||
@@ -9,0 +9,0 @@ "main": "index.js", |
@@ -7,4 +7,6 @@ # Mophling | ||
- [Updates (always check the updates for new features)](#updates) | ||
- [morph-capitalize](#morph-capitalize) | ||
- [morph-chop](#morph-chop) | ||
- [morph-currency](#morph-currency) | ||
- [morph-date](#morph-date) | ||
@@ -14,2 +16,3 @@ - [morph-json](#morph-json) | ||
- [morph-reverse](#morph-reverse) | ||
- [morph-sandwich](#morph-sandwich) | ||
- [morph-uppercase](#morph-uppercase) | ||
@@ -103,2 +106,30 @@ - [License](#License) | ||
### morph-currency | ||
Prepend a currency symbol to a value. | ||
*Syntax* | ||
`morph-currency(code)` | ||
```html | ||
<p>{{ 100 | morph-currency('PHP')}}</p> | ||
<!-- ₱100 --> | ||
``` | ||
```javascript | ||
const msg = this.$morphLowercase(100, 'PHP'); | ||
console.log(msg); // ₱100 | ||
``` | ||
**API** | ||
**option** | **description** | ||
--- | --- | ||
`code` | Currency code of a country e.g. 'PHP', 'USD', 'AUD', 'GBP'. Default is `$` if not provided. | ||
[Back to top](#filters) | ||
------ | ||
### morph-date | ||
@@ -214,2 +245,24 @@ | ||
### morph-sandwich | ||
Prepend and append data around a given value. | ||
*Syntax* | ||
`morph-sandwich(start, end)` | ||
```html | ||
<p>{{ 'the' | morph-sandwich('In ', ' end!') }}</p> | ||
<!-- In the end! --> | ||
``` | ||
```javascript | ||
const msg = this.$morphSandwich('the', 'In ', ' end!'); | ||
console.log(msg); // In the end! | ||
``` | ||
[Back to top](#filters) | ||
------ | ||
### morph-uppercase | ||
@@ -231,2 +284,9 @@ | ||
## Updates | ||
*July 28, 2017 PHT* | ||
- Added `morph-sandwich` filter. | ||
- Added `morph-curreny` filter. | ||
*"When my time comes, | ||
@@ -233,0 +293,0 @@ Forget the wrong that I've done, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39520
20
132
332