Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-1892

Refactor type-checking code in plugins into a helper method

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4.0
    • Component/s: cordova-js
    • Labels:
      None

      Description

      ML Discussion: http://callback.markmail.org/thread/4vgze66wlaaxthsd

      The idea is to add a typecheck module along the lines of:
      argscheck.checkArgs('noasdf', 'testFunc', arguments);

      where n=number, o=object, a=array, s=string, d=date, f=function, *=anything

      Side-effects of this change will include:
      1. All core plugins will have their callbacks be optional

      2. Incorrect types will result in an exception thrown

      3. Should reduce the size of cordova.js through removing repetitive code.

        Attachments

          Activity

            People

            • Assignee:
              agrieve Andrew Grieve
              Reporter:
              agrieve Andrew Grieve
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: