0.2.0 • Published 4 years ago

@mudas/filters v0.2.0

Weekly downloads
10
License
MIT
Repository
-
Last release
4 years ago

@mudas/filters

A library project for filters

Setup

install:

npm i @mudas/filters -S

setup:

import {currency} from '@mudas/filters';
Vue.filter('currency', currency);

usage:

<template>
  <div>{{value|currency}}</div>
</template>

Filters List

scopefunctiondesc
Currencycurrency(value:number)Convert to currency format,e.g. '100,00.01'
Datetimedateformat(dateInfo:*, format:string = 'YYYY-MM-DD')Convert to date format
Datetimetimestr(ms:number)Convert to time format
physicaldistance(value, fixed = 1)Formatted distance field with unit output, The unit is 'm' when it is less than 1000, and the unit is 'km' when it is more than 1000.
Stringrepeat,trimAlias of repeat,trim in lodash
0.2.0

4 years ago

0.1.4

4 years ago

0.1.0

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.3

4 years ago

0.0.4

4 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago