Neutrino Packing Machine

    @mudas/filters
    TypeScript icon, indicating that this package has built-in type declarations

    0.2.0 • Public • Published

    @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

    scope function desc
    Currency currency(value:number) Convert to currency format,e.g. '100,00.01'
    Datetime dateformat(dateInfo:*, format:string = 'YYYY-MM-DD') Convert to date format
    Datetime timestr(ms:number) Convert to time format
    physical distance(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.
    String repeat,trim Alias of repeat,trim in lodash

    Keywords

    none

    Install

    npm i @mudas/filters

    DownloadsWeekly Downloads

    3

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    22.9 kB

    Total Files

    18

    Last publish

    Collaborators

    • mudas