View the source of this content.
Let's get the whole "linebreak" thing out of the way. The next paragraph contains two phrases separated by a single newline character:
Roses are red Violets are blue
// leon's p.o. box detection regex | |
// for better results, trim and compress whitespace first | |
var pobox_re = /^box[^a-z]|(p[-. ]?o.?[- ]?|post office )b(.|ox)/i, | |
arr = [ | |
"po box", | |
"p.o.b.", | |
"p.o. box", | |
"po-box", | |
"p.o.-box", |
(function() { | |
// mimicing php's array_combine() | |
function combine(a, b) { | |
var i, o = {}; | |
for (i in a) | |
o[a[i]] = b[i]; | |
return o; | |
} |
Drop in replace functions for setTimeout() & setInterval() that | |
make use of requestAnimationFrame() for performance where available | |
http://www.joelambert.co.uk | |
Copyright 2011, Joe Lambert. | |
Free to use under the MIT license. | |
http://www.opensource.org/licenses/mit-license.php |
#markdown! |
View the source of this content.
Let's get the whole "linebreak" thing out of the way. The next paragraph contains two phrases separated by a single newline character:
Roses are red Violets are blue
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain("news.ycombinator.com"){ | |
body > center > table { | |
max-width: 1000px; | |
} | |
.default { | |
padding-right: 30px; | |
text-align: justify; | |
} |
The following options are also supported:
-c
, --stdout
......... Write output to standard output-d
, --debug
........... Write only the debug output-h
, --help
............. Display help information-m
, --minify
......... Write only the minified output-o
, --output
......... Write output to a given path/filename-p
, --source-map
.. Generate a source map for the minified output-s
, --silent
......... Skip status updates normally logged to the console-V
, --version
....... Output current version of Lo-Dash// test if js engine's Array#sort implementation is stable | |
var str = "abcdefghijklmnopqrstuvwxyz"; | |
str.split("").sort(function(a,b) { | |
return ~~(str.indexOf(b)/2.3) - ~~(str.indexOf(a)/2.3); | |
}).join("") == "xyzvwtursopqmnklhijfgdeabc"; |