Code Monkey home page Code Monkey logo

angularjs-humanize's Introduction

angularjs-humanize

angularjs-humanize is a thin wrapper around the humanize library, providing a variety of Angular filters which apply transformations to make data more human-readable.

Installation

Install the library via

bower install -S angularjs-humanize

Add it to your index.html:

<script src="bower_components/humanize/humanize.js"></script>
<script src="bower_components/angularjs-humanize/src/angular-humanize.js"></script>

Add it as a dependency to your angularjs project:

var app = angular.module("myApp", ['angular-humanize']);

Supported Filters

angularjs-humanize currently supports the following filters, mapping to the humanize functions of the same name:

  • humanizeFilesize, which transforms a number or number-like string into a human-readable filesize such as "225.35 KB"
  • humanizeNumberFormat, which transforms a number or number-like string into a formatted number such as "1,225.35"
  • humanizeOrdinal, which transforms an integer into an ordinal such as "32nd" or "101st"
  • humanizeNaturalDay, which transforms an integer representing an epoch into a date representation or one of "yesterday", "today", or "tomorrow"
  • humanizeRelativeTime, which transforms an integer representing an epoch into a string such as "about an hour ago" or "in a month"

License

Copyright © 2014 Say Media Ltd. All Rights Reserved. See the LICENSE file for distribution terms.

angularjs-humanize's People

Contributors

apparentlymart avatar rolandboon avatar sebastianzillessen avatar snark avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.