1.0.9 • Published 2 years ago
vue-js-extender v1.0.9
Getting started
This package should extend JS native objects for vue.
- Install the package:
npm install --save vue-js-extender- Add the package into your app:
import Vue from 'vue'
import JSExtender from 'vue-js-extender'
Vue.use(JSExtender)PS: It's better to import and use it at the first after import Vue in main.js.
Usage
Instructions
Extend Details:
Object:
typeOfisEmptyvalueEqualscopyclonedeepFreezenewGuidfixToNulltoBoolean
Array:
containsandprototype.containsinsertandprototype.insertremoveandprototype.removesortObjectandprototype.sortObjectmapManyandprototype.mapManydistinctandprototype.distinctfindObjPropValueandprototype.findObjPropValuecountandprototype.countsumandprototype.sumaverageandprototype.average
Date:
formatandprototype.format
Number:
maxValue: This is a field. value like follow:
{
int32: 2147483647
}toFixedExandprototype.toFixedEx
String:
empty: This is a fieldisNullOrEmptyisNullOrWhiteSpacefixToEmptyformatandprototype.formattrimandprototype.trimlTrimandprototype.lTrimrTrimandprototype.rTrimreplaceAllandprototype.replaceAllremoveandprototype.removeremoveAllandprototype.removeAllcontainsandprototype.containsstartWithandprototype.startWithendWithandprototype.endWithtruncatandprototype.truncattoNumberandprototype.toNumberemptyToZeroandprototype.emptyToZerotoPascalCaseandprototype.toPascalCasegetFileExtensionandprototype.getFileExtension
Change Log
CHANGELOG.md