vue-js-extender

Extend JS native objects for vue.


Keywords
vue, js-extender
License
MIT
Install
npm install vue-js-extender@1.0.9

Documentation

vue-js-extender

Extend JS native objects for vue.




Getting started

This package should extend JS native objects for vue.

  1. Install the package:
npm install --save vue-js-extender
  1. 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:

  • typeOf
  • isEmpty
  • valueEquals
  • copy
  • clone
  • deepFreeze
  • newGuid
  • fixToNull
  • toBoolean

Array:

  • contains and prototype.contains
  • insert and prototype.insert
  • remove and prototype.remove
  • sortObject and prototype.sortObject
  • mapMany and prototype.mapMany
  • distinct and prototype.distinct
  • findObjPropValue and prototype.findObjPropValue
  • count and prototype.count
  • sum and prototype.sum
  • average and prototype.average

Date:

  • format and prototype.format

Number:

  • maxValue: This is a field. value like follow:
{
    int32: 2147483647
}
  • toFixedEx and prototype.toFixedEx

String:

  • empty: This is a field
  • isNullOrEmpty
  • isNullOrWhiteSpace
  • fixToEmpty
  • format and prototype.format
  • trim and prototype.trim
  • lTrim and prototype.lTrim
  • rTrim and prototype.rTrim
  • replaceAll and prototype.replaceAll
  • remove and prototype.remove
  • removeAll and prototype.removeAll
  • contains and prototype.contains
  • startWith and prototype.startWith
  • endWith and prototype.endWith
  • truncat and prototype.truncat
  • toNumber and prototype.toNumber
  • emptyToZero and prototype.emptyToZero
  • toPascalCase and prototype.toPascalCase
  • getFileExtension and prototype.getFileExtension



Change Log

CHANGELOG.md