ninjs 0.13.6 → 0.13.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/ninjs.gemspec +5 -290
- metadata +52 -345
- data/.bundle/config +0 -2
- data/CNAME +0 -1
- data/Gemfile +0 -16
- data/Gemfile.lock +0 -36
- data/LICENSE +0 -29
- data/README.md +0 -348
- data/bin/ninjs +0 -218
- data/lib/ninjs.rb +0 -10
- data/lib/ninjs/command.rb +0 -91
- data/lib/ninjs/configuration.rb +0 -72
- data/lib/ninjs/dependencies.rb +0 -16
- data/lib/ninjs/generator.rb +0 -57
- data/lib/ninjs/helpers.rb +0 -17
- data/lib/ninjs/manifest.rb +0 -9
- data/lib/ninjs/notification.rb +0 -37
- data/lib/ninjs/project.rb +0 -233
- data/repository/jquery/1.1.4.js +0 -2508
- data/repository/jquery/1.2.6.js +0 -32
- data/repository/jquery/1.3.2.js +0 -19
- data/repository/jquery/1.4.2.js +0 -154
- data/repository/jquery/1.4.3.js +0 -166
- data/repository/jquery/1.4.4.js +0 -167
- data/repository/jquery/1.5.js +0 -16
- data/repository/jquery/fancybox/1.3.1.js +0 -1079
- data/repository/jquery/fancybox/assets/1.3.1/css/fancybox.css +0 -363
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/blank.gif +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_close.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_loading.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_nav_left.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_nav_right.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_e.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_n.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_ne.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_nw.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_s.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_se.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_sw.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_w.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_title_left.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_title_main.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_title_over.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_title_right.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancybox-x.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancybox-y.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancybox.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/jquery.easing-1.3.pack.js +0 -72
- data/repository/jquery/fancybox/latest.js +0 -1
- data/repository/jquery/latest.js +0 -1
- data/repository/jquery/mobile/1.0a3.js +0 -123
- data/repository/jquery/mobile/1.0a3/assets/css/jquery.mobile.css +0 -1652
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/ajax-loader.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/form-check-off.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/form-check-on.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/form-radio-off.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/form-radio-on.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/icon-search-black.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/icons-18-black.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/icons-18-white.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/icons-36-black.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/icons-36-white.png +0 -0
- data/repository/jquery/mobile/latest.js +0 -1
- data/repository/jquery/mousewheel/3.0.2.js +0 -11
- data/repository/jquery/mousewheel/latest.js +0 -1
- data/repository/jquery/ui/1.8.7.js +0 -783
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.accordion.css +0 -19
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.all.css +0 -11
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.autocomplete.css +0 -53
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.base.css +0 -11
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.button.css +0 -38
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.core.css +0 -41
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.datepicker.css +0 -68
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.dialog.css +0 -21
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.progressbar.css +0 -11
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.resizable.css +0 -20
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.selectable.css +0 -10
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.slider.css +0 -24
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.tabs.css +0 -18
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.theme.css +0 -252
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-icons_222222_256x240.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-icons_2e83ff_256x240.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-icons_454545_256x240.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-icons_888888_256x240.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-icons_cd0a0a_256x240.png +0 -0
- data/repository/jquery/ui/latest.js +0 -1
- data/repository/json2.js +0 -482
- data/repository/modernizr/1.5.js +0 -28
- data/repository/modernizr/latest.js +0 -1
- data/repository/ninjs/core/.core.pdoc.yaml +0 -0
- data/repository/ninjs/core/.existence.pdoc.yaml +0 -12
- data/repository/ninjs/core/.extend.pdoc.yaml +0 -0
- data/repository/ninjs/core/.nin.pdoc.yaml +0 -0
- data/repository/ninjs/core/application.js +0 -47
- data/repository/ninjs/core/existence.js +0 -277
- data/repository/ninjs/core/extend.js +0 -77
- data/repository/ninjs/core/module.js +0 -135
- data/repository/ninjs/core/nin.js +0 -4
- data/repository/ninjs/docs/Data/ClassHierarchy.nd +0 -0
- data/repository/ninjs/docs/Data/ConfigFileInfo.nd +0 -0
- data/repository/ninjs/docs/Data/FileInfo.nd +0 -16
- data/repository/ninjs/docs/Data/ImageFileInfo.nd +0 -0
- data/repository/ninjs/docs/Data/ImageReferenceTable.nd +0 -0
- data/repository/ninjs/docs/Data/IndexInfo.nd +0 -0
- data/repository/ninjs/docs/Data/PreviousMenuState.nd +0 -0
- data/repository/ninjs/docs/Data/PreviousSettings.nd +0 -0
- data/repository/ninjs/docs/Data/SymbolTable.nd +0 -0
- data/repository/ninjs/docs/Languages.txt +0 -113
- data/repository/ninjs/docs/Menu.txt +0 -63
- data/repository/ninjs/docs/Topics.txt +0 -81
- data/repository/ninjs/docs/files/core/application-js.html +0 -44
- data/repository/ninjs/docs/files/core/existence-js.html +0 -60
- data/repository/ninjs/docs/files/core/extend-js.html +0 -55
- data/repository/ninjs/docs/files/core/module-js.html +0 -80
- data/repository/ninjs/docs/files/core/nin-js.html +0 -38
- data/repository/ninjs/docs/index.html +0 -1
- data/repository/ninjs/docs/index/Classes.html +0 -33
- data/repository/ninjs/docs/index/Files.html +0 -45
- data/repository/ninjs/docs/index/Functions.html +0 -65
- data/repository/ninjs/docs/index/General.html +0 -85
- data/repository/ninjs/docs/index/Variables.html +0 -45
- data/repository/ninjs/docs/javascript/main.js +0 -841
- data/repository/ninjs/docs/javascript/prettify.js +0 -1526
- data/repository/ninjs/docs/javascript/searchdata.js +0 -152
- data/repository/ninjs/docs/search/ClassesN.html +0 -20
- data/repository/ninjs/docs/search/FilesA.html +0 -20
- data/repository/ninjs/docs/search/FilesE.html +0 -20
- data/repository/ninjs/docs/search/FilesM.html +0 -20
- data/repository/ninjs/docs/search/FilesN.html +0 -20
- data/repository/ninjs/docs/search/FunctionsA.html +0 -20
- data/repository/ninjs/docs/search/FunctionsC.html +0 -20
- data/repository/ninjs/docs/search/FunctionsE.html +0 -20
- data/repository/ninjs/docs/search/FunctionsI.html +0 -20
- data/repository/ninjs/docs/search/FunctionsM.html +0 -20
- data/repository/ninjs/docs/search/FunctionsR.html +0 -20
- data/repository/ninjs/docs/search/FunctionsS.html +0 -20
- data/repository/ninjs/docs/search/FunctionsSymbols.html +0 -20
- data/repository/ninjs/docs/search/FunctionsU.html +0 -20
- data/repository/ninjs/docs/search/GeneralA.html +0 -20
- data/repository/ninjs/docs/search/GeneralC.html +0 -20
- data/repository/ninjs/docs/search/GeneralD.html +0 -20
- data/repository/ninjs/docs/search/GeneralE.html +0 -20
- data/repository/ninjs/docs/search/GeneralF.html +0 -20
- data/repository/ninjs/docs/search/GeneralI.html +0 -20
- data/repository/ninjs/docs/search/GeneralM.html +0 -20
- data/repository/ninjs/docs/search/GeneralN.html +0 -20
- data/repository/ninjs/docs/search/GeneralR.html +0 -20
- data/repository/ninjs/docs/search/GeneralS.html +0 -20
- data/repository/ninjs/docs/search/GeneralSymbols.html +0 -20
- data/repository/ninjs/docs/search/GeneralT.html +0 -20
- data/repository/ninjs/docs/search/GeneralU.html +0 -20
- data/repository/ninjs/docs/search/GeneralV.html +0 -20
- data/repository/ninjs/docs/search/NoResults.html +0 -15
- data/repository/ninjs/docs/search/VariablesD.html +0 -20
- data/repository/ninjs/docs/search/VariablesN.html +0 -20
- data/repository/ninjs/docs/search/VariablesR.html +0 -20
- data/repository/ninjs/docs/search/VariablesT.html +0 -20
- data/repository/ninjs/docs/styles/main.css +0 -828
- data/repository/ninjs/extensions/jquery.elements.js +0 -60
- data/repository/ninjs/tests/index.html +0 -21
- data/repository/ninjs/tests/ninjs.test.js +0 -188
- data/repository/ninjs/tests/ninjs.utilities.test.js +0 -137
- data/repository/ninjs/tests/qunit/qunit.css +0 -197
- data/repository/ninjs/tests/qunit/qunit.js +0 -1415
- data/repository/ninjs/utilities/all.js +0 -5
- data/repository/ninjs/utilities/array.js +0 -29
- data/repository/ninjs/utilities/cookie.js +0 -0
- data/repository/ninjs/utilities/css.js +0 -51
- data/repository/ninjs/utilities/number.js +0 -11
- data/repository/ninjs/utilities/string.js +0 -61
- data/repository/nullconsole.js +0 -7
- data/repository/qunit/assets/css/qunit.css +0 -196
- data/repository/qunit/qunit.js +0 -1374
- data/repository/selectivizr/1.0.js +0 -5
- data/repository/selectivizr/latest.js +0 -1
- data/repository/syntaxhighlighter/all.js +0 -11
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCore.css +0 -226
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreDefault.css +0 -328
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreDjango.css +0 -331
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreEclipse.css +0 -339
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreEmacs.css +0 -324
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreFadeToGrey.css +0 -328
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreMDUltra.css +0 -324
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreMidnight.css +0 -324
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreRDark.css +0 -324
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeDefault.css +0 -117
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeDjango.css +0 -120
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeEclipse.css +0 -128
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeEmacs.css +0 -113
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeFadeToGrey.css +0 -117
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeMDUltra.css +0 -113
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeMidnight.css +0 -113
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeRDark.css +0 -113
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCore.scss +0 -216
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreDefault.scss +0 -2
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreDjango.scss +0 -2
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreEclipse.scss +0 -2
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreEmacs.scss +0 -2
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreFadeToGrey.scss +0 -2
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreMDUltra.scss +0 -2
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreMidnight.scss +0 -2
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreRDark.scss +0 -2
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeDefault.scss +0 -7
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeDjango.scss +0 -36
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeEclipse.scss +0 -48
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeEmacs.scss +0 -32
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeFadeToGrey.scss +0 -36
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeMDUltra.scss +0 -32
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeMidnight.scss +0 -32
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeRDark.scss +0 -32
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_theme_template.scss +0 -120
- data/repository/syntaxhighlighter/shAutoloader.js +0 -17
- data/repository/syntaxhighlighter/shBrushAS3.js +0 -59
- data/repository/syntaxhighlighter/shBrushAppleScript.js +0 -75
- data/repository/syntaxhighlighter/shBrushBash.js +0 -59
- data/repository/syntaxhighlighter/shBrushCSharp.js +0 -65
- data/repository/syntaxhighlighter/shBrushColdFusion.js +0 -100
- data/repository/syntaxhighlighter/shBrushCpp.js +0 -97
- data/repository/syntaxhighlighter/shBrushCss.js +0 -91
- data/repository/syntaxhighlighter/shBrushDelphi.js +0 -55
- data/repository/syntaxhighlighter/shBrushDiff.js +0 -41
- data/repository/syntaxhighlighter/shBrushErlang.js +0 -52
- data/repository/syntaxhighlighter/shBrushGroovy.js +0 -67
- data/repository/syntaxhighlighter/shBrushJScript.js +0 -52
- data/repository/syntaxhighlighter/shBrushJava.js +0 -57
- data/repository/syntaxhighlighter/shBrushJavaFX.js +0 -58
- data/repository/syntaxhighlighter/shBrushPerl.js +0 -72
- data/repository/syntaxhighlighter/shBrushPhp.js +0 -88
- data/repository/syntaxhighlighter/shBrushPlain.js +0 -33
- data/repository/syntaxhighlighter/shBrushPowerShell.js +0 -74
- data/repository/syntaxhighlighter/shBrushPython.js +0 -64
- data/repository/syntaxhighlighter/shBrushRuby.js +0 -55
- data/repository/syntaxhighlighter/shBrushSass.js +0 -94
- data/repository/syntaxhighlighter/shBrushScala.js +0 -51
- data/repository/syntaxhighlighter/shBrushSql.js +0 -66
- data/repository/syntaxhighlighter/shBrushVb.js +0 -56
- data/repository/syntaxhighlighter/shBrushXml.js +0 -69
- data/repository/syntaxhighlighter/shCore.js +0 -17
- data/repository/syntaxhighlighter/shLegacy.js +0 -17
- data/spec/fixtures/global.js +0 -7
- data/spec/fixtures/global.module.js +0 -7
- data/spec/fixtures/myapplication.js +0 -576
- data/spec/fixtures/nin.js +0 -573
- data/spec/fixtures/ninjs.conf +0 -6
- data/spec/fixtures/test.elements.js +0 -4
- data/spec/fixtures/test.js +0 -15
- data/spec/fixtures/test.model.js +0 -3
- data/spec/fixtures/test.module.js +0 -10
- data/spec/fixtures/updated.myapplication.js +0 -27
- data/spec/fixtures/utilities.js +0 -162
- data/spec/helpers_spec.rb +0 -11
- data/spec/integration_spec.rb +0 -257
- data/spec/manifest_spec.rb +0 -8
- data/spec/ninjs_spec.rb +0 -36
- data/spec/notification_spec.rb +0 -27
- data/spec/spec_helper.rb +0 -5
- data/tmp/ff9e83aa019b712b90200b8d1b8fa0c7e14576af.json +0 -1
- data/tmp/metric_fu/_data/20110305.yml +0 -1548
- data/tmp/metric_fu/output/bluff-min.js +0 -1
- data/tmp/metric_fu/output/excanvas.js +0 -35
- data/tmp/metric_fu/output/js-class.js +0 -1
- data/tmp/metric_fu/output/lib_ninjs_dependencies.rb.html +0 -34
- data/tmp/metric_fu/output/lib_ninjs_helpers.rb.html +0 -34
- data/tmp/metric_fu/output/lib_ninjs_manifest.rb.html +0 -27
- data/tmp/metric_fu/output/rails_best_practices.js +0 -11
- data/tmp/metric_fu/scratch/rcov/rcov.txt +0 -1
data/repository/modernizr/1.5.js
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Modernizr JavaScript library 1.5
|
3
|
-
* http://www.modernizr.com/
|
4
|
-
*
|
5
|
-
* Copyright (c) 2009-2010 Faruk Ates - http://farukat.es/
|
6
|
-
* Dual-licensed under the BSD and MIT licenses.
|
7
|
-
* http://www.modernizr.com/license/
|
8
|
-
*
|
9
|
-
* Featuring major contributions by
|
10
|
-
* Paul Irish - http://paulirish.com
|
11
|
-
*/
|
12
|
-
window.Modernizr=function(i,e,I){function C(a,b){for(var c in a)if(m[a[c]]!==I&&(!b||b(a[c],D)))return true}function r(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1);return!!C([a,"Webkit"+c,"Moz"+c,"O"+c,"ms"+c,"Khtml"+c],b)}function P(){j[E]=function(a){for(var b=0,c=a.length;b<c;b++)J[a[b]]=!!(a[b]in n);return J}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));j[Q]=function(a){for(var b=0,c,h=a.length;b<h;b++){n.setAttribute("type",a[b]);if(c=n.type!==
|
13
|
-
"text"){n.value=K;/tel|search/.test(n.type)||(c=/url|email/.test(n.type)?n.checkValidity&&n.checkValidity()===false:n.value!=K)}L[a[b]]=!!c}return L}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var j={},s=e.documentElement,D=e.createElement("modernizr"),m=D.style,n=e.createElement("input"),E="input",Q=E+"types",K=":)",M=Object.prototype.toString,y=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),d={},L={},J={},N=[],u=function(){var a={select:"input",
|
14
|
-
change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},b={};return function(c,h){var t=arguments.length==1;if(t&&b[c])return b[c];h=h||document.createElement(a[c]||"div");c="on"+c;var g=c in h;if(!g&&h.setAttribute){h.setAttribute(c,"return;");g=typeof h[c]=="function"}h=null;return t?(b[c]=g):g}}(),F={}.hasOwnProperty,O;O=typeof F!=="undefined"&&typeof F.call!=="undefined"?function(a,b){return F.call(a,b)}:function(a,b){return b in a&&typeof a.constructor.prototype[b]==="undefined"};
|
15
|
-
d.canvas=function(){return!!e.createElement("canvas").getContext};d.canvastext=function(){return!!(d.canvas()&&typeof e.createElement("canvas").getContext("2d").fillText=="function")};d.geolocation=function(){return!!navigator.geolocation};d.crosswindowmessaging=function(){return!!i.postMessage};d.websqldatabase=function(){var a=!!i.openDatabase;if(a)try{a=!!openDatabase("testdb","1.0","html5 test db",2E5)}catch(b){a=false}return a};d.indexedDB=function(){return!!i.indexedDB};d.hashchange=function(){return u("hashchange",
|
16
|
-
i)&&(document.documentMode===I||document.documentMode>7)};d.historymanagement=function(){return!!(i.history&&history.pushState)};d.draganddrop=function(){return u("drag")&&u("dragstart")&&u("dragenter")&&u("dragover")&&u("dragleave")&&u("dragend")&&u("drop")};d.websockets=function(){return"WebSocket"in i};d.rgba=function(){m.cssText="background-color:rgba(150,255,150,.5)";return(""+m.backgroundColor).indexOf("rgba")!==-1};d.hsla=function(){m.cssText="background-color:hsla(120,40%,100%,.5)";return(""+
|
17
|
-
m.backgroundColor).indexOf("rgba")!==-1};d.multiplebgs=function(){m.cssText="background:url(//:),url(//:),red url(//:)";return/(url\s*\(.*?){3}/.test(m.background)};d.backgroundsize=function(){return r("backgroundSize")};d.borderimage=function(){return r("borderImage")};d.borderradius=function(){return r("borderRadius","",function(a){return(""+a).indexOf("orderRadius")!==-1})};d.boxshadow=function(){return r("boxShadow")};d.opacity=function(){var a=y.join("opacity:.5;")+"";m.cssText=a;return(""+m.opacity).indexOf("0.5")!==
|
18
|
-
-1};d.cssanimations=function(){return r("animationName")};d.csscolumns=function(){return r("columnCount")};d.cssgradients=function(){var a=("background-image:"+y.join("gradient(linear,left top,right bottom,from(#9f9),to(white));background-image:")+y.join("linear-gradient(left top,#9f9, white);background-image:")).slice(0,-17);m.cssText=a;return(""+m.backgroundImage).indexOf("gradient")!==-1};d.cssreflections=function(){return r("boxReflect")};d.csstransforms=function(){return!!C(["transformProperty",
|
19
|
-
"WebkitTransform","MozTransform","OTransform","msTransform"])};d.csstransforms3d=function(){var a=!!C(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);if(a){var b=document.createElement("style"),c=e.createElement("div");b.textContent="@media ("+y.join("transform-3d),(")+"modernizr){#modernizr{height:3px}}";e.getElementsByTagName("head")[0].appendChild(b);c.id="modernizr";s.appendChild(c);a=c.offsetHeight===3;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}return a};
|
20
|
-
d.csstransitions=function(){return r("transitionProperty")};d.fontface=function(){var a;if(/*@cc_on@if(@_jscript_version>=5)!@end@*/0)a=true;else{var b=e.createElement("style"),c=e.createElement("span"),h,t=false,g=e.body,o,w;b.textContent="@font-face{font-family:testfont;src:url('data:font/ttf;base64,AAEAAAAMAIAAAwBAT1MvMliohmwAAADMAAAAVmNtYXCp5qrBAAABJAAAANhjdnQgACICiAAAAfwAAAAEZ2FzcP//AAMAAAIAAAAACGdseWYv5OZoAAACCAAAANxoZWFk69bnvwAAAuQAAAA2aGhlYQUJAt8AAAMcAAAAJGhtdHgGDgC4AAADQAAAABRsb2NhAIQAwgAAA1QAAAAMbWF4cABVANgAAANgAAAAIG5hbWUgXduAAAADgAAABPVwb3N03NkzmgAACHgAAAA4AAECBAEsAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAMDAAAAAAAAgAACbwAAAAoAAAAAAAAAAFBmRWQAAAAgqS8DM/8zAFwDMwDNAAAABQAAAAAAAAAAAAMAAAADAAAAHAABAAAAAABGAAMAAQAAAK4ABAAqAAAABgAEAAEAAgAuqQD//wAAAC6pAP///9ZXAwAAAAAAAAACAAAABgBoAAAAAAAvAAEAAAAAAAAAAAAAAAAAAAABAAIAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEACoAAAAGAAQAAQACAC6pAP//AAAALqkA////1lcDAAAAAAAAAAIAAAAiAogAAAAB//8AAgACACIAAAEyAqoAAwAHAC6xAQAvPLIHBADtMrEGBdw8sgMCAO0yALEDAC88sgUEAO0ysgcGAfw8sgECAO0yMxEhESczESMiARDuzMwCqv1WIgJmAAACAFUAAAIRAc0ADwAfAAATFRQWOwEyNj0BNCYrASIGARQGKwEiJj0BNDY7ATIWFX8aIvAiGhoi8CIaAZIoN/43KCg3/jcoAWD0JB4eJPQkHh7++EY2NkbVRjY2RgAAAAABAEH/+QCdAEEACQAANjQ2MzIWFAYjIkEeEA8fHw8QDxwWFhwWAAAAAQAAAAIAAIuYbWpfDzz1AAsEAAAAAADFn9IuAAAAAMWf0i797/8zA4gDMwAAAAgAAgAAAAAAAAABAAADM/8zAFwDx/3v/98DiAABAAAAAAAAAAAAAAAAAAAABQF2ACIAAAAAAVUAAAJmAFUA3QBBAAAAKgAqACoAWgBuAAEAAAAFAFAABwBUAAQAAgAAAAEAAQAAAEAALgADAAMAAAAQAMYAAQAAAAAAAACLAAAAAQAAAAAAAQAhAIsAAQAAAAAAAgAFAKwAAQAAAAAAAwBDALEAAQAAAAAABAAnAPQAAQAAAAAABQAKARsAAQAAAAAABgAmASUAAQAAAAAADgAaAUsAAwABBAkAAAEWAWUAAwABBAkAAQBCAnsAAwABBAkAAgAKAr0AAwABBAkAAwCGAscAAwABBAkABABOA00AAwABBAkABQAUA5sAAwABBAkABgBMA68AAwABBAkADgA0A/tDb3B5cmlnaHQgMjAwOSBieSBEYW5pZWwgSm9obnNvbi4gIFJlbGVhc2VkIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgT3BlbiBGb250IExpY2Vuc2UuIEtheWFoIExpIGdseXBocyBhcmUgcmVsZWFzZWQgdW5kZXIgdGhlIEdQTCB2ZXJzaW9uIDMuYmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhTGlnaHRiYWVjMmE5MmJmZmU1MDMyIC0gc3Vic2V0IG9mIEZvbnRGb3JnZSAyLjAgOiBKdXJhIExpZ2h0IDogMjMtMS0yMDA5YmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhIExpZ2h0VmVyc2lvbiAyIGJhZWMyYTkyYmZmZTUwMzIgLSBzdWJzZXQgb2YgSnVyYUxpZ2h0aHR0cDovL3NjcmlwdHMuc2lsLm9yZy9PRkwAQwBvAHAAeQByAGkAZwBoAHQAIAAyADAAMAA5ACAAYgB5ACAARABhAG4AaQBlAGwAIABKAG8AaABuAHMAbwBuAC4AIAAgAFIAZQBsAGUAYQBzAGUAZAAgAHUAbgBkAGUAcgAgAHQAaABlACAAdABlAHIAbQBzACAAbwBmACAAdABoAGUAIABPAHAAZQBuACAARgBvAG4AdAAgAEwAaQBjAGUAbgBzAGUALgAgAEsAYQB5AGEAaAAgAEwAaQAgAGcAbAB5AHAAaABzACAAYQByAGUAIAByAGUAbABlAGEAcwBlAGQAIAB1AG4AZABlAHIAIAB0AGgAZQAgAEcAUABMACAAdgBlAHIAcwBpAG8AbgAgADMALgBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQBMAGkAZwBoAHQAYgBhAGUAYwAyAGEAOQAyAGIAZgBmAGUANQAwADMAMgAgAC0AIABzAHUAYgBzAGUAdAAgAG8AZgAgAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAASgB1AHIAYQAgAEwAaQBnAGgAdAAgADoAIAAyADMALQAxAC0AMgAwADAAOQBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQAgAEwAaQBnAGgAdABWAGUAcgBzAGkAbwBuACAAMgAgAGIAYQBlAGMAMgBhADkAMgBiAGYAZgBlADUAMAAzADIAIAAtACAAcwB1AGIAcwBlAHQAIABvAGYAIABKAHUAcgBhAEwAaQBnAGgAdABoAHQAdABwADoALwAvAHMAYwByAGkAcAB0AHMALgBzAGkAbAAuAG8AcgBnAC8ATwBGAEwAAAAAAgAAAAAAAP+BADMAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQACAQIAEQt6ZXJva2F5YWhsaQ==')}";
|
21
|
-
e.getElementsByTagName("head")[0].appendChild(b);c.setAttribute("style","font:99px _,arial,helvetica;position:absolute;visibility:hidden");if(!g){g=s.appendChild(e.createElement("fontface"));t=true}c.innerHTML="........";c.id="fonttest";g.appendChild(c);h=c.offsetWidth*c.offsetHeight;c.style.font="99px testfont,_,arial,helvetica";a=h!==c.offsetWidth*c.offsetHeight;var v=function(){if(g.parentNode){a=j.fontface=h!==c.offsetWidth*c.offsetHeight;s.className=s.className.replace(/(no-)?fontface\b/,"")+
|
22
|
-
(a?" ":" no-")+"fontface"}};setTimeout(v,75);setTimeout(v,150);addEventListener("load",function(){v();(w=true)&&o&&o(a);setTimeout(function(){t||(g=c);g.parentNode.removeChild(g);b.parentNode.removeChild(b)},50)},false)}j._fontfaceready=function(p){w||a?p(a):(o=p)};return a||h!==c.offsetWidth};d.video=function(){var a=e.createElement("video"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('video/ogg; codecs="theora"');b.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"');b.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return b};
|
23
|
-
d.audio=function(){var a=e.createElement("audio"),b=!!a.canPlayType;if(b){b=new Boolean(b);b.ogg=a.canPlayType('audio/ogg; codecs="vorbis"');b.mp3=a.canPlayType("audio/mpeg;");b.wav=a.canPlayType('audio/wav; codecs="1"');b.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}return b};d.localStorage=function(){return"localStorage"in i&&i.localStorage!==null};d.sessionStorage=function(){try{return"sessionStorage"in i&&i.sessionStorage!==null}catch(a){return false}};d.webworkers=function(){return!!i.Worker};
|
24
|
-
d.applicationCache=function(){var a=i.applicationCache;return!!(a&&typeof a.status!="undefined"&&typeof a.update=="function"&&typeof a.swapCache=="function")};d.svg=function(){return!!e.createElementNS&&!!e.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect};d.smil=function(){return!!e.createElementNS&&/SVG/.test(M.call(e.createElementNS("http://www.w3.org/2000/svg","animate")))};d.svgclippaths=function(){return!!e.createElementNS&&/SVG/.test(M.call(e.createElementNS("http://www.w3.org/2000/svg",
|
25
|
-
"clipPath")))};for(var z in d)if(O(d,z))N.push(((j[z.toLowerCase()]=d[z]())?"":"no-")+z.toLowerCase());j[E]||P();j.addTest=function(a,b){a=a.toLowerCase();if(!j[a]){b=!!b();s.className+=" "+(b?"":"no-")+a;j[a]=b;return j}};m.cssText="";D=n=null;(function(){var a=e.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1})()&&function(a,b){function c(f,k){if(o[f])o[f].styleSheet.cssText+=k;else{var l=t[G],q=b[A]("style");q.media=f;l.insertBefore(q,l[G]);o[f]=q;c(f,k)}}function h(f,
|
26
|
-
k){for(var l=new RegExp("\\b("+w+")\\b(?!.*[;}])","gi"),q=function(B){return".iepp_"+B},x=-1;++x<f.length;){k=f[x].media||k;h(f[x].imports,k);c(k,f[x].cssText.replace(l,q))}}for(var t=b.documentElement,g=b.createDocumentFragment(),o={},w="abbr|article|aside|audio|canvas|command|datalist|details|figure|figcaption|footer|header|hgroup|keygen|mark|meter|nav|output|progress|section|source|summary|time|video",v=w.split("|"),p=[],H=-1,G="firstChild",A="createElement";++H<v.length;){b[A](v[H]);g[A](v[H])}g=
|
27
|
-
g.appendChild(b[A]("div"));a.attachEvent("onbeforeprint",function(){for(var f,k=b.getElementsByTagName("*"),l,q,x=new RegExp("^"+w+"$","i"),B=-1;++B<k.length;)if((f=k[B])&&(q=f.nodeName.match(x))){l=new RegExp("^\\s*<"+q+"(.*)\\/"+q+">\\s*$","i");g.innerHTML=f.outerHTML.replace(/\r|\n/g," ").replace(l,f.currentStyle.display=="block"?"<div$1/div>":"<span$1/span>");l=g.childNodes[0];l.className+=" iepp_"+q;l=p[p.length]=[f,l];f.parentNode.replaceChild(l[1],l[0])}h(b.styleSheets,"all")});a.attachEvent("onafterprint",
|
28
|
-
function(){for(var f=-1,k;++f<p.length;)p[f][1].parentNode.replaceChild(p[f][0],p[f][1]);for(k in o)t[G].removeChild(o[k]);o={};p=[]})}(this,e);j._enableHTML5=true;j._version="1.5";s.className=s.className.replace(/\bno-js\b/,"")+" js";s.className+=" "+N.join(" ");return j}(this,this.document);
|
@@ -1 +0,0 @@
|
|
1
|
-
//= require "1.5"
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,47 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
File: application.js
|
3
|
-
|
4
|
-
Class: NinjsApplication
|
5
|
-
An NinjsApplication object serves as your application's namespace and includes a utility to add modules to the application object.
|
6
|
-
|
7
|
-
See Also:
|
8
|
-
<NinjsModule>
|
9
|
-
*/
|
10
|
-
|
11
|
-
var NinjsApplication = function(base_url, tests_path) {
|
12
|
-
if(is_defined(tests_path)) {
|
13
|
-
this.tests_path = tests_path;
|
14
|
-
}
|
15
|
-
|
16
|
-
if(is_defined(base_url)) {
|
17
|
-
this.site_url = function(path) {
|
18
|
-
var path = path || '';
|
19
|
-
return base_url + path;
|
20
|
-
};
|
21
|
-
}
|
22
|
-
};
|
23
|
-
|
24
|
-
/*
|
25
|
-
Method: add_module
|
26
|
-
Adds a NinjsModule to the application.
|
27
|
-
|
28
|
-
Parameters:
|
29
|
-
name - the name of the module
|
30
|
-
|
31
|
-
> myapp.add_module('my_module');
|
32
|
-
*/
|
33
|
-
NinjsApplication.method('add_module', function(name) {
|
34
|
-
if (is_undefined(name)) {
|
35
|
-
throw new SyntaxError("NinjsApplication.add_module(name): name is undefined");
|
36
|
-
}
|
37
|
-
|
38
|
-
if (is_defined(this[name])) {
|
39
|
-
throw new SyntaxError("NinjsApplication.add_module(name): '" + name + "' already declared");
|
40
|
-
}
|
41
|
-
|
42
|
-
if (this.name === name) {
|
43
|
-
throw new SyntaxError("NinjsApplication.add_module(name): a module cannot have the same name as the application");
|
44
|
-
}
|
45
|
-
|
46
|
-
return this[name] = new NinjsModule(name);
|
47
|
-
});
|
@@ -1,277 +0,0 @@
|
|
1
|
-
/* File: existence.js */
|
2
|
-
if (is_defined === undefined) {
|
3
|
-
/*
|
4
|
-
Function: is_defined
|
5
|
-
Checks if a variable is undefined. This is a convenience method to enhance clarity in your conditions.
|
6
|
-
|
7
|
-
Parameters:
|
8
|
-
suspect - suspect variable to test
|
9
|
-
|
10
|
-
Returns:
|
11
|
-
bool
|
12
|
-
|
13
|
-
See Also:
|
14
|
-
|
15
|
-
<is_undefined>
|
16
|
-
*/
|
17
|
-
var is_defined = function(suspect) {
|
18
|
-
return ((suspect === undefined) || (suspect === null)) ? false : true;
|
19
|
-
};
|
20
|
-
}
|
21
|
-
|
22
|
-
if (!is_defined(is_undefined)) {
|
23
|
-
/*
|
24
|
-
Function: is_undefined
|
25
|
-
Checks if a variable is defined. This is a convenience method to enhance clarity in your conditions.
|
26
|
-
|
27
|
-
Parameters:
|
28
|
-
suspect - suspect variable to test
|
29
|
-
|
30
|
-
Returns:
|
31
|
-
bool
|
32
|
-
|
33
|
-
See Also:
|
34
|
-
|
35
|
-
<is_defined>
|
36
|
-
*/
|
37
|
-
var is_undefined = function(suspect) {
|
38
|
-
return (suspect === undefined) ? true : false;
|
39
|
-
};
|
40
|
-
}
|
41
|
-
|
42
|
-
if (is_undefined(is_typeof)) {
|
43
|
-
/*
|
44
|
-
Function: is_typeof
|
45
|
-
Strict type checking by comparing constructors.
|
46
|
-
(Pro Javascript Techniques, John Resig, Apress p.24 Listing 2-8: Example of using the constructor property to determine the type of an object http://amzn.to/fTsDRg)
|
47
|
-
Parameters:
|
48
|
-
type - The type you expect (ie. String, Number, Array (note: without quotes): is_typeof(String, 'hello'): // true)
|
49
|
-
suspect - The suspect variable to check against type
|
50
|
-
|
51
|
-
Returns:
|
52
|
-
bool
|
53
|
-
|
54
|
-
See Also:
|
55
|
-
<is_numeric>,
|
56
|
-
<is_string>,
|
57
|
-
<is_array>,
|
58
|
-
<is_number>,
|
59
|
-
<is_date>,
|
60
|
-
<is_bool>,
|
61
|
-
<is_regex>
|
62
|
-
*/
|
63
|
-
var is_typeof = function(type, suspect) {
|
64
|
-
if (is_undefined(type)) {
|
65
|
-
throw new SyntaxError("is_typeof(Type, suspect): type is undefined");
|
66
|
-
}
|
67
|
-
if (is_undefined(suspect)) {
|
68
|
-
throw new SyntaxError("is_typeof(Type, suspect): suspect is undefined");
|
69
|
-
}
|
70
|
-
|
71
|
-
return (suspect.constructor == type) ? true : false;
|
72
|
-
};
|
73
|
-
}
|
74
|
-
|
75
|
-
if (is_undefined(is_numeric)) {
|
76
|
-
/*
|
77
|
-
Function: is_numeric
|
78
|
-
Determine if the suspect string represents a numeric value.
|
79
|
-
(JavaScript: The Good Parts, Douglas Crockford, O'Reilly p.69 Chapter 7: Regular Expressions An Example)
|
80
|
-
Parameters:
|
81
|
-
suspect - variable to check for numeric value
|
82
|
-
|
83
|
-
Returns:
|
84
|
-
bool
|
85
|
-
|
86
|
-
See Also:
|
87
|
-
<is_number>
|
88
|
-
*/
|
89
|
-
var is_numeric = function(suspect) {
|
90
|
-
if(is_typeof(Number, suspect)) {
|
91
|
-
return true;
|
92
|
-
}
|
93
|
-
else {
|
94
|
-
var pattern = /^-?\d+(?:\.\d*)?(?:e[+\-]?\d+)?$/i;
|
95
|
-
return pattern.test(suspect);
|
96
|
-
}
|
97
|
-
};
|
98
|
-
}
|
99
|
-
|
100
|
-
if (is_undefined(is_string)) {
|
101
|
-
/*
|
102
|
-
Function: is_string
|
103
|
-
Determine the suspect is a String. This is a proxy method for is_typeof(String, suspect).
|
104
|
-
|
105
|
-
Parameters:
|
106
|
-
suspect - supect variable to test
|
107
|
-
|
108
|
-
Returns:
|
109
|
-
bool
|
110
|
-
|
111
|
-
See Also:
|
112
|
-
<is_typeof>,
|
113
|
-
<is_numeric>,
|
114
|
-
<is_array>,
|
115
|
-
<is_number>,
|
116
|
-
<is_date>,
|
117
|
-
<is_bool>,
|
118
|
-
<is_regex>
|
119
|
-
*/
|
120
|
-
var is_string = function(suspect) {
|
121
|
-
return is_typeof(String, suspect);
|
122
|
-
};
|
123
|
-
}
|
124
|
-
|
125
|
-
if (is_undefined(is_array)) {
|
126
|
-
/*
|
127
|
-
Function: is_array
|
128
|
-
Determine if the suspect is an Array. This is a proxy method for is_typeof(Array, suspect).
|
129
|
-
|
130
|
-
Parameters:
|
131
|
-
suspect - suspect variable to test
|
132
|
-
|
133
|
-
Returns:
|
134
|
-
bool
|
135
|
-
|
136
|
-
See Also:
|
137
|
-
<is_typeof>,
|
138
|
-
<is_numeric>,
|
139
|
-
<is_string>,
|
140
|
-
<is_number>,
|
141
|
-
<is_date>,
|
142
|
-
<is_bool>,
|
143
|
-
<is_regex>
|
144
|
-
*/
|
145
|
-
var is_array = function(suspect) {
|
146
|
-
return is_typeof(Array, suspect);
|
147
|
-
};
|
148
|
-
}
|
149
|
-
|
150
|
-
if (is_undefined(is_number)) {
|
151
|
-
/*
|
152
|
-
Function: is_number
|
153
|
-
Determines if the suspect is a Number. This is a proxy method for is_typeof(Number, suspect).
|
154
|
-
|
155
|
-
Parameters:
|
156
|
-
suspect - suspect variable to test
|
157
|
-
|
158
|
-
Returns:
|
159
|
-
bool
|
160
|
-
|
161
|
-
See Also:
|
162
|
-
<is_typeof>,
|
163
|
-
<is_numeric>,
|
164
|
-
<is_string>,
|
165
|
-
<is_array>,
|
166
|
-
<is_date>,
|
167
|
-
<is_bool>,
|
168
|
-
<is_regex>
|
169
|
-
*/
|
170
|
-
var is_number = function(suspect) {
|
171
|
-
return is_typeof(Number, suspect);
|
172
|
-
};
|
173
|
-
}
|
174
|
-
|
175
|
-
if (is_undefined(is_date)) {
|
176
|
-
/*
|
177
|
-
Function: is_date
|
178
|
-
Determines if the suspect is a Date. This is a proxy method for is_typeof(Date, suspect).
|
179
|
-
|
180
|
-
Parameters:
|
181
|
-
suspect - suspect variable to test
|
182
|
-
|
183
|
-
Returns:
|
184
|
-
bool
|
185
|
-
|
186
|
-
See Also:
|
187
|
-
<is_typeof>,
|
188
|
-
<is_numeric>,
|
189
|
-
<is_string>,
|
190
|
-
<is_array>,
|
191
|
-
<is_number>,
|
192
|
-
<is_bool>,
|
193
|
-
<is_regex>
|
194
|
-
*/
|
195
|
-
var is_date = function(suspect) {
|
196
|
-
return is_typeof(Date, suspect);
|
197
|
-
};
|
198
|
-
}
|
199
|
-
|
200
|
-
if (is_undefined(is_bool)) {
|
201
|
-
/*
|
202
|
-
Function: is_bool
|
203
|
-
Determines if the suspect is a Boolean. This is a proxy method for is_typeof(Boolean, suspect).
|
204
|
-
|
205
|
-
Parameters:
|
206
|
-
suspect - suspect variable to test
|
207
|
-
|
208
|
-
Returns:
|
209
|
-
bool
|
210
|
-
|
211
|
-
See Also:
|
212
|
-
<is_typeof>,
|
213
|
-
<is_numeric>,
|
214
|
-
<is_string>,
|
215
|
-
<is_array>,
|
216
|
-
<is_number>,
|
217
|
-
<is_regex>
|
218
|
-
*/
|
219
|
-
var is_bool = function(suspect) {
|
220
|
-
return is_typeof(Boolean, suspect);
|
221
|
-
};
|
222
|
-
}
|
223
|
-
|
224
|
-
if (is_undefined(is_regex)) {
|
225
|
-
/*
|
226
|
-
Function: is_regex
|
227
|
-
Determines if the suspect is a RegExp. This is a proxy method for is_typeof(RegExp, suspect).
|
228
|
-
|
229
|
-
Parameters:
|
230
|
-
suspect - suspect variable to test
|
231
|
-
|
232
|
-
Returns:
|
233
|
-
bool
|
234
|
-
|
235
|
-
See Also:
|
236
|
-
<is_typeof>,
|
237
|
-
<is_numeric>,
|
238
|
-
<is_string>,
|
239
|
-
<is_array>,
|
240
|
-
<is_number>,
|
241
|
-
<is_bool>
|
242
|
-
*/
|
243
|
-
var is_regex = function(suspect) {
|
244
|
-
return is_typeof(RegExp, suspect);
|
245
|
-
};
|
246
|
-
}
|
247
|
-
|
248
|
-
|
249
|
-
if (is_undefined(is_empty)) {
|
250
|
-
/*
|
251
|
-
Function: is_empty
|
252
|
-
Determined if the suspect's length is less than one.
|
253
|
-
|
254
|
-
Parameters:
|
255
|
-
suspect - suspect variable to test
|
256
|
-
|
257
|
-
Returns: bool
|
258
|
-
*/
|
259
|
-
var is_empty = function(suspect) {
|
260
|
-
return suspect.length === 0;
|
261
|
-
};
|
262
|
-
}
|
263
|
-
|
264
|
-
if (is_undefined(is_not_empty)) {
|
265
|
-
/*
|
266
|
-
Function: is_not_empty
|
267
|
-
Determined if the suspect's length is greater than one.
|
268
|
-
|
269
|
-
Parameters:
|
270
|
-
suspect - suspect variable to test
|
271
|
-
|
272
|
-
Returns: bool
|
273
|
-
*/
|
274
|
-
var is_not_empty = function(suspect) {
|
275
|
-
return suspect.length >= 1;
|
276
|
-
};
|
277
|
-
}
|
@@ -1,77 +0,0 @@
|
|
1
|
-
/* File: extend.js */
|
2
|
-
//= require "existence"
|
3
|
-
|
4
|
-
if (is_undefined(Function.prototype['method'])) {
|
5
|
-
/*
|
6
|
-
Function: method
|
7
|
-
Method to add a method to an object (ie. String.method('my_method', my_func); // 'hello'.my_method())
|
8
|
-
|
9
|
-
Parameters:
|
10
|
-
name - name of the method
|
11
|
-
func - function definition
|
12
|
-
|
13
|
-
Returns:
|
14
|
-
this (chainable)
|
15
|
-
|
16
|
-
> String.method('custom_method', function() {
|
17
|
-
> // define custom_method
|
18
|
-
> });
|
19
|
-
>
|
20
|
-
> "hello".custom_method();
|
21
|
-
*/
|
22
|
-
Function.prototype.method = function(name, func) {
|
23
|
-
if (is_undefined(name)) {
|
24
|
-
throw new SyntaxError("Object.method(name, func): name is undefined");
|
25
|
-
}
|
26
|
-
|
27
|
-
if (is_undefined(func)) {
|
28
|
-
throw new SyntaxError("Object.method(name, func): func is undefined");
|
29
|
-
}
|
30
|
-
|
31
|
-
if (is_undefined(this.prototype[name])) {
|
32
|
-
this.prototype[name] = func;
|
33
|
-
return this;
|
34
|
-
}
|
35
|
-
};
|
36
|
-
}
|
37
|
-
|
38
|
-
if (is_undefined(unless)) {
|
39
|
-
/*
|
40
|
-
Function: unless
|
41
|
-
Function to better express negative conditions (ie. if (!something))
|
42
|
-
|
43
|
-
Parameters:
|
44
|
-
expression - expression to be tested
|
45
|
-
callback - function to be executed unless expression is true (see how that works)
|
46
|
-
fallback - function to be executed if the expression is false (optional)
|
47
|
-
|
48
|
-
Returns:
|
49
|
-
undefined
|
50
|
-
|
51
|
-
> unless(test_expression === 'some condition',
|
52
|
-
> function() {
|
53
|
-
> alert('we do something');
|
54
|
-
> },
|
55
|
-
> function() {
|
56
|
-
> alert('we can do something if it meets the condition too');
|
57
|
-
> }
|
58
|
-
> );
|
59
|
-
*/
|
60
|
-
var unless = function(expression, callback, fallback) {
|
61
|
-
if (is_undefined(expression)) {
|
62
|
-
throw new SyntaxError("unless(expression, callback[, fallback]): expression is undefined");
|
63
|
-
}
|
64
|
-
|
65
|
-
if (is_undefined(callback)) {
|
66
|
-
throw new SyntaxError("unless(expression, callback[, fallback]): callback is undefined");
|
67
|
-
}
|
68
|
-
|
69
|
-
// This kind of expression is exactly why we NEED unless
|
70
|
-
if (!expression) {
|
71
|
-
callback.call(this);
|
72
|
-
}
|
73
|
-
else if (is_defined(fallback)) {
|
74
|
-
fallback.call(this);
|
75
|
-
}
|
76
|
-
};
|
77
|
-
}
|