1.0.1 • Published 6 years ago

angular-ui-pipes v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Angular-UI-Pipes

Going to be the most complete and easy-to-use Angular pipe collection. Require @angular/core >=4.0.0

Plan & Goal

The goal to build a set of complete and easy-to-use angular pipes to help display human-friendly data format. What we mean by 'complete' is to solve as much as angular pipes use cases as we can. Each pipe should be versatile and fully customizable with pipe parameters, also performance cost should be minimized. Our documentation should be seamless and understandable with the first glance.

PipesScenarioStatus
Numbers
short number12452 => 12.4kcompleted
chinese short number12452 => 1.2万planned
exponential299792458 => 3e+8completed
ordinal2 => 2ndcompleted
percentage0.2 => 20%in-progress
Time
ISO duration2M56.46S => 2:56.46completed
duration200(second) => 3:20in-progress
time agodate/timestamp=>few minutes agocompleted
time indate/timestamp=> in 35 minutesin-progress
relative timedate/timestamp=>1:20/yesterday/fridayin-progress
count downnot-planned
Raw Data
uncamel casefooBar => foo barin-progress
dedashfoo-bar => foo barin-progress
yes or noboolean => yes/noin-progress
booleanboolean => customize answersin-progress
object key{foo:bar} => fooin-progress
url encode/decodefoo%20bar => foo barin-progress
HTML
parse linksgoogle.com => <a href='google.com'>google.com</a>planned
new linesfoo /n bar => foo<br>barplanned
escape codefoo bar => foo&nbsp;barplanned
Unit Conversion
disk storage534215 Bit => 66.78kbplanned

Install

npm install angular-ui-pipes --save

Usage

In app.module.ts or any angular modules

import { UIPipes } from 'angular-ui-pipes';