jdpedrie / angularjs-ordinal-filter Goto Github PK
View Code? Open in Web Editor NEWOrdinal Number filter for Angular
License: MIT License
Ordinal Number filter for Angular
License: MIT License
To make it consistent with how AngularJS displays {{ "" }}
, {{ null }}
and {{ undefined }}
, the filter shouldn't be appending a suffix for these values.
That is, for the following template:
{{ 123 | ordinal }}, {{ "" | ordinal }}, {{ null | ordinal}}, {{ undefined | ordinal }}, {{ "456" | ordinal }}
I would expect the output to look like this:
123rd, , , , 456th
Number.NaN on Safari and IE doesn't work and causes exceptions.
Code to review is: ordinal-browser.js:30
function numeric(n) {
return 'number' === typeof +n && !Number.isNaN(+n);
}
The above can simply be changed to:
function numeric(n) {
return 'number' === typeof +n && !isNaN(+n);
}
The above issue affects version 2.1
bower angularjs-ordinal-filter#0.0.1 ENORESTARGET No tag found that was able to satisfy 0.0.1
In order to be able to recreate a build at any time in the past, it would be nice to lock the library version number in bower.json
. Unfortunately, it's not possible now.
Could you throw a license on this? All of us are in the dark that you might come back and sue us for a billion dollars for 4 lines of code :) I vote for MIT.
Hi, since you updated the bower release this does no longer work, it does not make anything ordinal. I was using it before and it was working so smoothly, I had to fork it and go back to commits, to when your main was ordinal.js in order for it to work again.
Thanks for that code though, it works very nicely.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.