pict 1.0.181 → 1.0.182

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1020,7 +1020,7 @@ tmpEnclosureStack.pop();}}return tmpSegmentCount;}/**
1020
1020
  * @param {object} pEnclosureStartSymbolMap
1021
1021
  * @param {object} pEnclosureEndSymbolMap
1022
1022
  * @returns the first segment in the string as a string
1023
- */},{key:"stringGetSegments",value:function stringGetSegments(pString,pSeparator,pEnclosureStartSymbolMap,pEnclosureEndSymbolMap){var tmpString=typeof pString=='string'?pString:'';var tmpSeparator=typeof pSeparator=='string'?pSeparator:'.';var tmpEnclosureStartSymbolMap=_typeof(pEnclosureStartSymbolMap)=='object'?pEnclosureStart:{'{':0,'[':1,'(':2};var tmpEnclosureEndSymbolMap=_typeof(pEnclosureEndSymbolMap)=='object'?pEnclosureEnd:{'}':0,']':1,')':2};var tmpCurrentSegmentStart=0;var tmpSegmentList=[];if(pString.length<1){return tmpSegmentList;}var tmpEnclosureStack=[];for(var i=0;i<tmpString.length;i++){// IF This is the start of a segment
1023
+ */},{key:"stringGetSegments",value:function stringGetSegments(pString,pSeparator,pEnclosureStartSymbolMap,pEnclosureEndSymbolMap){var tmpString=typeof pString=='string'?pString:'';var tmpSeparator=typeof pSeparator=='string'?pSeparator:'.';var tmpEnclosureStartSymbolMap=_typeof(pEnclosureStartSymbolMap)=='object'?pEnclosureStart:{'{':0,'[':1,'(':2,'"':3,"'":4};var tmpEnclosureEndSymbolMap=_typeof(pEnclosureEndSymbolMap)=='object'?pEnclosureEnd:{'}':0,']':1,')':2,'"':3,"'":4};var tmpCurrentSegmentStart=0;var tmpSegmentList=[];if(pString.length<1){return tmpSegmentList;}var tmpEnclosureStack=[];for(var i=0;i<tmpString.length;i++){// IF This is the start of a segment
1024
1024
  if(tmpString[i]==tmpSeparator// AND we are not in a nested portion of the string
1025
1025
  &&tmpEnclosureStack.length==0){// Return the segment
1026
1026
  tmpSegmentList.push(tmpString.substring(tmpCurrentSegmentStart,i));tmpCurrentSegmentStart=i+1;}// IF This is the start of an enclosure
@@ -2037,8 +2037,7 @@ return false;}// Now see if the function has arguments.
2037
2037
  // Implementation notes: * ARGUMENTS MUST SHARE THE SAME ROOT OBJECT CONTEXT *
2038
2038
  var tmpFunctionArguments=_MockFable.DataFormat.stringGetSegments(_MockFable.DataFormat.stringGetEnclosureValueByIndex(pAddress.substring(tmpFunctionAddress.length),0),',');if(tmpFunctionArguments.length==0||tmpFunctionArguments[0]==''){// No arguments... just call the function (bound to the scope of the object it is contained withing)
2039
2039
  return pObject[tmpFunctionAddress].apply(pObject);}else{var tmpArgumentValues=[];var _tmpRootObject2=typeof pRootObject=='undefined'?pObject:pRootObject;// Now get the value for each argument
2040
- for(var _i19=0;_i19<tmpFunctionArguments.length;_i19++){// Resolve the values for each subsequent entry
2041
- tmpArgumentValues.push(this.getValueAtAddress(_tmpRootObject2,tmpFunctionArguments[_i19]));}return pObject[tmpFunctionAddress].apply(pObject,tmpArgumentValues);}}// Boxed elements look like this:
2040
+ for(var _i19=0;_i19<tmpFunctionArguments.length;_i19++){if(tmpFunctionArguments[_i19][0]=="'"&&tmpFunctionArguments[_i19][tmpFunctionArguments[_i19].length-1]=="'"){tmpArgumentValues.push(tmpFunctionArguments[_i19].substring(1,tmpFunctionArguments[_i19].length-1));}else if(tmpFunctionArguments[_i19][0]=='"'&&tmpFunctionArguments[_i19][tmpFunctionArguments[_i19].length-1]=='"'){tmpArgumentValues.push(tmpFunctionArguments[_i19].substring(1,tmpFunctionArguments[_i19].length-1));}else if(tmpFunctionArguments[_i19][0]=="`"&&tmpFunctionArguments[_i19][tmpFunctionArguments[_i19].length-1]=="`"){tmpArgumentValues.push(tmpFunctionArguments[_i19].substring(1,tmpFunctionArguments[_i19].length-1));}else{tmpArgumentValues.push(this.getValueAtAddress(_tmpRootObject2,tmpFunctionArguments[_i19]));}}return pObject[tmpFunctionAddress].apply(pObject,tmpArgumentValues);}}// Boxed elements look like this:
2042
2041
  // MyValues[10]
2043
2042
  // MyValues['Name']
2044
2043
  // MyValues["Age"]