Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial commit

  • Loading branch information...
commit 9cd79f32f3cfbc93d9082831c5f7d2262ad14383 0 parents
@kmalakoff authored
Showing with 4,363 additions and 0 deletions.
  1. +18 −0 .gitignore
  2. +725 −0 SubjectiveScript.m.xcodeproj/project.pbxproj
  3. +41 −0 SubjectiveScript/Helpers/NSString+Versioning.h
  4. +71 −0 SubjectiveScript/Helpers/NSString+Versioning.m
  5. +38 −0 SubjectiveScript/Helpers/SS+Functions.h
  6. +122 −0 SubjectiveScript/Helpers/SS+Functions.m
  7. +39 −0 SubjectiveScript/Helpers/SS+System.h
  8. +106 −0 SubjectiveScript/Helpers/SS+System.m
  9. +121 −0 SubjectiveScript/Helpers/SSArguments.h
  10. +46 −0 SubjectiveScript/JavaScript/NSArray+JavaScript.h
  11. +127 −0 SubjectiveScript/JavaScript/NSArray+JavaScript.m
  12. +36 −0 SubjectiveScript/JavaScript/NSDate+JavaScript.h
  13. +36 −0 SubjectiveScript/JavaScript/NSDate+JavaScript.m
  14. +38 −0 SubjectiveScript/JavaScript/NSDictionary+JavaScript.h
  15. +38 −0 SubjectiveScript/JavaScript/NSDictionary+JavaScript.m
  16. +45 −0 SubjectiveScript/JavaScript/NSMutableArray+JavaScript.h
  17. +121 −0 SubjectiveScript/JavaScript/NSMutableArray+JavaScript.m
  18. +36 −0 SubjectiveScript/JavaScript/NSMutableDictionary+JavaScript.h
  19. +42 −0 SubjectiveScript/JavaScript/NSMutableDictionary+JavaScript.m
  20. +36 −0 SubjectiveScript/JavaScript/NSMutableString+JavaScript.h
  21. +42 −0 SubjectiveScript/JavaScript/NSMutableString+JavaScript.m
  22. +37 −0 SubjectiveScript/JavaScript/NSNumber+JavaScript.h
  23. +48 −0 SubjectiveScript/JavaScript/NSNumber+JavaScript.m
  24. +47 −0 SubjectiveScript/JavaScript/NSObject+JavaScript.h
  25. +93 −0 SubjectiveScript/JavaScript/NSObject+JavaScript.m
  26. +44 −0 SubjectiveScript/JavaScript/NSString+JavaScript.h
  27. +96 −0 SubjectiveScript/JavaScript/NSString+JavaScript.m
  28. +50 −0 SubjectiveScript/JavaScript/SS+JavaScript.h
  29. +90 −0 SubjectiveScript/JavaScript/SS+JavaScript.m
  30. +42 −0 SubjectiveScript/JavaScript/SS+Types.h
  31. +42 −0 SubjectiveScript/JavaScript/SS+Types.m
  32. +34 −0 SubjectiveScript/Ruby/NSString+Ruby.h
  33. +34 −0 SubjectiveScript/Ruby/NSString+Ruby.m
  34. +33 −0 SubjectiveScript/SS.h
  35. +33 −0 SubjectiveScript/SS.m
  36. +7 −0 SubjectiveScript/SubjectiveScript-Prefix.pch
  37. +69 −0 SubjectiveScript/SubjectiveScript.h
  38. +30 −0 SubjectiveScript/SubjectiveScript.m
  39. +58 −0 SubjectiveScript/Types/NSArray+SS.h
  40. +145 −0 SubjectiveScript/Types/NSArray+SS.m
  41. +36 −0 SubjectiveScript/Types/NSDate+SS.h
  42. +47 −0 SubjectiveScript/Types/NSDate+SS.m
  43. +44 −0 SubjectiveScript/Types/NSDictionary+SS.h
  44. +52 −0 SubjectiveScript/Types/NSDictionary+SS.m
  45. +43 −0 SubjectiveScript/Types/NSMutableArray+SS.h
  46. +83 −0 SubjectiveScript/Types/NSMutableArray+SS.m
  47. +44 −0 SubjectiveScript/Types/NSMutableDictionary+SS.h
  48. +76 −0 SubjectiveScript/Types/NSMutableDictionary+SS.m
  49. +42 −0 SubjectiveScript/Types/NSMutableString+SS.h
  50. +70 −0 SubjectiveScript/Types/NSMutableString+SS.m
  51. +51 −0 SubjectiveScript/Types/NSNumber+SS.h
  52. +86 −0 SubjectiveScript/Types/NSNumber+SS.m
  53. +54 −0 SubjectiveScript/Types/NSObject+SS.h
  54. +153 −0 SubjectiveScript/Types/NSObject+SS.m
  55. +42 −0 SubjectiveScript/Types/NSString+SS.h
  56. +74 −0 SubjectiveScript/Types/NSString+SS.m
  57. +66 −0 SubjectiveScript/Types/SSTypes.h
  58. +22 −0 SubjectiveScriptTests/SubjectiveScriptTests-Info.plist
  59. +13 −0 SubjectiveScriptTests/SubjectiveScriptTests.h
  60. +21 −0 SubjectiveScriptTests/SubjectiveScriptTests.m
  61. +43 −0 SubjectiveScriptTests/Vendor/QUnitTestCase.m/QUnit+Tests.h
  62. +130 −0 SubjectiveScriptTests/Vendor/QUnitTestCase.m/QUnit+Tests.m
  63. +100 −0 SubjectiveScriptTests/Vendor/QUnitTestCase.m/QUnit.h
  64. +13 −0 SubjectiveScriptTests/Vendor/QUnitTestCase.m/QUnit.m
  65. +2 −0  SubjectiveScriptTests/en.lproj/InfoPlist.strings
