Swift type extensions for people who think in JavaScript.
All extension functions behave as similar as possible to how they are described in the JavaScript docs on MDN.
If there's a type or builtin function that is unsupported here:
- Add a new file titled
js[Type].swift
. - Add a test file in the folder
jsSwiftTests/
titledjs[Type]Tests.swift
. - Add the new Type file to jsSwiftTests target membership. (Click on new file > Right Panel/Inspector Panel > Target Membership > Check jsSwiftTests)
- Test it and submit a PR!
- Date setters
- RegExp
- JSON
- Number
With other XCode projects you may be used to pressing ⌘B and ⌘R, you'll want to be pressing the test shortcut key here: ⌘U.