Commit graph

600 commits

Author SHA1 Message Date
rolux
0d0926cbf5 In Ox.cache (which is now called onload in Array.js to cache getSortValue), remove dependency on Ox.extend (which would depend on Ox.forEach) 2012-09-03 22:14:08 +02:00
rolux
f5c320187e In Ox.api, add a map option {key: fn(value, object)}, value being object[key], so that the sort value can depend on other keys; Ox.sortBy is updated to use getSortValue (cached sort value of mapped value) instead of getSortValues (precomputed mapped sort value per value, which is no longer unique) 2012-09-03 22:11:25 +02:00
rolux
baf29d068b remove an onload dependency 2012-09-03 21:59:53 +02:00
rolux
863ddfeafa remove an onload dependency 2012-09-03 21:11:57 +02:00
rolux
d16f76f0da add constant Ox.EARTH_SURFACE 2012-09-01 05:51:35 +02:00
rolux
b5a2e80878 fix sort value for '[article] [number or quoted string]', add test 2012-08-29 17:40:27 +02:00
rolux
ff1e6d4833 make Ox.compact more compact and flatten Ox.flatten 2012-07-13 15:51:49 +02:00
j
223d9470a9 add useCapture argument to addEventListener, not optional in FF 3.6 2012-07-05 19:50:01 +02:00
rolux
a155ff5487 fix Ox.localStorage for Firefox 3.6 2012-07-05 19:48:20 +02:00
rolux
b8f88958da cleanup documentation 2012-07-05 19:47:57 +02:00
rolux
f4c34d858c remove Ox.polyfill.localStorage 2012-07-05 19:47:33 +02:00
j
4b71d7c03b merge 2012-07-05 19:45:41 +02:00
j
762d5ca963 fix load on IE and Firefox 3.6 2012-07-05 19:05:52 +02:00
rolux
0f44e64885 remove some comments 2012-07-05 11:36:17 +02:00
rolux
bda90f6b6b remove Ox.Break 2012-07-05 10:58:08 +02:00
rolux
c600c250b0 update documentation for request methods 2012-07-03 23:55:05 +02:00
rolux
ad25f92c38 update about, fix Ox.find docs 2012-07-03 00:54:37 +02:00
rolux
487ee4626d update Ox.formatUnit 2012-07-02 16:19:36 +02:00
rolux
bbd80ccf4f Ox.getAsync: fix docs, rename var 2012-06-27 14:55:49 +02:00
rolux
73c0fc8c31 remove print statement 2012-06-27 13:21:28 +02:00
rolux
f6a7d0a059 remove unneccessary closure 2012-06-26 03:14:35 +02:00
rolux
f5782c475b Ox.divideInt -> Ox.splitInt 2012-06-25 16:43:03 +02:00
rolux
1b62ccfc4b Ox.test: fix docs 2012-06-24 19:11:59 +02:00
rolux
d29bc5569b make Ox.rgb always return integers 2012-06-24 17:41:27 +02:00
rolux
9f1b86ab87 Ox.test: eval all scripts; add stringifyResult method; properly stringify actual async result; in async path, rename 'result' to 'actual' 2012-06-24 15:40:48 +02:00
rolux
966ceeb1f1 Ox.parseMarkdown: don't make replacements inside code spans/blocks; Ox.sanitizeHTML: add (failing) test; remove unneccessary escaping inside [] in regular expressions 2012-06-24 15:37:46 +02:00
rolux
8312105427 comment out example scripts 2012-06-24 15:34:19 +02:00
rolux
19afdd8bea fix Ox.clone(0, deep) 2012-06-24 15:32:35 +02:00
rolux
05828db75d Ox.doc: support inline properties prefixed with '.', add FIXMEs 2012-06-23 20:22:09 +02:00
rolux
4b0a07387f fix a bug in parseMarkdown, add tests 2012-06-23 13:30:33 +02:00
rolux
ec4c46cb6c Ox.sanitizeHTML: include 'em' and 'strong' in default tags (otherwise sanitizing markdown fails) 2012-06-23 12:48:17 +02:00
rolux
b272221020 Ox.doc: set 'section' to complete line, not just first word 2012-06-23 12:47:30 +02:00
rolux
1652cde0ec fix docs 2012-06-23 12:46:41 +02:00
rolux
f15d6cad0f change the semantics of Ox.load to call back once the DOM is ready - which wasn't the case when calling Ox.load(callback) in the built version 2012-06-22 15:02:38 +02:00
rolux
e54be15936 Ox.sanitizeHTML: add test 2012-06-22 10:29:09 +02:00
rolux
8ccabb349e Ox.sanitizeHTML: decode html entities before encoding html entities; Ox.parseMarkdown: encode '<' in code spans and code blocks 2012-06-22 10:24:25 +02:00
rolux
93a9805da7 minor cleanup 2012-06-21 13:47:52 +02:00
rolux
d8cd59e90f add Ox.hypot 2012-06-21 13:39:19 +02:00
rolux
d04c1d3059 remove a print statement 2012-06-21 08:55:05 +02:00
rolux
71218cd61f Ox.tokenize: handle '.1' 2012-06-21 08:08:45 +02:00
rolux
625325a6e6 fix test result 2012-06-20 22:11:05 +02:00
rolux
9e35ae0be2 minor cleanup 2012-06-20 18:49:06 +02:00
rolux
9093d5f3ed update Ox.load documentation 2012-06-20 18:40:55 +02:00
rolux
68b89d7628 update Ox.load documentation 2012-06-20 18:39:31 +02:00
rolux
e88f622449 minor cleanup 2012-06-20 17:16:58 +02:00
rolux
bbf72ab0c7 Ox.formatRoman: add test 2012-06-20 12:03:10 +02:00
rolux
c68af487c5 typo 2012-06-20 12:02:04 +02:00
rolux
35df921fcd Ox.formatRoman: add tests 2012-06-20 12:01:32 +02:00
rolux
14d57f70bb add Ox.formatRoman 2012-06-20 11:57:22 +02:00
rolux
c3d51860c3 update markdown parser and css 2012-06-20 09:23:39 +02:00
rolux
46f2fa516e fix a bug in sort/sortBy 2012-06-19 21:29:16 +02:00
rolux
1f4b0f7faa Ox.api: cache sort; Ox.sortBy: improve performance 2012-06-19 19:32:10 +02:00
rolux
178e2bc487 fix min/max longitude 2012-06-19 18:04:48 +02:00
rolux
7c2f8aa967 typo 2012-06-19 18:02:40 +02:00
rolux
f7b0fb6893 typo 2012-06-19 18:01:48 +02:00
rolux
a544de5c60 typo 2012-06-19 18:00:59 +02:00
rolux
98b7929fc3 typo 2012-06-19 17:59:31 +02:00
rolux
76a540e399 Ox.API: better workaround for area 2012-06-19 17:57:21 +02:00
rolux
996f41c06b move Ox.stripTags from String.js to HTML.js 2012-06-18 19:11:17 +02:00
rolux
1ab5c5eca1 move Ox.isEmpty from Collection.js to Type.js 2012-06-18 19:10:41 +02:00
rolux
9ef4bdd0c1 avoid loop 2012-06-18 09:14:45 +02:00
rolux
175c8b23d0 Collection.js: handle localStorage object 2012-06-17 16:41:39 +02:00
rolux
d793d7857d add test for Ox.typeOf(localStorage) 2012-06-17 16:40:42 +02:00
rolux
c9474ee04e Ox.load: allow for passing array of modules 2012-06-17 15:56:13 +02:00
rolux
8d8e087e3d Ox.loadFile -> Ox.getFile 2012-06-17 15:37:21 +02:00
rolux
77adfbf7b8 Requests.js: handle errors, various other improvements 2012-06-17 15:36:55 +02:00
rlx
9d475e6012 remove warning when returning false from Ox.loop and Ox.forEach 2012-06-16 20:46:14 +00:00
rlx
898cc702f5 highlight: several bugfixes and performance improvements; normalizeHTML: only use dom if needed 2012-06-16 20:45:05 +00:00
rlx
3fc8a47bf4 return original string when highlight is called without query; lazy format annotation date 2012-06-16 16:17:28 +00:00
j
53966f3f53 fix Ox.sanitzeHTML if urls are inside an open a tag 2012-06-16 13:16:30 +02:00
rolux
1e47435058 add atob and btoa polyfills 2012-06-15 10:39:22 +02:00
rolux
37ee99f884 Ox.localStorage: fix chaining, add tests 2012-06-15 09:43:55 +02:00
rolux
d2322388dc minor changes 2012-06-15 09:43:27 +02:00
rolux
43077ceb88 typo 2012-06-14 16:45:49 +02:00
rolux
cbe8f1db49 Ox.identify: update examples 2012-06-14 16:44:50 +02:00
rolux
8bc8c57373 use base 10 in parseInt, use Math.floor for numbers 2012-06-13 10:28:21 +02:00
rlx
fbbe1e256a remove whitespace 2012-06-13 07:57:27 +00:00
rolux
cd38e66240 typo in Ox.isEqual 2012-06-13 09:11:58 +02:00
rolux
110be11a05 Ox.test: handle non-null values for which JSON.stringify returns 'null' 2012-06-13 09:06:54 +02:00
rolux
4dc11cd256 Ox.isEqual(NaN, NaN) should return true 2012-06-13 09:04:54 +02:00
rolux
bc83d22850 sign(-0) is -0 according to spec; add cosh; add tests 2012-06-13 09:04:16 +02:00
rolux
a627f41755 fix Ox.sign(-0), should be 0, not -0 2012-06-13 08:16:22 +02:00
rolux
8df96dd8fb add sign and trunc 2012-06-13 08:12:01 +02:00
rolux
c2ae5d3f4c add acosh, atanh and tanh 2012-06-13 00:04:28 +02:00
rolux
fd04452db9 make sure Ox.isInt(Infinity) returns false 2012-06-13 00:02:55 +02:00
rolux
e415a85d06 update test 2012-06-12 17:57:20 +02:00
rolux
6db715ab87 don't modify test.statement; delete test.data when done 2012-06-12 15:31:46 +02:00
rolux
1249e7d3a1 comment out description 2012-06-11 23:45:53 +02:00
rolux
9d7549671c minor cleanup 2012-06-11 23:45:37 +02:00
rolux
8c45632dc3 remove stray var 2012-06-11 23:45:20 +02:00
rolux
3c9c1cc4ed fix #522: correctly pad days in Ox.formatDuration 2012-06-11 13:40:28 +02:00
j
7dd06c6d3e add test for #522 2012-06-11 10:55:10 +02:00
rlx
26681d7e39 Ox.formatDateRangeDuration: avoid infinite loop when passing a start date that cannot be parsed 2012-06-10 10:27:06 +00:00
rlx
92bfb38caf in Ox.parseDate, only remove first element of values array if there was a match 2012-06-10 09:21:07 +00:00
rlx
806cbd1557 fix a bug in Ox.filter for objects 2012-06-10 09:00:12 +00:00
rolux
2fd3345328 update docs 2012-06-05 10:24:46 +02:00
rolux
56c6ef98c7 Ox.tokenize: handle hex numbers and numbers with exponent 2012-06-04 15:36:25 +02:00
rolux
da4e07fc2f typo in docs 2012-06-04 14:07:49 +02:00
rolux
6116f4b7f1 cleanup Ox.wordwrap; remove Ox.basename 2012-06-04 13:49:10 +02:00
rolux
fbe2513cb4 remove 'factor' argument from Ox.formatUnit 2012-06-04 12:41:40 +02:00
rolux
f0ba793a85 allow for passing milliseconds to Ox.parseDate 2012-06-04 12:02:29 +02:00
rolux
8581a3da3a remove unneeded constants 2012-06-04 11:49:27 +02:00
rolux
7282835f0d remove 'Ox.copy' alias 2012-06-04 11:26:01 +02:00
rolux
cd8b2e297d remove 'Ox.starts' and 'Ox.ends' aliases, update documentation; fix Ox.pad with negative length 2012-06-04 11:22:40 +02:00
rolux
a5c6747b57 change the signature of Ox.pad to match Ox.truncate 2012-06-04 11:08:38 +02:00
rolux
24bbf95bd5 typo 2012-06-03 11:13:39 +02:00
rolux
42092f163b Ox.parseURL: update docs & examples 2012-06-03 11:12:21 +02:00
rolux
9ce126263b change the signature of Ox.truncate to allow for passing 'position' without having to pass 'padding', change default padding from '...' to a real ellipsis 2012-06-03 11:07:39 +02:00
rolux
90147a69fb rename Ox.highlightHTML to Ox.highlight 2012-06-03 10:40:46 +02:00
rolux
ce3c5a4a03 remove Ox.highlight 2012-06-03 10:40:25 +02:00
rolux
191d7b3099 add test 2012-06-03 10:39:59 +02:00
rolux
43558a55a3 minor changes 2012-06-02 17:00:44 +02:00
rolux
ecd84770dd make Ox.forEach(object...) return a number; remove Ox.setPropertyOnce; move Ox.last to Array.js; update documentation and tests 2012-06-02 16:08:01 +02:00
rolux
686df92efa update documentation 2012-06-02 15:17:56 +02:00
rolux
d9b0cc5f01 update/fix documentation 2012-06-02 15:07:29 +02:00
rolux
e348acee86 parse and display inherited events 2012-06-02 14:10:59 +02:00
rolux
73fa856900 in documentation use foo, not <code>foo</code> 2012-06-02 13:06:44 +02:00
rolux
bd5a4b6318 Ox.parseMarkdown: in code spans or block, encode '>' 2012-06-02 12:51:59 +02:00
rolux
2482cec170 update documentation 2012-06-02 12:51:24 +02:00
rolux
38ba971dab Ox.doc: fix regular expressions 2012-06-02 12:36:48 +02:00
rolux
ba954cfedf Ox.getset: fix documentation 2012-06-02 12:36:25 +02:00
rolux
ad338ede3b correctly handle shadowed inherited properties 2012-06-02 12:13:25 +02:00
rolux
d78e644eb8 Ox.doc: make sure root item properties get included in inherited properties 2012-06-02 11:49:14 +02:00
rolux
55c76942f9 add fixme 2012-06-02 11:20:55 +02:00
rolux
23af95b611 correct documentation 2012-06-02 11:19:54 +02:00
rolux
9b4a046159 remove a print statement 2012-06-02 11:19:33 +02:00
rolux
4221d437ce Ox.doc: parse inherited properties 2012-06-01 01:41:38 +02:00
rolux
f8ab51fa40 add alternative signature to Ox.extend 2012-05-31 12:35:09 +02:00
rolux
684c4ceaf2 add second parameter to Ox.count 2012-05-31 00:48:55 +02:00
rolux
54266bd3b2 minor fixes 2012-05-31 00:47:57 +02:00
rolux
3683bf3d29 refactor HTML module; add functionality to Ox.parseMarkdown; add tests 2012-05-31 00:47:19 +02:00
rolux
b960ef3ea4 Ox.$: update documentation, add trigger method, add test 2012-05-30 22:38:48 +02:00
rolux
f1ccfa44f4 add Ox.isError, add tests 2012-05-30 22:37:23 +02:00
rolux
91026a0c77 throw warning, not error, when returning false from Ox.forEach or Ox.loop 2012-05-30 19:25:18 +02:00
rolux
bff20cd96a in parseMarkdown, don't write empty class for code blocks, and don't encode their content 2012-05-30 19:21:59 +02:00
rolux
e9fb83c578 in Ox.doc, simplify and speed up parseTokens() 2012-05-30 19:19:51 +02:00
rolux
5b6f161612 add localStorage to polyfills; slightly refactor Ox.localStorage; remove whitespace; update example 2012-05-30 16:21:07 +02:00
rolux
9269b96469 use markdown 2012-05-30 13:34:57 +02:00
rolux
07369fefec add Ox.parseMarkdown and Ox.encodeEmailAddress 2012-05-30 13:32:33 +02:00
rolux
1c98a3198a correct documentation, use markdown 2012-05-30 13:31:42 +02:00
rolux
ca05f24a6a update and fix tests 2012-05-30 10:19:30 +02:00
rolux
6847102507 fix documentation 2012-05-30 00:28:52 +02:00
rolux
f7e58b05e9 update Ox.doc; add (some) inline comments in Ox.test 2012-05-30 00:26:25 +02:00
rolux
250db05abc correct Ox.doc documentation 2012-05-29 16:19:57 +02:00
rolux
5dc654ad6d Ox.doc: change test object from {statement, result} to {statement, expected}, plus some refactoring; Ox.test: allow source, file, files, docObject or docObjects as first argument, make it testable and add a test, plus some refactoring; Ox.tokenize: add error type, continue lexing on error 2012-05-29 16:18:05 +02:00
rolux
38016aa06b Ox.doc: add tests; Ox.test: add documentation 2012-05-29 13:48:54 +02:00
rolux
c5fdc1ab39 simplify escapeRegExp regexp 2012-05-29 12:59:41 +02:00
rolux
7dd9169b3f Ox.fallback -> Ox.polyfill 2012-05-29 12:20:50 +02:00
rolux
8cd27bca2f 'null' and 'undefined' are primitives, too 2012-05-29 12:12:54 +02:00
rolux
2b592a8f2d add comment 2012-05-28 15:53:38 +02:00
rolux
a80534a1bd Ox.$.bind -> Ox.$.on, Ox.$.unbind -> Ox.$.off 2012-05-28 15:53:10 +02:00
rolux
3208ab35b9 improved test 2012-05-28 15:52:27 +02:00
rolux
8210a0c5cd fix a bug in sort, rename vars, re-enable Ox.api documentation 2012-05-28 07:52:46 +02:00
rolux
01493c1fe5 re-order methods 2012-05-27 23:17:40 +02:00
rolux
c09ef8b2b6 add a fixme and a semicolon 2012-05-27 23:17:02 +02:00
rolux
3fa59712c8 fix a potential bug in Ox.decodeBase32 2012-05-27 23:16:35 +02:00
rolux
9d26a4b6c3 add tests 2012-05-27 23:14:59 +02:00
rolux
b6411d485a off by one in Ox.encodeBase26 2012-05-27 22:59:43 +02:00
rolux
f030596468 remove Ox.TYPES 2012-05-27 22:09:52 +02:00
rolux
30e59f5538 when passing an array to Ox.values, return a clone, not the original array 2012-05-27 22:08:08 +02:00
rolux
948437b535 in Ox.doc, fix item.line; in Ox.tokenize, make line and column start at 1, not 0 2012-05-27 21:53:02 +02:00
rolux
51edb6b82a add missing semicolons 2012-05-27 21:33:36 +02:00
rolux
b9f7490436 improve test 2012-05-27 21:32:08 +02:00
rolux
45942cc3f2 fix Ox.isEqual(-0, +0), update tests 2012-05-27 18:59:40 +02:00
rolux
8612218011 remove print statement, make slow tests faster 2012-05-27 18:46:59 +02:00
rolux
b44b2da4d2 use simplified async test syntax 2012-05-27 18:44:00 +02:00
rolux
ba4086bc55 Ox.noop: call the last (not the first) argument in case it is a function - this way it can be used as an async iterator 2012-05-27 18:43:12 +02:00
rolux
a811f29837 add test 2012-05-27 18:41:14 +02:00
rolux
f3b0bb6c86 simplify async test syntax, allow for files with ?random suffix 2012-05-27 18:40:51 +02:00
rolux
f996a24ce2 don't require async tests to also return synchronously 2012-05-27 17:00:18 +02:00
rolux
54694e3d7e add async test for Ox.encodeDeflate 2012-05-27 16:54:50 +02:00
rolux
b4bb926c0c move Ox.parseDuration to String.js 2012-05-27 16:53:23 +02:00
rolux
6a2ac97bec in Ox.test, allow for async tests; in Ox.doc, rename the 'examples' property to 'tests' 2012-05-27 16:52:48 +02:00
rolux
6e7743efd3 move Ox.parseDuration to String.js 2012-05-27 16:51:49 +02:00
rolux
a34c406d78 Date.js: add the missing date argument to Ox.getTimezoneOffset (the current timezone's offset may have been different in the past); return '+0000', not '-0000', in Ox.getTimezoneOffsetString; correct a test for Ox.makeDate 2012-05-27 15:05:24 +02:00
rolux
4b8c1a7d6b Ox.formatDate: better tests for '%s' and '%+', fix '%s', '%Z' and '%z' 2012-05-27 15:01:22 +02:00
rolux
707899b61c add test 2012-05-27 13:42:55 +02:00
rolux
ccae6e4997 reorder regexp, add test 2012-05-27 13:40:19 +02:00
rolux
cc29f8f832 in Ox.sanitizeHTML, allow mailto: links 2012-05-27 13:28:08 +02:00
rolux
17983efc47 in Ox.sanitizeHTML, fix a bug with adding links 2012-05-27 13:11:49 +02:00
rolux
c41afd2f5d Ox.parseHTML -> Ox.sanitizeHTML, Ox.encodeHTML -> Ox.encodeHTMLEntities, Ox.decodeHTML -> Ox.decodeHTMLEntities 2012-05-27 12:40:02 +02:00
rolux
40d1d021d4 remove Ox.encodeHTML and Ox.decodeHTML; move Ox.encodeHTMLEntities and Ox.decodeHTMLEntities to HTML.js 2012-05-27 12:37:09 +02:00
rolux
b93750e325 replace Ox.parseEmailAddresses and Ox.parseURLs with Ox.addLinks; rename Ox.parseHTML to Ox.sanitizeHTML; add Ox.normalizeHTML; update Ox.encodeHTMLEntities and Ox.decodeHTMLEntities so that they also cover the previous Ox.encodeHTML and Ox.decodeHTML 2012-05-27 12:36:16 +02:00
rolux
f94395d652 move Ox.parseURL to String.js and Ox.highlightHTML to HTML.js 2012-05-27 12:31:09 +02:00
rolux
68c06a76bf fix Ox.replaceRegExp 2012-05-26 23:15:09 +02:00
j
61e05f4f86 fix object stringify 2012-05-26 15:47:41 +00:00
rolux
6169a4e6ec in JSON.parse, throw original error 2012-05-26 15:09:57 +02:00
rolux
f37c60b31a json dates have milliseconds 2012-05-26 15:05:35 +02:00
rolux
5c2842e0d4 add Ox.splice 2012-05-26 15:05:11 +02:00
rolux
037685e738 json dates are utc 2012-05-26 14:42:59 +02:00
rolux
12ed2c93fc fix #799: use '(function() {}())', not '(function() {})()' 2012-05-26 14:38:45 +02:00
rolux
5bfc555b9e add Ox.fallback.JSON 2012-05-26 14:33:50 +02:00
rolux
d9c69a0975 improve performance of DocPanel by returning tokens (not source) from Ox.doc and making Ox.SyntaxHighlighter accept tokens 2012-05-26 13:11:06 +02:00
rolux
6b12776ed9 update docs, add tests 2012-05-26 13:02:50 +02:00
rolux
6c98a82800 add Ox.KEYWORDS 2012-05-26 12:55:20 +02:00
rolux
5a2ecca0f1 improve Ox.tokenize, add Ox.identify 2012-05-26 12:54:52 +02:00
rolux
08aedd34fd update docs 2012-05-26 00:44:21 +02:00
rolux
9ffe48b526 move comment out of docs 2012-05-26 00:42:32 +02:00
rolux
5086c5da90 test for undefined 2012-05-26 00:20:43 +02:00
rolux
65c070d6b6 update test, add comments 2012-05-26 00:18:50 +02:00