18 .gitignore
@@ -0,0 +1,18 @@
+# osx noise
+.DS_Store
+profile
+
+# xcode noise
+build/*
+*.mode1
+*.mode1v3
+*.mode2v3
+*.perspective
+*.perspectivev3
+*.pbxuser
+*.xcworkspace
+xcuserdata
+
+# svn & cvs
+.svn
+CVS
725 SubjectiveScript.m.xcodeproj/project.pbxproj
@@ -0,0 +1,725 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 0A15526F15C54CD1006B9219 /* SS+System.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A15526D15C54CD1006B9219 /* SS+System.h */; };
+ 0A15527015C54CD1006B9219 /* SS+System.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A15526E15C54CD1006B9219 /* SS+System.m */; };
+ 0A15527115C54CD1006B9219 /* SS+System.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A15526E15C54CD1006B9219 /* SS+System.m */; };
+ 0AF1930315C5346B00937CC7 /* SS+JavaScript.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF192DD15C5346B00937CC7 /* SS+JavaScript.h */; };
+ 0AF1930415C5346B00937CC7 /* SS+JavaScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192DE15C5346B00937CC7 /* SS+JavaScript.m */; };
+ 0AF1930515C5346B00937CC7 /* SS+JavaScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192DE15C5346B00937CC7 /* SS+JavaScript.m */; };
+ 0AF1930615C5346B00937CC7 /* SS+Types.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF192DF15C5346B00937CC7 /* SS+Types.h */; };
+ 0AF1930715C5346B00937CC7 /* SS+Types.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192E015C5346B00937CC7 /* SS+Types.m */; };
+ 0AF1930815C5346B00937CC7 /* SS+Types.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192E015C5346B00937CC7 /* SS+Types.m */; };
+ 0AF1930C15C5346B00937CC7 /* NSArray+SS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF192E515C5346B00937CC7 /* NSArray+SS.h */; };
+ 0AF1930D15C5346B00937CC7 /* NSArray+SS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192E615C5346B00937CC7 /* NSArray+SS.m */; };
+ 0AF1930E15C5346B00937CC7 /* NSArray+SS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192E615C5346B00937CC7 /* NSArray+SS.m */; };
+ 0AF1930F15C5346B00937CC7 /* NSDate+SS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF192E715C5346B00937CC7 /* NSDate+SS.h */; };
+ 0AF1931015C5346B00937CC7 /* NSDate+SS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192E815C5346B00937CC7 /* NSDate+SS.m */; };
+ 0AF1931115C5346B00937CC7 /* NSDate+SS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192E815C5346B00937CC7 /* NSDate+SS.m */; };
+ 0AF1931215C5346B00937CC7 /* NSDictionary+SS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF192E915C5346B00937CC7 /* NSDictionary+SS.h */; };
+ 0AF1931315C5346B00937CC7 /* NSDictionary+SS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192EA15C5346B00937CC7 /* NSDictionary+SS.m */; };
+ 0AF1931415C5346B00937CC7 /* NSDictionary+SS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192EA15C5346B00937CC7 /* NSDictionary+SS.m */; };
+ 0AF1931515C5346B00937CC7 /* NSMutableArray+SS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF192EB15C5346B00937CC7 /* NSMutableArray+SS.h */; };
+ 0AF1931615C5346B00937CC7 /* NSMutableArray+SS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192EC15C5346B00937CC7 /* NSMutableArray+SS.m */; };
+ 0AF1931715C5346B00937CC7 /* NSMutableArray+SS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192EC15C5346B00937CC7 /* NSMutableArray+SS.m */; };
+ 0AF1931815C5346B00937CC7 /* NSMutableDictionary+SS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF192ED15C5346B00937CC7 /* NSMutableDictionary+SS.h */; };
+ 0AF1931915C5346B00937CC7 /* NSMutableDictionary+SS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192EE15C5346B00937CC7 /* NSMutableDictionary+SS.m */; };
+ 0AF1931A15C5346B00937CC7 /* NSMutableDictionary+SS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192EE15C5346B00937CC7 /* NSMutableDictionary+SS.m */; };
+ 0AF1931B15C5346B00937CC7 /* NSMutableString+SS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF192EF15C5346B00937CC7 /* NSMutableString+SS.h */; };
+ 0AF1931C15C5346B00937CC7 /* NSMutableString+SS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192F015C5346B00937CC7 /* NSMutableString+SS.m */; };
+ 0AF1931D15C5346B00937CC7 /* NSMutableString+SS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192F015C5346B00937CC7 /* NSMutableString+SS.m */; };
+ 0AF1931E15C5346B00937CC7 /* NSNumber+SS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF192F115C5346B00937CC7 /* NSNumber+SS.h */; };
+ 0AF1931F15C5346B00937CC7 /* NSNumber+SS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192F215C5346B00937CC7 /* NSNumber+SS.m */; };
+ 0AF1932015C5346B00937CC7 /* NSNumber+SS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192F215C5346B00937CC7 /* NSNumber+SS.m */; };
+ 0AF1932115C5346B00937CC7 /* NSObject+SS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF192F315C5346B00937CC7 /* NSObject+SS.h */; };
+ 0AF1932215C5346B00937CC7 /* NSObject+SS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192F415C5346B00937CC7 /* NSObject+SS.m */; };
+ 0AF1932315C5346B00937CC7 /* NSObject+SS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192F415C5346B00937CC7 /* NSObject+SS.m */; };
+ 0AF1932415C5346B00937CC7 /* NSString+SS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF192F515C5346B00937CC7 /* NSString+SS.h */; };
+ 0AF1932515C5346B00937CC7 /* NSString+SS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192F615C5346B00937CC7 /* NSString+SS.m */; };
+ 0AF1932615C5346B00937CC7 /* NSString+SS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192F615C5346B00937CC7 /* NSString+SS.m */; };
+ 0AF1932715C5346B00937CC7 /* SSTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF192F715C5346B00937CC7 /* SSTypes.h */; };
+ 0AF1932915C5346B00937CC7 /* SS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF192F915C5346B00937CC7 /* SS.h */; };
+ 0AF1932A15C5346B00937CC7 /* SS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192FA15C5346B00937CC7 /* SS.m */; };
+ 0AF1932B15C5346B00937CC7 /* SS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF192FA15C5346B00937CC7 /* SS.m */; };
+ 0AF1934F15C536BF00937CC7 /* NSObject+JavaScript.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF1934D15C536BF00937CC7 /* NSObject+JavaScript.h */; };
+ 0AF1935015C536BF00937CC7 /* NSObject+JavaScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1934E15C536BF00937CC7 /* NSObject+JavaScript.m */; };
+ 0AF1935115C536BF00937CC7 /* NSObject+JavaScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1934E15C536BF00937CC7 /* NSObject+JavaScript.m */; };
+ 0AF1935415C536DB00937CC7 /* NSArray+JavaScript.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF1935215C536DB00937CC7 /* NSArray+JavaScript.h */; };
+ 0AF1935515C536DB00937CC7 /* NSArray+JavaScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1935315C536DB00937CC7 /* NSArray+JavaScript.m */; };
+ 0AF1935615C536DB00937CC7 /* NSArray+JavaScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1935315C536DB00937CC7 /* NSArray+JavaScript.m */; };
+ 0AF1935915C536F100937CC7 /* NSMutableArray+JavaScript.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF1935715C536F100937CC7 /* NSMutableArray+JavaScript.h */; };
+ 0AF1935A15C536F100937CC7 /* NSMutableArray+JavaScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1935815C536F100937CC7 /* NSMutableArray+JavaScript.m */; };
+ 0AF1935B15C536F100937CC7 /* NSMutableArray+JavaScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1935815C536F100937CC7 /* NSMutableArray+JavaScript.m */; };
+ 0AF1935E15C5370700937CC7 /* NSDictionary+JavaScript.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF1935C15C5370700937CC7 /* NSDictionary+JavaScript.h */; };
+ 0AF1935F15C5370700937CC7 /* NSDictionary+JavaScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1935D15C5370700937CC7 /* NSDictionary+JavaScript.m */; };
+ 0AF1936015C5370700937CC7 /* NSDictionary+JavaScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1935D15C5370700937CC7 /* NSDictionary+JavaScript.m */; };
+ 0AF1936315C5371700937CC7 /* NSMutableDictionary+JavaScript.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF1936115C5371700937CC7 /* NSMutableDictionary+JavaScript.h */; };
+ 0AF1936415C5371700937CC7 /* NSMutableDictionary+JavaScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1936215C5371700937CC7 /* NSMutableDictionary+JavaScript.m */; };
+ 0AF1936515C5371700937CC7 /* NSMutableDictionary+JavaScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1936215C5371700937CC7 /* NSMutableDictionary+JavaScript.m */; };
+ 0AF1936815C5379400937CC7 /* NSString+JavaScript.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF1936615C5379400937CC7 /* NSString+JavaScript.h */; };
+ 0AF1936915C5379400937CC7 /* NSString+JavaScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1936715C5379400937CC7 /* NSString+JavaScript.m */; };
+ 0AF1936A15C5379400937CC7 /* NSString+JavaScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1936715C5379400937CC7 /* NSString+JavaScript.m */; };
+ 0AF1936D15C537A700937CC7 /* NSString+Ruby.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF1936B15C537A700937CC7 /* NSString+Ruby.h */; };
+ 0AF1936E15C537A700937CC7 /* NSString+Ruby.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1936C15C537A700937CC7 /* NSString+Ruby.m */; };
+ 0AF1936F15C537A700937CC7 /* NSString+Ruby.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1936C15C537A700937CC7 /* NSString+Ruby.m */; };
+ 0AF1937715C53B3E00937CC7 /* NSDate+JavaScript.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF1937515C53B3D00937CC7 /* NSDate+JavaScript.h */; };
+ 0AF1937815C53B3E00937CC7 /* NSDate+JavaScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1937615C53B3D00937CC7 /* NSDate+JavaScript.m */; };
+ 0AF1937915C53B3E00937CC7 /* NSDate+JavaScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1937615C53B3D00937CC7 /* NSDate+JavaScript.m */; };
+ 0AF1937C15C53D7600937CC7 /* NSMutableString+JavaScript.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF1937A15C53D7500937CC7 /* NSMutableString+JavaScript.h */; };
+ 0AF1937D15C53D7600937CC7 /* NSMutableString+JavaScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1937B15C53D7600937CC7 /* NSMutableString+JavaScript.m */; };
+ 0AF1937E15C53D7600937CC7 /* NSMutableString+JavaScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1937B15C53D7600937CC7 /* NSMutableString+JavaScript.m */; };
+ 0AF1938115C53DB400937CC7 /* NSNumber+JavaScript.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF1937F15C53DB300937CC7 /* NSNumber+JavaScript.h */; };
+ 0AF1938215C53DB400937CC7 /* NSNumber+JavaScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1938015C53DB300937CC7 /* NSNumber+JavaScript.m */; };
+ 0AF1938315C53DB400937CC7 /* NSNumber+JavaScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1938015C53DB300937CC7 /* NSNumber+JavaScript.m */; };
+ 0AF1938D15C5454900937CC7 /* NSString+Versioning.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF1938815C5454900937CC7 /* NSString+Versioning.h */; };
+ 0AF1938E15C5454900937CC7 /* NSString+Versioning.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1938915C5454900937CC7 /* NSString+Versioning.m */; };
+ 0AF1938F15C5454900937CC7 /* NSString+Versioning.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1938915C5454900937CC7 /* NSString+Versioning.m */; };
+ 0AF1939015C5454900937CC7 /* SS+Functions.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF1938A15C5454900937CC7 /* SS+Functions.h */; };
+ 0AF1939115C5454900937CC7 /* SS+Functions.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1938B15C5454900937CC7 /* SS+Functions.m */; };
+ 0AF1939215C5454900937CC7 /* SS+Functions.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1938B15C5454900937CC7 /* SS+Functions.m */; };
+ 0AF1939315C5454900937CC7 /* SSArguments.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AF1938C15C5454900937CC7 /* SSArguments.h */; };
+ 0AF1939D15C54A2000937CC7 /* QUnit+Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1939A15C54A2000937CC7 /* QUnit+Tests.m */; };
+ 0AF1939E15C54A2000937CC7 /* QUnit.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AF1939C15C54A2000937CC7 /* QUnit.m */; };
+ 0AFE255415B59CD1008A8BA9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AFE255315B59CD1008A8BA9 /* Foundation.framework */; };
+ 0AFE255A15B59CD1008A8BA9 /* SubjectiveScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AFE255915B59CD1008A8BA9 /* SubjectiveScript.m */; };
+ 0AFE256215B59CD1008A8BA9 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AFE256115B59CD1008A8BA9 /* SenTestingKit.framework */; };
+ 0AFE256415B59CD1008A8BA9 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AFE256315B59CD1008A8BA9 /* UIKit.framework */; };
+ 0AFE256515B59CD1008A8BA9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AFE255315B59CD1008A8BA9 /* Foundation.framework */; };
+ 0AFE256815B59CD1008A8BA9 /* libSubjectiveScript.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AFE255015B59CD1008A8BA9 /* libSubjectiveScript.a */; };
+ 0AFE256E15B59CD1008A8BA9 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0AFE256C15B59CD1008A8BA9 /* InfoPlist.strings */; };
+ 0AFE257115B59CD1008A8BA9 /* SubjectiveScriptTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AFE257015B59CD1008A8BA9 /* SubjectiveScriptTests.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 0AFE256615B59CD1008A8BA9 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 0AFE254715B59CD1008A8BA9 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 0AFE254F15B59CD1008A8BA9;
+ remoteInfo = SubjectiveScript;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ 0A15526D15C54CD1006B9219 /* SS+System.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SS+System.h"; sourceTree = "<group>"; };
+ 0A15526E15C54CD1006B9219 /* SS+System.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SS+System.m"; sourceTree = "<group>"; };
+ 0AF192DD15C5346B00937CC7 /* SS+JavaScript.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SS+JavaScript.h"; sourceTree = "<group>"; };
+ 0AF192DE15C5346B00937CC7 /* SS+JavaScript.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SS+JavaScript.m"; sourceTree = "<group>"; };
+ 0AF192DF15C5346B00937CC7 /* SS+Types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "SS+Types.h"; path = "../JavaScript/SS+Types.h"; sourceTree = "<group>"; };
+ 0AF192E015C5346B00937CC7 /* SS+Types.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "SS+Types.m"; path = "../JavaScript/SS+Types.m"; sourceTree = "<group>"; };
+ 0AF192E515C5346B00937CC7 /* NSArray+SS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+SS.h"; sourceTree = "<group>"; };
+ 0AF192E615C5346B00937CC7 /* NSArray+SS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+SS.m"; sourceTree = "<group>"; };
+ 0AF192E715C5346B00937CC7 /* NSDate+SS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+SS.h"; sourceTree = "<group>"; };
+ 0AF192E815C5346B00937CC7 /* NSDate+SS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+SS.m"; sourceTree = "<group>"; };
+ 0AF192E915C5346B00937CC7 /* NSDictionary+SS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+SS.h"; sourceTree = "<group>"; };
+ 0AF192EA15C5346B00937CC7 /* NSDictionary+SS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+SS.m"; sourceTree = "<group>"; };
+ 0AF192EB15C5346B00937CC7 /* NSMutableArray+SS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableArray+SS.h"; sourceTree = "<group>"; };
+ 0AF192EC15C5346B00937CC7 /* NSMutableArray+SS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableArray+SS.m"; sourceTree = "<group>"; };
+ 0AF192ED15C5346B00937CC7 /* NSMutableDictionary+SS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableDictionary+SS.h"; sourceTree = "<group>"; };
+ 0AF192EE15C5346B00937CC7 /* NSMutableDictionary+SS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableDictionary+SS.m"; sourceTree = "<group>"; };
+ 0AF192EF15C5346B00937CC7 /* NSMutableString+SS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableString+SS.h"; sourceTree = "<group>"; };
+ 0AF192F015C5346B00937CC7 /* NSMutableString+SS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableString+SS.m"; sourceTree = "<group>"; };
+ 0AF192F115C5346B00937CC7 /* NSNumber+SS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNumber+SS.h"; sourceTree = "<group>"; };
+ 0AF192F215C5346B00937CC7 /* NSNumber+SS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSNumber+SS.m"; sourceTree = "<group>"; };
+ 0AF192F315C5346B00937CC7 /* NSObject+SS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+SS.h"; sourceTree = "<group>"; };
+ 0AF192F415C5346B00937CC7 /* NSObject+SS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+SS.m"; sourceTree = "<group>"; };
+ 0AF192F515C5346B00937CC7 /* NSString+SS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+SS.h"; sourceTree = "<group>"; };
+ 0AF192F615C5346B00937CC7 /* NSString+SS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+SS.m"; sourceTree = "<group>"; };
+ 0AF192F715C5346B00937CC7 /* SSTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSTypes.h; sourceTree = "<group>"; };
+ 0AF192F915C5346B00937CC7 /* SS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SS.h; sourceTree = "<group>"; };
+ 0AF192FA15C5346B00937CC7 /* SS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SS.m; sourceTree = "<group>"; };
+ 0AF1934D15C536BF00937CC7 /* NSObject+JavaScript.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+JavaScript.h"; sourceTree = "<group>"; };
+ 0AF1934E15C536BF00937CC7 /* NSObject+JavaScript.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+JavaScript.m"; sourceTree = "<group>"; };
+ 0AF1935215C536DB00937CC7 /* NSArray+JavaScript.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+JavaScript.h"; sourceTree = "<group>"; };
+ 0AF1935315C536DB00937CC7 /* NSArray+JavaScript.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+JavaScript.m"; sourceTree = "<group>"; };
+ 0AF1935715C536F100937CC7 /* NSMutableArray+JavaScript.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableArray+JavaScript.h"; sourceTree = "<group>"; };
+ 0AF1935815C536F100937CC7 /* NSMutableArray+JavaScript.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableArray+JavaScript.m"; sourceTree = "<group>"; };
+ 0AF1935C15C5370700937CC7 /* NSDictionary+JavaScript.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+JavaScript.h"; sourceTree = "<group>"; };
+ 0AF1935D15C5370700937CC7 /* NSDictionary+JavaScript.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+JavaScript.m"; sourceTree = "<group>"; };
+ 0AF1936115C5371700937CC7 /* NSMutableDictionary+JavaScript.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableDictionary+JavaScript.h"; sourceTree = "<group>"; };
+ 0AF1936215C5371700937CC7 /* NSMutableDictionary+JavaScript.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableDictionary+JavaScript.m"; sourceTree = "<group>"; };
+ 0AF1936615C5379400937CC7 /* NSString+JavaScript.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+JavaScript.h"; sourceTree = "<group>"; };
+ 0AF1936715C5379400937CC7 /* NSString+JavaScript.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+JavaScript.m"; sourceTree = "<group>"; };
+ 0AF1936B15C537A700937CC7 /* NSString+Ruby.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Ruby.h"; sourceTree = "<group>"; };
+ 0AF1936C15C537A700937CC7 /* NSString+Ruby.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Ruby.m"; sourceTree = "<group>"; };
+ 0AF1937515C53B3D00937CC7 /* NSDate+JavaScript.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+JavaScript.h"; sourceTree = "<group>"; };
+ 0AF1937615C53B3D00937CC7 /* NSDate+JavaScript.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+JavaScript.m"; sourceTree = "<group>"; };
+ 0AF1937A15C53D7500937CC7 /* NSMutableString+JavaScript.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableString+JavaScript.h"; sourceTree = "<group>"; };
+ 0AF1937B15C53D7600937CC7 /* NSMutableString+JavaScript.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableString+JavaScript.m"; sourceTree = "<group>"; };
+ 0AF1937F15C53DB300937CC7 /* NSNumber+JavaScript.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNumber+JavaScript.h"; sourceTree = "<group>"; };
+ 0AF1938015C53DB300937CC7 /* NSNumber+JavaScript.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSNumber+JavaScript.m"; sourceTree = "<group>"; };
+ 0AF1938815C5454900937CC7 /* NSString+Versioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Versioning.h"; sourceTree = "<group>"; };
+ 0AF1938915C5454900937CC7 /* NSString+Versioning.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Versioning.m"; sourceTree = "<group>"; };
+ 0AF1938A15C5454900937CC7 /* SS+Functions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SS+Functions.h"; sourceTree = "<group>"; };
+ 0AF1938B15C5454900937CC7 /* SS+Functions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SS+Functions.m"; sourceTree = "<group>"; };
+ 0AF1938C15C5454900937CC7 /* SSArguments.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSArguments.h; sourceTree = "<group>"; };
+ 0AF1939915C54A2000937CC7 /* QUnit+Tests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "QUnit+Tests.h"; sourceTree = "<group>"; };
+ 0AF1939A15C54A2000937CC7 /* QUnit+Tests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "QUnit+Tests.m"; sourceTree = "<group>"; };
+ 0AF1939B15C54A2000937CC7 /* QUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QUnit.h; sourceTree = "<group>"; };
+ 0AF1939C15C54A2000937CC7 /* QUnit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QUnit.m; sourceTree = "<group>"; };
+ 0AFE255015B59CD1008A8BA9 /* libSubjectiveScript.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSubjectiveScript.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ 0AFE255315B59CD1008A8BA9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 0AFE255715B59CD1008A8BA9 /* SubjectiveScript-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SubjectiveScript-Prefix.pch"; sourceTree = "<group>"; };
+ 0AFE255815B59CD1008A8BA9 /* SubjectiveScript.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SubjectiveScript.h; sourceTree = "<group>"; };
+ 0AFE255915B59CD1008A8BA9 /* SubjectiveScript.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SubjectiveScript.m; sourceTree = "<group>"; };
+ 0AFE256015B59CD1008A8BA9 /* SubjectiveScriptTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SubjectiveScriptTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 0AFE256115B59CD1008A8BA9 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
+ 0AFE256315B59CD1008A8BA9 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
+ 0AFE256B15B59CD1008A8BA9 /* SubjectiveScriptTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SubjectiveScriptTests-Info.plist"; sourceTree = "<group>"; };
+ 0AFE256D15B59CD1008A8BA9 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 0AFE256F15B59CD1008A8BA9 /* SubjectiveScriptTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SubjectiveScriptTests.h; sourceTree = "<group>"; };
+ 0AFE257015B59CD1008A8BA9 /* SubjectiveScriptTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SubjectiveScriptTests.m; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 0AFE254D15B59CD1008A8BA9 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 0AFE255415B59CD1008A8BA9 /* Foundation.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 0AFE255C15B59CD1008A8BA9 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 0AFE256215B59CD1008A8BA9 /* SenTestingKit.framework in Frameworks */,
+ 0AFE256415B59CD1008A8BA9 /* UIKit.framework in Frameworks */,
+ 0AFE256515B59CD1008A8BA9 /* Foundation.framework in Frameworks */,
+ 0AFE256815B59CD1008A8BA9 /* libSubjectiveScript.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 0AF192DC15C5346B00937CC7 /* JavaScript */ = {
+ isa = PBXGroup;
+ children = (
+ 0AF192DD15C5346B00937CC7 /* SS+JavaScript.h */,
+ 0AF192DE15C5346B00937CC7 /* SS+JavaScript.m */,
+ 0AF1934D15C536BF00937CC7 /* NSObject+JavaScript.h */,
+ 0AF1934E15C536BF00937CC7 /* NSObject+JavaScript.m */,
+ 0AF1935215C536DB00937CC7 /* NSArray+JavaScript.h */,
+ 0AF1935315C536DB00937CC7 /* NSArray+JavaScript.m */,
+ 0AF1935715C536F100937CC7 /* NSMutableArray+JavaScript.h */,
+ 0AF1935815C536F100937CC7 /* NSMutableArray+JavaScript.m */,
+ 0AF1935C15C5370700937CC7 /* NSDictionary+JavaScript.h */,
+ 0AF1935D15C5370700937CC7 /* NSDictionary+JavaScript.m */,
+ 0AF1936115C5371700937CC7 /* NSMutableDictionary+JavaScript.h */,
+ 0AF1936215C5371700937CC7 /* NSMutableDictionary+JavaScript.m */,
+ 0AF1936615C5379400937CC7 /* NSString+JavaScript.h */,
+ 0AF1936715C5379400937CC7 /* NSString+JavaScript.m */,
+ 0AF1937515C53B3D00937CC7 /* NSDate+JavaScript.h */,
+ 0AF1937615C53B3D00937CC7 /* NSDate+JavaScript.m */,
+ 0AF1937A15C53D7500937CC7 /* NSMutableString+JavaScript.h */,
+ 0AF1937B15C53D7600937CC7 /* NSMutableString+JavaScript.m */,
+ 0AF1937F15C53DB300937CC7 /* NSNumber+JavaScript.h */,
+ 0AF1938015C53DB300937CC7 /* NSNumber+JavaScript.m */,
+ );
+ path = JavaScript;
+ sourceTree = "<group>";
+ };
+ 0AF192E315C5346B00937CC7 /* Ruby */ = {
+ isa = PBXGroup;
+ children = (
+ 0AF1936B15C537A700937CC7 /* NSString+Ruby.h */,
+ 0AF1936C15C537A700937CC7 /* NSString+Ruby.m */,
+ );
+ path = Ruby;
+ sourceTree = "<group>";
+ };
+ 0AF192E415C5346B00937CC7 /* Types */ = {
+ isa = PBXGroup;
+ children = (
+ 0AF192F715C5346B00937CC7 /* SSTypes.h */,
+ 0AF192DF15C5346B00937CC7 /* SS+Types.h */,
+ 0AF192E015C5346B00937CC7 /* SS+Types.m */,
+ 0AF192E515C5346B00937CC7 /* NSArray+SS.h */,
+ 0AF192E615C5346B00937CC7 /* NSArray+SS.m */,
+ 0AF192E715C5346B00937CC7 /* NSDate+SS.h */,
+ 0AF192E815C5346B00937CC7 /* NSDate+SS.m */,
+ 0AF192E915C5346B00937CC7 /* NSDictionary+SS.h */,
+ 0AF192EA15C5346B00937CC7 /* NSDictionary+SS.m */,
+ 0AF192EB15C5346B00937CC7 /* NSMutableArray+SS.h */,
+ 0AF192EC15C5346B00937CC7 /* NSMutableArray+SS.m */,
+ 0AF192ED15C5346B00937CC7 /* NSMutableDictionary+SS.h */,
+ 0AF192EE15C5346B00937CC7 /* NSMutableDictionary+SS.m */,
+ 0AF192EF15C5346B00937CC7 /* NSMutableString+SS.h */,
+ 0AF192F015C5346B00937CC7 /* NSMutableString+SS.m */,
+ 0AF192F115C5346B00937CC7 /* NSNumber+SS.h */,
+ 0AF192F215C5346B00937CC7 /* NSNumber+SS.m */,
+ 0AF192F315C5346B00937CC7 /* NSObject+SS.h */,
+ 0AF192F415C5346B00937CC7 /* NSObject+SS.m */,
+ 0AF192F515C5346B00937CC7 /* NSString+SS.h */,
+ 0AF192F615C5346B00937CC7 /* NSString+SS.m */,
+ );
+ path = Types;
+ sourceTree = "<group>";
+ };
+ 0AF1938715C5454800937CC7 /* Helpers */ = {
+ isa = PBXGroup;
+ children = (
+ 0AF1938815C5454900937CC7 /* NSString+Versioning.h */,
+ 0AF1938915C5454900937CC7 /* NSString+Versioning.m */,
+ 0AF1938C15C5454900937CC7 /* SSArguments.h */,
+ 0AF1938A15C5454900937CC7 /* SS+Functions.h */,
+ 0AF1938B15C5454900937CC7 /* SS+Functions.m */,
+ 0A15526D15C54CD1006B9219 /* SS+System.h */,
+ 0A15526E15C54CD1006B9219 /* SS+System.m */,
+ );
+ path = Helpers;
+ sourceTree = "<group>";
+ };
+ 0AF1939715C54A2000937CC7 /* Vendor */ = {
+ isa = PBXGroup;
+ children = (
+ 0AF1939815C54A2000937CC7 /* QUnitTestCase.m */,
+ );
+ name = Vendor;
+ path = SubjectiveScriptTests/Vendor;
+ sourceTree = SOURCE_ROOT;
+ };
+ 0AF1939815C54A2000937CC7 /* QUnitTestCase.m */ = {
+ isa = PBXGroup;
+ children = (
+ 0AF1939915C54A2000937CC7 /* QUnit+Tests.h */,
+ 0AF1939A15C54A2000937CC7 /* QUnit+Tests.m */,
+ 0AF1939B15C54A2000937CC7 /* QUnit.h */,
+ 0AF1939C15C54A2000937CC7 /* QUnit.m */,
+ );
+ path = QUnitTestCase.m;
+ sourceTree = "<group>";
+ };
+ 0AFE254515B59CD1008A8BA9 = {
+ isa = PBXGroup;
+ children = (
+ 0AFE255515B59CD1008A8BA9 /* SubjectiveScript */,
+ 0AFE256915B59CD1008A8BA9 /* SubjectiveScriptTests */,
+ 0AFE255215B59CD1008A8BA9 /* Frameworks */,
+ 0AFE255115B59CD1008A8BA9 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 0AFE255115B59CD1008A8BA9 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 0AFE255015B59CD1008A8BA9 /* libSubjectiveScript.a */,
+ 0AFE256015B59CD1008A8BA9 /* SubjectiveScriptTests.octest */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 0AFE255215B59CD1008A8BA9 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 0AFE255315B59CD1008A8BA9 /* Foundation.framework */,
+ 0AFE256115B59CD1008A8BA9 /* SenTestingKit.framework */,
+ 0AFE256315B59CD1008A8BA9 /* UIKit.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 0AFE255515B59CD1008A8BA9 /* SubjectiveScript */ = {
+ isa = PBXGroup;
+ children = (
+ 0AF1938715C5454800937CC7 /* Helpers */,
+ 0AF192DC15C5346B00937CC7 /* JavaScript */,
+ 0AF192E315C5346B00937CC7 /* Ruby */,
+ 0AF192E415C5346B00937CC7 /* Types */,
+ 0AF192F915C5346B00937CC7 /* SS.h */,
+ 0AF192FA15C5346B00937CC7 /* SS.m */,
+ 0AFE255815B59CD1008A8BA9 /* SubjectiveScript.h */,
+ 0AFE255915B59CD1008A8BA9 /* SubjectiveScript.m */,
+ 0AFE255615B59CD1008A8BA9 /* Supporting Files */,
+ );
+ path = SubjectiveScript;
+ sourceTree = "<group>";
+ };
+ 0AFE255615B59CD1008A8BA9 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 0AFE255715B59CD1008A8BA9 /* SubjectiveScript-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ 0AFE256915B59CD1008A8BA9 /* SubjectiveScriptTests */ = {
+ isa = PBXGroup;
+ children = (
+ 0AFE256F15B59CD1008A8BA9 /* SubjectiveScriptTests.h */,
+ 0AFE257015B59CD1008A8BA9 /* SubjectiveScriptTests.m */,
+ 0AF1939715C54A2000937CC7 /* Vendor */,
+ 0AFE256A15B59CD1008A8BA9 /* Supporting Files */,
+ );
+ path = SubjectiveScriptTests;
+ sourceTree = "<group>";
+ };
+ 0AFE256A15B59CD1008A8BA9 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 0AFE256B15B59CD1008A8BA9 /* SubjectiveScriptTests-Info.plist */,
+ 0AFE256C15B59CD1008A8BA9 /* InfoPlist.strings */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ 0AFE254E15B59CD1008A8BA9 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 0AF1930315C5346B00937CC7 /* SS+JavaScript.h in Headers */,
+ 0AF1930615C5346B00937CC7 /* SS+Types.h in Headers */,
+ 0AF1930C15C5346B00937CC7 /* NSArray+SS.h in Headers */,
+ 0AF1930F15C5346B00937CC7 /* NSDate+SS.h in Headers */,
+ 0AF1931215C5346B00937CC7 /* NSDictionary+SS.h in Headers */,
+ 0AF1931515C5346B00937CC7 /* NSMutableArray+SS.h in Headers */,
+ 0AF1931815C5346B00937CC7 /* NSMutableDictionary+SS.h in Headers */,
+ 0AF1931B15C5346B00937CC7 /* NSMutableString+SS.h in Headers */,
+ 0AF1931E15C5346B00937CC7 /* NSNumber+SS.h in Headers */,
+ 0AF1932115C5346B00937CC7 /* NSObject+SS.h in Headers */,
+ 0AF1932415C5346B00937CC7 /* NSString+SS.h in Headers */,
+ 0AF1932715C5346B00937CC7 /* SSTypes.h in Headers */,
+ 0AF1932915C5346B00937CC7 /* SS.h in Headers */,
+ 0AF1934F15C536BF00937CC7 /* NSObject+JavaScript.h in Headers */,
+ 0AF1935415C536DB00937CC7 /* NSArray+JavaScript.h in Headers */,
+ 0AF1935915C536F100937CC7 /* NSMutableArray+JavaScript.h in Headers */,
+ 0AF1935E15C5370700937CC7 /* NSDictionary+JavaScript.h in Headers */,
+ 0AF1936315C5371700937CC7 /* NSMutableDictionary+JavaScript.h in Headers */,
+ 0AF1936815C5379400937CC7 /* NSString+JavaScript.h in Headers */,
+ 0AF1936D15C537A700937CC7 /* NSString+Ruby.h in Headers */,
+ 0AF1937715C53B3E00937CC7 /* NSDate+JavaScript.h in Headers */,
+ 0AF1937C15C53D7600937CC7 /* NSMutableString+JavaScript.h in Headers */,
+ 0AF1938115C53DB400937CC7 /* NSNumber+JavaScript.h in Headers */,
+ 0AF1938D15C5454900937CC7 /* NSString+Versioning.h in Headers */,
+ 0AF1939015C5454900937CC7 /* SS+Functions.h in Headers */,
+ 0AF1939315C5454900937CC7 /* SSArguments.h in Headers */,
+ 0A15526F15C54CD1006B9219 /* SS+System.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ 0AFE254F15B59CD1008A8BA9 /* SubjectiveScript */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 0AFE257415B59CD1008A8BA9 /* Build configuration list for PBXNativeTarget "SubjectiveScript" */;
+ buildPhases = (
+ 0AFE254C15B59CD1008A8BA9 /* Sources */,
+ 0AFE254D15B59CD1008A8BA9 /* Frameworks */,
+ 0AFE254E15B59CD1008A8BA9 /* Headers */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = SubjectiveScript;
+ productName = SubjectiveScript;
+ productReference = 0AFE255015B59CD1008A8BA9 /* libSubjectiveScript.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+ 0AFE255F15B59CD1008A8BA9 /* SubjectiveScriptTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 0AFE257715B59CD1008A8BA9 /* Build configuration list for PBXNativeTarget "SubjectiveScriptTests" */;
+ buildPhases = (
+ 0AFE255B15B59CD1008A8BA9 /* Sources */,
+ 0AFE255C15B59CD1008A8BA9 /* Frameworks */,
+ 0AFE255D15B59CD1008A8BA9 /* Resources */,
+ 0AFE255E15B59CD1008A8BA9 /* ShellScript */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 0AFE256715B59CD1008A8BA9 /* PBXTargetDependency */,
+ );
+ name = SubjectiveScriptTests;
+ productName = SubjectiveScriptTests;
+ productReference = 0AFE256015B59CD1008A8BA9 /* SubjectiveScriptTests.octest */;
+ productType = "com.apple.product-type.bundle";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 0AFE254715B59CD1008A8BA9 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ CLASSPREFIX = SS;
+ LastUpgradeCheck = 0430;
+ ORGANIZATIONNAME = "Kevin Malakoff";
+ };
+ buildConfigurationList = 0AFE254A15B59CD1008A8BA9 /* Build configuration list for PBXProject "SubjectiveScript.m" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 0AFE254515B59CD1008A8BA9;
+ productRefGroup = 0AFE255115B59CD1008A8BA9 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 0AFE254F15B59CD1008A8BA9 /* SubjectiveScript */,
+ 0AFE255F15B59CD1008A8BA9 /* SubjectiveScriptTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 0AFE255D15B59CD1008A8BA9 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 0AFE256E15B59CD1008A8BA9 /* InfoPlist.strings in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 0AFE255E15B59CD1008A8BA9 /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 0AFE254C15B59CD1008A8BA9 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 0AFE255A15B59CD1008A8BA9 /* SubjectiveScript.m in Sources */,
+ 0AF1930415C5346B00937CC7 /* SS+JavaScript.m in Sources */,
+ 0AF1930715C5346B00937CC7 /* SS+Types.m in Sources */,
+ 0AF1930D15C5346B00937CC7 /* NSArray+SS.m in Sources */,
+ 0AF1931015C5346B00937CC7 /* NSDate+SS.m in Sources */,
+ 0AF1931315C5346B00937CC7 /* NSDictionary+SS.m in Sources */,
+ 0AF1931615C5346B00937CC7 /* NSMutableArray+SS.m in Sources */,
+ 0AF1931915C5346B00937CC7 /* NSMutableDictionary+SS.m in Sources */,
+ 0AF1931C15C5346B00937CC7 /* NSMutableString+SS.m in Sources */,
+ 0AF1931F15C5346B00937CC7 /* NSNumber+SS.m in Sources */,
+ 0AF1932215C5346B00937CC7 /* NSObject+SS.m in Sources */,
+ 0AF1932515C5346B00937CC7 /* NSString+SS.m in Sources */,
+ 0AF1932A15C5346B00937CC7 /* SS.m in Sources */,
+ 0AF1935015C536BF00937CC7 /* NSObject+JavaScript.m in Sources */,
+ 0AF1935515C536DB00937CC7 /* NSArray+JavaScript.m in Sources */,
+ 0AF1935A15C536F100937CC7 /* NSMutableArray+JavaScript.m in Sources */,
+ 0AF1935F15C5370700937CC7 /* NSDictionary+JavaScript.m in Sources */,
+ 0AF1936415C5371700937CC7 /* NSMutableDictionary+JavaScript.m in Sources */,
+ 0AF1936915C5379400937CC7 /* NSString+JavaScript.m in Sources */,
+ 0AF1936E15C537A700937CC7 /* NSString+Ruby.m in Sources */,
+ 0AF1937815C53B3E00937CC7 /* NSDate+JavaScript.m in Sources */,
+ 0AF1937D15C53D7600937CC7 /* NSMutableString+JavaScript.m in Sources */,
+ 0AF1938215C53DB400937CC7 /* NSNumber+JavaScript.m in Sources */,
+ 0AF1938E15C5454900937CC7 /* NSString+Versioning.m in Sources */,
+ 0AF1939115C5454900937CC7 /* SS+Functions.m in Sources */,
+ 0A15527015C54CD1006B9219 /* SS+System.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 0AFE255B15B59CD1008A8BA9 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 0AFE257115B59CD1008A8BA9 /* SubjectiveScriptTests.m in Sources */,
+ 0AF1930515C5346B00937CC7 /* SS+JavaScript.m in Sources */,
+ 0AF1930815C5346B00937CC7 /* SS+Types.m in Sources */,
+ 0AF1930E15C5346B00937CC7 /* NSArray+SS.m in Sources */,
+ 0AF1931115C5346B00937CC7 /* NSDate+SS.m in Sources */,
+ 0AF1931415C5346B00937CC7 /* NSDictionary+SS.m in Sources */,
+ 0AF1931715C5346B00937CC7 /* NSMutableArray+SS.m in Sources */,
+ 0AF1931A15C5346B00937CC7 /* NSMutableDictionary+SS.m in Sources */,
+ 0AF1931D15C5346B00937CC7 /* NSMutableString+SS.m in Sources */,
+ 0AF1932015C5346B00937CC7 /* NSNumber+SS.m in Sources */,
+ 0AF1932315C5346B00937CC7 /* NSObject+SS.m in Sources */,
+ 0AF1932615C5346B00937CC7 /* NSString+SS.m in Sources */,
+ 0AF1932B15C5346B00937CC7 /* SS.m in Sources */,
+ 0AF1935115C536BF00937CC7 /* NSObject+JavaScript.m in Sources */,
+ 0AF1935615C536DB00937CC7 /* NSArray+JavaScript.m in Sources */,
+ 0AF1935B15C536F100937CC7 /* NSMutableArray+JavaScript.m in Sources */,
+ 0AF1936015C5370700937CC7 /* NSDictionary+JavaScript.m in Sources */,
+ 0AF1936515C5371700937CC7 /* NSMutableDictionary+JavaScript.m in Sources */,
+ 0AF1936A15C5379400937CC7 /* NSString+JavaScript.m in Sources */,
+ 0AF1936F15C537A700937CC7 /* NSString+Ruby.m in Sources */,
+ 0AF1937915C53B3E00937CC7 /* NSDate+JavaScript.m in Sources */,
+ 0AF1937E15C53D7600937CC7 /* NSMutableString+JavaScript.m in Sources */,
+ 0AF1938315C53DB400937CC7 /* NSNumber+JavaScript.m in Sources */,
+ 0AF1938F15C5454900937CC7 /* NSString+Versioning.m in Sources */,
+ 0AF1939215C5454900937CC7 /* SS+Functions.m in Sources */,
+ 0AF1939D15C54A2000937CC7 /* QUnit+Tests.m in Sources */,
+ 0AF1939E15C54A2000937CC7 /* QUnit.m in Sources */,
+ 0A15527115C54CD1006B9219 /* SS+System.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 0AFE256715B59CD1008A8BA9 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 0AFE254F15B59CD1008A8BA9 /* SubjectiveScript */;
+ targetProxy = 0AFE256615B59CD1008A8BA9 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ 0AFE256C15B59CD1008A8BA9 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 0AFE256D15B59CD1008A8BA9 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 0AFE257215B59CD1008A8BA9 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ 0AFE257315B59CD1008A8BA9 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ COPY_PHASE_STRIP = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ SDKROOT = iphoneos;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 0AFE257515B59CD1008A8BA9 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DSTROOT = /tmp/SubjectiveScript.dst;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "SubjectiveScript/SubjectiveScript-Prefix.pch";
+ OTHER_LDFLAGS = "-ObjC";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SKIP_INSTALL = YES;
+ };
+ name = Debug;
+ };
+ 0AFE257615B59CD1008A8BA9 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DSTROOT = /tmp/SubjectiveScript.dst;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "SubjectiveScript/SubjectiveScript-Prefix.pch";
+ OTHER_LDFLAGS = "-ObjC";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SKIP_INSTALL = YES;
+ };
+ name = Release;
+ };
+ 0AFE257815B59CD1008A8BA9 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(SDKROOT)/Developer/Library/Frameworks",
+ "$(DEVELOPER_LIBRARY_DIR)/Frameworks",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "SubjectiveScript/SubjectiveScript-Prefix.pch";
+ INFOPLIST_FILE = "SubjectiveScriptTests/SubjectiveScriptTests-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = octest;
+ };
+ name = Debug;
+ };
+ 0AFE257915B59CD1008A8BA9 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(SDKROOT)/Developer/Library/Frameworks",
+ "$(DEVELOPER_LIBRARY_DIR)/Frameworks",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "SubjectiveScript/SubjectiveScript-Prefix.pch";
+ INFOPLIST_FILE = "SubjectiveScriptTests/SubjectiveScriptTests-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = octest;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 0AFE254A15B59CD1008A8BA9 /* Build configuration list for PBXProject "SubjectiveScript.m" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 0AFE257215B59CD1008A8BA9 /* Debug */,
+ 0AFE257315B59CD1008A8BA9 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 0AFE257415B59CD1008A8BA9 /* Build configuration list for PBXNativeTarget "SubjectiveScript" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 0AFE257515B59CD1008A8BA9 /* Debug */,
+ 0AFE257615B59CD1008A8BA9 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 0AFE257715B59CD1008A8BA9 /* Build configuration list for PBXNativeTarget "SubjectiveScriptTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 0AFE257815B59CD1008A8BA9 /* Debug */,
+ 0AFE257915B59CD1008A8BA9 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 0AFE254715B59CD1008A8BA9 /* Project object */;
+}
41 SubjectiveScript/Helpers/NSString+Versioning.h
@@ -0,0 +1,41 @@
+//
+// NSString-Versioning.h
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/22/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "SSTypes.h"
+
+@interface NSString (Versioning)
+
+// version should be in the form @"3.1.1" or @"4.0"
+- (B(^)(NSS* version))VersionEqualTo;
+- (B(^)(NSS* version))VersionGreaterThan;
+- (B(^)(NSS* version))VersionGreaterThanOrEqualTo;
+- (B(^)(NSS* version))VersionLessThan;
+- (B(^)(NSS* version))VersionLessThanOrEqualTo;
+
+@end
71 SubjectiveScript/Helpers/NSString+Versioning.m
@@ -0,0 +1,71 @@
+//
+// NSString-Versioning.h
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/22/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+// Technique from http://stackoverflow.com/questions/3339722/check-iphone-ios-version
+//
+
+#import "NSString+Versioning.h"
+
+@implementation NSString (Versioning)
+
+- (B(^)(NSS* version))VersionEqualTo
+{
+ return ^B(NSS* version) {
+ return ([self compare:version options:NSNumericSearch] == NSOrderedSame);
+ };
+}
+
+- (B(^)(NSS* version))VersionGreaterThan
+{
+ return ^B(NSS* version) {
+ return ([self compare:version options:NSNumericSearch] == NSOrderedDescending);
+ };
+}
+
+- (B(^)(NSS* version))VersionGreaterThanOrEqualTo
+{
+ return ^B(NSS* version) {
+ return ([self compare:version options:NSNumericSearch] != NSOrderedAscending);
+ };
+}
+
+- (B(^)(NSS* version))VersionLessThan
+{
+ return ^B(NSS* version) {
+ return ([self compare:version options:NSNumericSearch] == NSOrderedAscending);
+ };
+}
+
+- (B(^)(NSS* version))VersionLessThanOrEqualTo
+{
+ return ^B(NSS* version) {
+ return ([self compare:version options:NSNumericSearch] != NSOrderedDescending);
+ };
+}
+
+@end
38 SubjectiveScript/Helpers/SS+Functions.h
@@ -0,0 +1,38 @@
+//
+// SS+Functions.h
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/29/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "SS.h"
+
+@interface SS (Functions)
+
++ (A*(^)(NSO* obj))functionNames;
++ (id(^)(id target, NSS* functionName))resolveFunction;
++ (id(^)(id block, NSA* arguments))callFunction;
+
+@end
122 SubjectiveScript/Helpers/SS+Functions.m
@@ -0,0 +1,122 @@
+//
+// SS+Functions.m
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/29/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "SS+Functions.h"
+#import "SSArguments.h"
+#import "SS+Types.h"
+#import "NSArray+SS.h"
+#import <objc/message.h>
+
+typedef id(^SSBlock0)();
+typedef id(^SSBlock1)(id arg1, ...);
+typedef id(^SSBlock2)(id arg1, id arg2, ...);
+typedef id(^SSBlock3)(id arg1, id arg2, id arg3, ...);
+typedef id(^SSBlock4)(id arg1, id arg2, id arg3, id arg4, ...);
+typedef id(^SSBlock5)(id arg1, id arg2, id arg3, id arg4, id arg5, ...);
+typedef id(^SSBlock6)(id arg1, id arg2, id arg3, id arg4, id arg5, id arg6, ...);
+
+@implementation SS (Functions)
+
++ (A*(^)(NSO* obj))functionNames
+{
+ return ^(NSO* obj){
+ __block A* results = A.new;
+
+ // check the dictionary
+ if (SS.isObject(obj))
+ {
+ NSD* dictionary = (NSD*) obj;
+ [dictionary enumerateKeysAndObjectsUsingBlock:^(id key, id value, B *stop) {
+ if (SS.isBlock(value))
+ [results addObject:key];
+ }];
+ }
+
+ // REVIEW: should I support properties?
+
+ // REVIEW: should I support functions? (some internal methods crash)
+// Method* methodlist = class_copyMethodList(object_getClass(self), &count);
+//
+// UI count = 0;
+// for(I index=0;index<count;index++) {
+// // only JavaScript-style properties
+// if (method_getNumberOfArguments(methodlist[index]) != 2) continue;
+// char* returnType = method_copyReturnType(methodlist[index]);
+// SEL methodSelector = method_getName(methodlist[index]);
+// NSString *name = NSStringFromSelector(methodSelector);
+// if ([name hasPrefix:@"_"]) continue; // skip internal
+// @try {
+// id propertyOrBlock = objc_msgSend(self, methodSelector);
+// if (SS.isBlock(propertyOrBlock)) results.push(NSStringFromSelector(methodSelector));
+// }
+// @catch (NSException* e) {
+// }
+// }
+ return results;
+ };
+}
+
++ (id(^)(id target, NSS* functionName))resolveFunction
+{
+ return ^id(id target, NSS* functionName) {
+ // assume only JavaScript-style block methods or properties are used
+ id propertyOrBlock;
+ SEL methodSelector = NSSelectorFromString(functionName);
+ if ([target respondsToSelector:methodSelector])
+ propertyOrBlock = objc_msgSend(target, methodSelector);
+ else
+ propertyOrBlock = [target valueForKey:functionName];
+
+ return SS.isBlock(propertyOrBlock) ? propertyOrBlock : nil;
+ };
+}
+
++ (id(^)(id block, NSA* arguments))callFunction
+{
+ return ^id(id block, NSA* arguments) {
+ // REVIEW: is there a safer and more flexible way to call blocks by signature?
+ switch(arguments.count) {
+ case 0: return ((SSBlock0)block)();
+ case 1: return ((SSBlock1)block)(arguments.getArgAt(0), nil);
+ case 2: return ((SSBlock2)block)(arguments.getArgAt(0), arguments.getArgAt(1), nil);
+ case 3: return ((SSBlock3)block)(arguments.getArgAt(0), arguments.getArgAt(1), arguments.getArgAt(2), nil);
+ case 4: return ((SSBlock4)block)(arguments.getArgAt(0), arguments.getArgAt(1), arguments.getArgAt(2), arguments.getArgAt(3), nil);
+ case 5: return ((SSBlock5)block)(arguments.getArgAt(0), arguments.getArgAt(1), arguments.getArgAt(2), arguments.getArgAt(3), arguments.getArgAt(4), nil);
+ case 6: return ((SSBlock6)block)(arguments.getArgAt(0), arguments.getArgAt(1), arguments.getArgAt(2), arguments.getArgAt(3), arguments.getArgAt(4), arguments.getArgAt(5), nil);
+ default:
+#ifdef DEBUG
+ NSAssert(nil, @"number of parameters not yet supported for apply");
+#endif
+
+ return nil;
+ }
+ };
+}
+
+@end
39 SubjectiveScript/Helpers/SS+System.h
@@ -0,0 +1,39 @@
+//
+// SS-System.h
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/22/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "SS.h"
+
+@interface SS (System)
+
++ (NSS*)iOSVersion;
+
++ (SSTaskId*(^)(SSTaskIdBlock block, I waitNS, BOOL background))addTask;
++ (void(^)(SSTaskId* taskId))stopTask;
+
+@end
106 SubjectiveScript/Helpers/SS+System.m
@@ -0,0 +1,106 @@
+//
+// SS-System.h
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/22/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+// Technique from http://stackoverflow.com/questions/3339722/check-iphone-ios-version
+//
+
+#import "SS+System.h"
+#import "NSString+Versioning.h"
+#import <UIKit/UIKit.h>
+
+@implementation SS (System)
+
++ (NSS*)iOSVersion { return [[UIDevice currentDevice] systemVersion]; }
+
++ (A*)_runningTaskList
+{
+ static NSMutableArray *sharedInstance = nil;
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+ sharedInstance = A.new;
+ });
+ return sharedInstance;
+}
+
++ (SSTaskId*(^)(SSTaskIdBlock block, I waitNS, BOOL background))addTask
+{
+ return ^(SSTaskIdBlock block, I waitNS, BOOL background) {
+ SSTaskId* taskId;
+
+ @synchronized(self) {
+ static I id = 0; id++;
+
+ taskId = [NSNumber numberWithInteger:id];
+ [[SS _runningTaskList] addObject:taskId];
+ }
+
+ dispatch_queue_t dispatchQueue;
+
+ if (background) {
+ if (SS.iOSVersion.VersionLessThan(@"5.0"))
+ dispatchQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0UL);
+ else
+ dispatchQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0UL);
+ }
+ else
+ dispatchQueue = dispatch_get_main_queue();
+
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, waitNS), dispatchQueue, ^{
+ @synchronized(self) {
+ A* runningList = [SS _runningTaskList];
+ UI index = [runningList indexOfObject:taskId];
+ if (index == NSNotFound) // not running, exit
+ return;
+
+ // still running, remove and call
+ [runningList removeObjectAtIndex:index];
+ block();
+ }
+ });
+ return taskId;
+ };
+}
+
++ (void(^)(SSTaskId* taskId))stopTask
+{
+ return ^(SSTaskId* taskId) {
+ if (!taskId) return; // no timeout
+
+ @synchronized(self) {
+ A* runningList = [SS _runningTaskList];
+ UI index = [runningList indexOfObject:taskId];
+ if (index == NSNotFound) // not running, exit
+ return;
+
+ // running, remove from running list
+ [runningList removeObjectAtIndex:index];
+ }
+ };
+}
+
+@end
121 SubjectiveScript/Helpers/SSArguments.h
@@ -0,0 +1,121 @@
+//
+// SSArguments.h
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/17/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "NSMutableArray+SS.h"
+
+// any number of arguments of type id or NSObject terminated with nil
+#define ARGS_AO(_name, _lastNamedArg) \
+ A* _name = A.newArguments; \
+ { \
+ va_list argList; \
+ va_start(argList, _lastNamedArg); \
+ for (NSO* arg = _lastNamedArg; arg != nil; arg = va_arg(argList, NSO*)) { [_name addObject:arg]; } \
+ va_end(argList); \
+ }
+
+// any number of arguments of type NSInteger terminated with AI_END
+#define AI_END (I)NSNotFound
+#define ARGS_AI(_name, _lastNamedArg) \
+ A* _name = A.newArguments; \
+ { \
+ va_list argList; \
+ va_start(argList, _lastNamedArg); \
+ for (I arg = _lastNamedArg; arg != AI_END; arg = va_arg(argList, I)) { [_name addObject:N.I(arg)]; } \
+ va_end(argList); \
+ }
+
+// one argument of type BOOL
+#define ARG_B(_name, _lastNamedArg) \
+ I _name; \
+ { \
+ va_list argList; \
+ va_start(argList, _lastNamedArg); \
+ _name = va_arg(argList, B); \
+ va_end(argList); \
+ }
+
+// one argument of type NSInteger
+#define ARG_I(_name, _lastNamedArg) \
+ I _name; \
+ { \
+ va_list argList; \
+ va_start(argList, _lastNamedArg); \
+ _name = va_arg(argList, I); \
+ va_end(argList); \
+ }
+
+// one argument of type NSUInteger
+#define ARG_UI(_name, _lastNamedArg) \
+ UI _name; \
+ { \
+ va_list argList; \
+ va_start(argList, _lastNamedArg); \
+ _name = va_arg(argList, UI); \
+ va_end(argList); \
+ }
+
+// one argument of type float
+#define ARG_F(_name, _lastNamedArg) \
+ F _name; \
+ { \
+ va_list argList; \
+ va_start(argList, _lastNamedArg); \
+ _name = va_arg(argList, F); \
+ va_end(argList); \
+ }
+
+// one argument of type double
+#define ARG_D(_name, _lastNamedArg) \
+ D _name; \
+ { \
+ va_list argList; \
+ va_start(argList, _lastNamedArg); \
+ _name = va_arg(argList, D); \
+ va_end(argList); \
+ }
+
+// one argument of type NSNumber
+#define ARG_N(_name, _lastNamedArg) \
+ N* _name; \
+ { \
+ va_list argList; \
+ va_start(argList, _lastNamedArg); \
+ _name = va_arg(argList, N*); \
+ va_end(argList); \
+ }
+
+// one argument of type NSNumber
+#define ARG_NSO(_name, _lastNamedArg) \
+ NSO* _name; \
+ { \
+ va_list argList; \
+ va_start(argList, _lastNamedArg); \
+ _name = va_arg(argList, NSO*); \
+ va_end(argList); \
+ }
46 SubjectiveScript/JavaScript/NSArray+JavaScript.h
@@ -0,0 +1,46 @@
+//
+// NSArray+JavaScript.h
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/29/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "SSTypes.h"
+
+@interface NSArray (JavaScript)
+
+- (NSS*(^)())toString;
+- (UI)length;
+- (B(^)(id key))hasOwnProperty;
+
+// accessor Array functions
+- (A*(^)(NSA* other))concat;
+- (S*(^)(NSS* separator))join;
+- (NSA*(^)(I start, I count))slice; // TODO: test with negative parameters
+
+- (A*(^)())reverse;
+- (A*(^)())flatten;
+
+@end
127 SubjectiveScript/JavaScript/NSArray+JavaScript.m
@@ -0,0 +1,127 @@
+//
+// NSArray+JavaScript.m
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/29/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "NSArray+JavaScript.h"
+#import "NSArray+SS.h"
+#import "NSMutableString+JavaScript.h"
+#import "NSObject+JavaScript.h"
+#import "NSString+SS.h"
+#import "NSNumber+SS.h"
+#import "SS+JavaScript.h"
+#import "SS+Types.h"
+
+@implementation NSArray (JavaScript)
+
+- (NSS*(^)())toString { return ^{ return S.newFormatted(@"[%@]", self.join(@",")); }; }
+- (UI)length { return self.count; }
+- (B(^)(id key))hasOwnProperty
+{
+ return ^B(id key) {
+ N* indexNumber = (N*)key;
+
+ // requesting a property
+ if ([key isKindOfClass:[NSString class]])
+ indexNumber = SS.parseInt((NSS*)key);
+ if (!indexNumber) return false;
+
+ I index = indexNumber.I;
+ return (index >=0) && (index < self.count);
+ };
+}
+
+// accessor Array functions
+- (A*(^)(NSA* other))concat
+{
+ return ^(NSA* other) {
+ return ((A*)self.mutableCopy).concat(other);
+ };
+}
+
+- (S*(^)(NSS* separator))join
+{
+ return ^(NSS* separator) {
+ S* result = S.new;
+ UI count = self.count;
+
+ for (I index=0; index<count; index++) {
+ NSO* item = [self objectAtIndex:index];
+ if (index>0) result.append(separator);
+
+ // JavaScript collapses arrays on join only if they do not contain other arrays and there are multiple elements. A bit quirky, but supported.
+ if ((index>0) && SS.isArray(item) && (((NSA*)item).count==1)) {
+ B hasArrays = NO;
+ for (NSO* subitem in (NSA*)item) {
+ if (SS.isArray(subitem)) {
+ hasArrays = YES;
+ break;
+ }
+ }
+ if(hasArrays)
+ result.append(item.toString());
+ else
+ result.append(item.join(separator));
+ }
+ else
+ result.append(item.toString());
+ }
+ return result;
+ };
+}
+
+- (NSA*(^)(I start, I count))slice
+{
+ return ^(I start, I count) {
+ NSRange range = self.resolveRange(start, count);
+ if (range.length<=0) return NSA.new;
+ return [self subarrayWithRange:range];
+ };
+}
+
+- (A*(^)())reverse
+{
+ return ^{
+ return ((A*)self.mutableCopy).reverse();
+ };
+}
+
+- (A*(^)())flatten
+{
+ return ^{
+ A* output = A.new;
+ for (id value in self) {
+ if (SS.isArray(value))
+ [output addObjectsFromArray:((NSA*)value).flatten()];
+ else
+ output.push(value);
+ }
+ return output;
+ };
+}
+
+@end
36 SubjectiveScript/JavaScript/NSDate+JavaScript.h
@@ -0,0 +1,36 @@
+//
+// NSDate+JavaScript.h
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/29/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "SSTypes.h"
+
+@interface NSDate (JavaScript)
+
+- (NSS*(^)())toString;
+
+@end
36 SubjectiveScript/JavaScript/NSDate+JavaScript.m
@@ -0,0 +1,36 @@
+//
+// NSDate+JavaScript.m
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/29/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "NSDate+JavaScript.h"
+
+@implementation NSDate (JavaScript)
+
+- (NSS*(^)())toString { return ^{ return self.description; }; } // TODO: update to ISO8601 format
+
+@end
38 SubjectiveScript/JavaScript/NSDictionary+JavaScript.h
@@ -0,0 +1,38 @@
+//
+// NSDictionary+JavaScript.h
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/29/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "SSTypes.h"
+
+@interface NSDictionary (JavaScript)
+
+- (NSS*(^)())toString;
+
+- (B(^)(id key))hasOwnProperty;
+
+@end
38 SubjectiveScript/JavaScript/NSDictionary+JavaScript.m
@@ -0,0 +1,38 @@
+//
+// NSDictionary+JavaScript.m
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/29/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "NSDictionary+JavaScript.h"
+
+@implementation NSDictionary (JavaScript)
+
+- (NSS*(^)())toString { return ^{ return self.description; }; }
+
+- (B(^)(id key))hasOwnProperty { return ^B(id key) { return [self objectForKey:key] != nil; }; }
+
+@end
45 SubjectiveScript/JavaScript/NSMutableArray+JavaScript.h
@@ -0,0 +1,45 @@
+//
+// NSMutableArray+JavaScript.h
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/29/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "SSTypes.h"
+
+@interface NSMutableArray (JavaScript)
+
+// accessor Array functions
+- (A*(^)(NSA* other))concat;
+
+// mutator Array functions
+- (NSO*(^)())pop;
+- (A*(^)(id value))push;
+- (A*(^)())reverse;
+- (A*(^)(SSSortBlock iterator))sort;
+- (NSA*(^)(I start, I count, id item1, ... /* NIL_TERMINATED */))splice;
+- (A*(^)(id item1, ... /* NIL_TERMINATED */))unshift;
+
+@end
121 SubjectiveScript/JavaScript/NSMutableArray+JavaScript.m
@@ -0,0 +1,121 @@
+//
+// NSMutableArray+JavaScript.m
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/29/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "NSMutableArray+JavaScript.h"
+#import "NSMutableArray+SS.h"
+#import "NSArray+SS.h"
+#import "SS+Types.h"
+#import "SSArguments.h"
+
+@implementation NSMutableArray (JavaScript)
+
+// accessor Array functions
+- (A*(^)(NSA* other))concat
+{
+ return ^(NSA* other) {
+ A* result = self.mutableCopy;
+ [result addObjectsFromArray:other];
+ return result;
+ };
+}
+
+// mutator Array functions
+- (A*(^)(id))push
+{
+ return ^(id value) {
+ [self addObject:value];
+ return self;
+ };
+}
+
+- (NSO*(^)())pop
+{
+ return ^() {
+ id value = [self lastObject];
+ [self removeLastObject];
+ return value;
+ };
+}
+
+- (A*(^)())reverse
+{
+ return ^{
+ A* result = A.newC(self.count);
+ for (id item in self.reverseObjectEnumerator) {
+ [result addObject:item];
+ }
+ return result;
+ };
+}
+
+- (A*(^)(SSSortBlock iterator))sort
+{
+ return ^(SSSortBlock block) {
+ if (SS.isBlock(block))
+ [self sortUsingComparator:block];
+ else
+ [self sortUsingSelector:@selector(compare:)];
+ return self;
+ };
+}
+
+- (NSA*(^)(I start, I count, id item1, ... /* NIL_TERMINATED */))splice
+{
+ return ^(I start, I count, id item1, ... /* NIL_TERMINATED */) {
+ ARGS_AO(items, item1);
+
+ NSA* results;
+ NSRange range = self.resolveRange(start, count);
+ if (range.length>0)
+ {
+ results = [self subarrayWithRange:range];
+ [self removeObjectsInRange:range];
+ }
+ else
+ results = NSA.new;
+
+ for (id item in items.reverseObjectEnumerator)
+ [self insertObject:item atIndex:0];
+
+ return results;
+ };
+}
+
+- (A*(^)(id item1, ...))unshift
+{
+ return ^(id item1, ...) {
+ ARGS_AO(items, item1);
+ for (id item in items.reverseObjectEnumerator)
+ [self insertObject:item atIndex:0];
+
+ return self;
+ };
+}
+
+@end
36 SubjectiveScript/JavaScript/NSMutableDictionary+JavaScript.h
@@ -0,0 +1,36 @@
+//
+// NSMutableDictionary+JavaScript.h
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/29/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "SSTypes.h"
+
+@interface NSMutableDictionary (JavaScript)
+
+- (O*(^)(id key))delete_;
+
+@end
42 SubjectiveScript/JavaScript/NSMutableDictionary+JavaScript.m
@@ -0,0 +1,42 @@
+//
+// NSMutableDictionary+JavaScript.m
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/29/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "NSMutableDictionary+JavaScript.h"
+
+@implementation NSMutableDictionary (JavaScript)
+
+- (O*(^)(id key))delete_
+{
+ return ^(id key) {
+ [self removeObjectForKey:key];
+ return self;
+ };
+}
+
+@end
36 SubjectiveScript/JavaScript/NSMutableString+JavaScript.h
@@ -0,0 +1,36 @@
+//
+// NSMutableString+JavaScript.h
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/29/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "SSTypes.h"
+
+@interface NSMutableString (JavaScript)
+
+- (S*(^)(NSS* value))append;
+
+@end
42 SubjectiveScript/JavaScript/NSMutableString+JavaScript.m
@@ -0,0 +1,42 @@
+//
+// NSMutableString+JavaScript.m
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/29/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "NSMutableString+JavaScript.h"
+
+@implementation NSMutableString (JavaScript)
+
+- (S*(^)(NSS* value))append
+{
+ return ^(NSS* value) {
+ [self appendString:value];
+ return self;
+ };
+}
+
+@end
37 SubjectiveScript/JavaScript/NSNumber+JavaScript.h
@@ -0,0 +1,37 @@
+//
+// NSNumber+JavaScript.h
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/29/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "SSTypes.h"
+
+@interface NSNumber (JavaScript)
+
+- (const NSS*)typeof;
+- (NSS*(^)())toString;
+
+@end
48 SubjectiveScript/JavaScript/NSNumber+JavaScript.m
@@ -0,0 +1,48 @@
+//
+// NSNumber+JavaScript.m
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/29/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "NSNumber+JavaScript.h"
+#import "NSNumber+SS.h"
+
+static const NSS* SSJSIdentifierNumber = @"number";
+static const NSS* SSJSIdentifierBoolean = @"boolean";
+
+@implementation NSNumber (JavaScript)
+
+- (const NSS*)typeof { return self.isBoolean ? SSJSIdentifierNumber : SSJSIdentifierBoolean; }
+- (NSS*(^)())toString {
+ return ^{
+ if (self.isBoolean)
+ return self.boolValue ? @"true" : @"false";
+ else
+ return self.description;
+ };
+}
+
+@end
47 SubjectiveScript/JavaScript/NSObject+JavaScript.h
@@ -0,0 +1,47 @@
+//
+// NSObject+JavaScript.h
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/29/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "SSTypes.h"
+
+@interface NSObject (JavaScript)
+
+- (const NSS*)typeof;
+- (B(^)(NSS* className))instanceof;
+- (NSS*(^)())toString;
+
+// array
+- (UI)length;
+- (S*(^)(NSS* separator))join;
+- (A*(^)(id value))push;
+
+// object
+- (B(^)(id key))hasOwnProperty;
+- (B(^)(NSO* obj))in;
+
+@end
93 SubjectiveScript/JavaScript/NSObject+JavaScript.m
@@ -0,0 +1,93 @@
+//
+// NSObject+JavaScript.m
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/29/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "NSObject+JavaScript.h"
+#import "NSObject+SS.h"
+#import "SS+Types.h"
+
+const NSS* SSJSIdentifierObject = @"object";
+
+@implementation NSObject (JavaScript)
+
+- (const NSS*)typeof {return SSJSIdentifierObject; }
+- (B(^)(NSS* className))instanceof {
+ return ^(NSS* className) {
+ return [self isKindOfClass:NSClassFromString(className)];
+ };
+}
+- (NSS*(^)())toString
+{
+ return ^{
+ if (SS.isNull(self)) return @"";
+ return self.description;
+ };
+}
+
+// array
+- (UI)length
+{
+ // base class can be triggered by KeyValueCoding
+ if (SS.isArray(self)) return ((NSA*)self).count;
+ if (SS.isString(self)) return ((NSS*)self).length;
+ return 0;
+}
+- (S*(^)(NSS* separator))join
+{
+#ifdef DEBUG
+ NSAssert(nil, @"join not implemented for this type");
+#endif
+
+ return nil;
+}
+- (A*(^)(id value))push
+{
+ return ^(NSO* obj) {
+ #ifdef DEBUG
+ NSAssert(nil, @"push not implemented for this type");
+ #endif
+ return A.new;
+ };
+}
+
+// object
+- (B(^)(id key))hasOwnProperty
+{
+ return ^B(id key) {
+ return false;
+ };
+}
+
+- (B(^)(NSO* obj))in
+{
+ return ^B(NSO* obj) {
+ return obj.get(self) != nil;
+ };
+}
+
+@end
44 SubjectiveScript/JavaScript/NSString+JavaScript.h
@@ -0,0 +1,44 @@
+//
+// NSString+JavaScript.h
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/29/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "SSTypes.h"
+
+@interface NSString (JavaScript)
+
+- (const NSS*)typeof;
+- (NSS*(^)())toString;
+
+- (NSA*(^)(NSS* separator))split;
+- (S*(^)(NSS* value))add;
+
+// function calling of form @"functionName".call(object, arg1, nil) and @"functionName".apply(object, arguments)
+- (id(^)(id target, id arg1, ... /* NIL_TERMINATED*/))call;
+- (id(^)(id target, NSA* arguments))apply;
+
+@end
96 SubjectiveScript/JavaScript/NSString+JavaScript.m
@@ -0,0 +1,96 @@
+//
+// NSString+JavaScript.m
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/29/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "NSString+JavaScript.h"
+#import "NSMutableArray+JavaScript.h"
+#import "SSArguments.h"
+#import "SS+Functions.h"
+
+const NSS* SSJSIdentifierString = @"string";
+
+@implementation NSString (JavaScript)
+
+- (const NSS*)typeof { return SSJSIdentifierString; }
+- (NSS*(^)())toString { return ^{ return self; }; }
+
+- (NSA*(^)(NSS* separator))split
+{
+ return ^NSA*(NSS* separator) {
+ // split on nothing means get the characters
+ if (!separator || !separator.length)
+ {
+ UI count = self.length;
+ A *characters = A.newC(count);
+ for (I index=0; index<count; index++) {
+ characters.push([self substringWithRange:NSMakeRange(index, 1)]);
+ }
+ return characters;
+ }
+ else
+ return [self componentsSeparatedByString:separator];
+ };
+}
+- (S*(^)(NSS* value))add
+{
+ return ^(NSS* value) {
+ S* result = self.mutableCopy;
+ [result appendString:value];
+ return result;
+ };
+}
+
+- (id(^)(id target, id arg1, ... /* NIL_TERMINATED*/))call
+{
+ return ^id(id target, id arg1, ... /* NIL_TERMINATED*/) {
+ ARGS_AO(arguments, arg1);
+
+ id scriptFunction = SS.resolveFunction(target, self);
+ if (!scriptFunction) {
+ NSLog(@"function '%@' did not exist for call", self);
+ return nil;
+ }
+
+ return SS.callFunction(scriptFunction, arguments);
+ };
+}
+
+- (id(^)(id target, NSA* arguments))apply
+{
+ return ^id(id target, NSA* arguments) {
+ id scriptFunction = SS.resolveFunction(target, self);
+ if (!scriptFunction) {
+ NSLog(@"function '%@' did not exist for apply", self);
+ return nil;
+ }
+
+ return SS.callFunction(scriptFunction, arguments);
+ };
+}
+
+@end
50 SubjectiveScript/JavaScript/SS+JavaScript.h
@@ -0,0 +1,50 @@
+//
+// SS+JavaScript.h
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/22/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "SS.h"
+#import "SS+System.h"
+
+@interface SS (JavaScript)
+
+// JSON
++ (NSS*(^)(NSO* obj))stringify;
+
+// functions
++ (id(^)(id function, id arg1, ... /* NIL_TERMINATED*/))call;
++ (id(^)(id function, NSA* arguments))apply;
+
+// global functions
++ (N*(^)(NSS* string))parseInt;
+
+// timeouts
++ (SSTaskId*(^)(SSTaskIdBlock block, I waitNS))setTimeout;
++ (SSTaskId*(^)(SSTaskIdBlock block, I waitNS))setTimeoutBackground;
++ (void(^)(SSTaskId* timeout))clearTimeout;
+
+@end
90 SubjectiveScript/JavaScript/SS+JavaScript.m
@@ -0,0 +1,90 @@
+//
+// SS+JavaScript.m
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/22/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "SS+JavaScript.h"
+#import "NSObject+JavaScript.h"
+#import "NSNumber+SS.h"
+#import "SS+Functions.h"
+#import "SSArguments.h"
+
+@implementation SS (JavaScript)
+
+// JSON
++ (NSS*(^)(NSO* obj))stringify { return ^(NSO* obj) { return obj.toString(); }; }
+
+// functions
++ (id(^)(id function, id arg1, ... /* NIL_TERMINATED*/))call
+{
+ return ^id(id function, id arg1, ... /* NIL_TERMINATED*/) {
+ ARGS_AO(arguments, arg1);
+ return SS.callFunction(function, arguments);
+ };
+}
+
++ (id(^)(id function, NSA* arguments))apply
+{
+ return ^id(id function, NSA* arguments) {
+ return SS.callFunction(function, arguments);
+ };
+}
+
+
+// global functions
++ (N*(^)(NSS* string))parseInt
+{
+ return ^N*(NSS* string) {
+ NSScanner* scan = [NSScanner scannerWithString:string];
+ I result;
+ if([scan scanInteger:&result] && [scan isAtEnd])
+ return N.I(result);
+ return nil;
+ };
+}
+
+// timeouts
++ (SSTaskId*(^)(SSTaskIdBlock block, I waitNS))setTimeout
+{
+ return ^(SSTaskIdBlock block, I waitNS) {
+ return SS.addTask(block, waitNS, false);
+ };
+}
++ (SSTaskId*(^)(SSTaskIdBlock block, I waitNS))setTimeoutBackground
+{
+ return ^(SSTaskIdBlock block, I waitNS) {
+ return SS.addTask(block, waitNS, true);
+ };
+}
+
++ (void(^)(SSTaskId* timeout))clearTimeout
+{
+ return ^(SSTaskId* timeout) {
+ return SS.stopTask(timeout);
+ };
+}
+@end
42 SubjectiveScript/JavaScript/SS+Types.h
@@ -0,0 +1,42 @@
+//
+// SSTypes.h
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/17/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "SS.h"
+
+@interface SS (Types)
+
++ (B(^)(id obj))isArray;
++ (B(^)(id obj))isObject;
++ (B(^)(id obj))isString;
++ (B(^)(id obj))isNumber;
++ (B(^)(id obj))isDate;
++ (B(^)(id obj))isNull;
++ (B(^)(id obj))isBlock;
+
+@end
42 SubjectiveScript/JavaScript/SS+Types.m
@@ -0,0 +1,42 @@
+//
+// SS+Types.m
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/17/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#import "SS+Types.h"
+
+@implementation SS (Types)
+
++ (B(^)(id obj))isArray { return ^(id obj) { return [obj isKindOfClass:[NSArray class]]; }; }
++ (B(^)(id obj))isObject { return ^(id obj) { return [obj isKindOfClass:[NSDictionary class]]; }; }
++ (B(^)(id obj))isString { return ^(id obj) { return [obj isKindOfClass:[NSString class]]; }; }
++ (B(^)(id obj))isNumber { return ^(id obj) { return [obj isKindOfClass:[NSNumber class]]; }; }
++ (B(^)(id obj))isDate { return ^(id obj) { return [obj isKindOfClass:[NSDate class]]; }; }
++ (B(^)(id obj))isNull { return ^B(id obj) { return !obj || [obj isKindOfClass:[NSNull class]]; }; }
++ (B(^)(id obj))isBlock { return ^(id obj) { return [obj isKindOfClass:NSClassFromString(@"NSBlock")]; }; }
+
+@end
34 SubjectiveScript/Ruby/NSString+Ruby.h
@@ -0,0 +1,34 @@
+//
+// NSString+Ruby.h
+// SubjectiveScript.m
+//
+// Created by Kevin Malakoff on 7/29/12.
+// Copyright (c) 2012 Kevin Malakoff. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.