diff --git a/Hydra/Hydra.xcodeproj/project.xcworkspace/xcuserdata/danielemm.xcuserdatad/UserInterfaceState.xcuserstate b/Hydra/Hydra.xcodeproj/project.xcworkspace/xcuserdata/danielemm.xcuserdatad/UserInterfaceState.xcuserstate index ceb6fbd..7a6ab80 100644 Binary files a/Hydra/Hydra.xcodeproj/project.xcworkspace/xcuserdata/danielemm.xcuserdatad/UserInterfaceState.xcuserstate and b/Hydra/Hydra.xcodeproj/project.xcworkspace/xcuserdata/danielemm.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Package.swift b/Package.swift new file mode 100755 index 0000000..22ef8f1 --- /dev/null +++ b/Package.swift @@ -0,0 +1,37 @@ +/* + * Hydra + * Fullfeatured lightweight Promise & Await Library for Swift + * + * Created by: Daniele Margutti + * Email: hello@danielemargutti.com + * Web: http://www.danielemargutti.com + * Twitter: @danielemargutti + * + * Copyright © 2017 Daniele Margutti + * + * + * 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 PackageDescription + +let package = Package( + name: "Hydra" +) diff --git a/README.md b/README.md index def4497..c6a0412 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Made with love in pure Swift 3+ ♥

-Hydra is full-featured lightweight library which allows you to write better async code in Swift 3+. It's partially based on JavaScript A+ specs and also implements modern construct like `await`. +Hydra is full-featured lightweight library which allows you to write better async code in Swift 3+. It's partially based on [JavaScript A+](https://promisesaplus.com) specs and also implements modern construct like `await` (as seen in [Async/Await specification in ES8 (ECMAScript 2017)](https://github.com/tc39/ecmascript-asyncawait) or C#) which allows you to write async code in sync manner. With Hydra your code will be cleaner, easy to mantain and sexy as ever. @@ -129,7 +129,7 @@ Easy uh? (Please note: in this example context is not specified so the default ` ## Await: async code in sync manner -Have you ever dream to write asynchronous code like its synchronous counterpart? Hydra was heavily inspired by [Async/Await specification in ES8 (ECMAScript 2017) ](https://github.com/tc39/ecmascript-asyncawait)which provides a powerful way to write async doe in a sequential manner. +Have you ever dream to write asynchronous code like its synchronous counterpart? Hydra was heavily inspired by [Async/Await specification in ES8 (ECMAScript 2017) ](https://github.com/tc39/ecmascript-asyncawait) which provides a powerful way to write async doe in a sequential manner. Using `await` with Hydraw's Promises is pretty simple: for example the code above can be rewritten directly as: diff --git a/Sources/Await.swift b/Sources/Await.swift index dedd2d1..42b2a02 100644 --- a/Sources/Await.swift +++ b/Sources/Await.swift @@ -1,10 +1,35 @@ -// -// Await.swift -// Hydra -// -// Created by Daniele Margutti on 05/01/2017. -// Copyright © 2017 Daniele Margutti. All rights reserved. -// +/* +* Hydra +* Fullfeatured lightweight Promise & Await Library for Swift +* +* Created by: Daniele Margutti +* Email: hello@danielemargutti.com +* Web: http://www.danielemargutti.com +* Twitter: @danielemargutti +* +* Copyright © 2017 Daniele Margutti +* +* +* 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 Foundation diff --git a/Sources/Promise+All.swift b/Sources/Promise+All.swift index d5b1f37..0b9b02e 100644 --- a/Sources/Promise+All.swift +++ b/Sources/Promise+All.swift @@ -1,10 +1,35 @@ -// -// Promise+All.swift -// Hydra -// -// Created by Daniele Margutti on 05/01/2017. -// Copyright © 2017 Daniele Margutti. All rights reserved. -// +/* +* Hydra +* Fullfeatured lightweight Promise & Await Library for Swift +* +* Created by: Daniele Margutti +* Email: hello@danielemargutti.com +* Web: http://www.danielemargutti.com +* Twitter: @danielemargutti +* +* Copyright © 2017 Daniele Margutti +* +* +* 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 Foundation diff --git a/Sources/Promise+Always.swift b/Sources/Promise+Always.swift index d5f8e09..2abf4c5 100644 --- a/Sources/Promise+Always.swift +++ b/Sources/Promise+Always.swift @@ -1,10 +1,35 @@ -// -// Promise+Always.swift -// Hydra -// -// Created by Daniele Margutti on 05/01/2017. -// Copyright © 2017 Daniele Margutti. All rights reserved. -// +/* +* Hydra +* Fullfeatured lightweight Promise & Await Library for Swift +* +* Created by: Daniele Margutti +* Email: hello@danielemargutti.com +* Web: http://www.danielemargutti.com +* Twitter: @danielemargutti +* +* Copyright © 2017 Daniele Margutti +* +* +* 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 Foundation diff --git a/Sources/Promise+Any.swift b/Sources/Promise+Any.swift index 80a9a32..fb8e215 100644 --- a/Sources/Promise+Any.swift +++ b/Sources/Promise+Any.swift @@ -1,10 +1,35 @@ -// -// Promise+Any.swift -// Hydra -// -// Created by Daniele Margutti on 05/01/2017. -// Copyright © 2017 Daniele Margutti. All rights reserved. -// +/* +* Hydra +* Fullfeatured lightweight Promise & Await Library for Swift +* +* Created by: Daniele Margutti +* Email: hello@danielemargutti.com +* Web: http://www.danielemargutti.com +* Twitter: @danielemargutti +* +* Copyright © 2017 Daniele Margutti +* +* +* 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 Foundation diff --git a/Sources/Promise+Catch.swift b/Sources/Promise+Catch.swift index a921672..80196f7 100644 --- a/Sources/Promise+Catch.swift +++ b/Sources/Promise+Catch.swift @@ -1,10 +1,35 @@ -// -// Promise+Catch.swift -// Hydra -// -// Created by Daniele Margutti on 05/01/2017. -// Copyright © 2017 Daniele Margutti. All rights reserved. -// +/* +* Hydra +* Fullfeatured lightweight Promise & Await Library for Swift +* +* Created by: Daniele Margutti +* Email: hello@danielemargutti.com +* Web: http://www.danielemargutti.com +* Twitter: @danielemargutti +* +* Copyright © 2017 Daniele Margutti +* +* +* 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 Foundation diff --git a/Sources/Promise+Delay.swift b/Sources/Promise+Delay.swift index 4dabbc7..834df52 100644 --- a/Sources/Promise+Delay.swift +++ b/Sources/Promise+Delay.swift @@ -1,10 +1,35 @@ -// -// Promise+Delay.swift -// Hydra -// -// Created by Daniele Margutti on 05/01/2017. -// Copyright © 2017 Daniele Margutti. All rights reserved. -// +/* +* Hydra +* Fullfeatured lightweight Promise & Await Library for Swift +* +* Created by: Daniele Margutti +* Email: hello@danielemargutti.com +* Web: http://www.danielemargutti.com +* Twitter: @danielemargutti +* +* Copyright © 2017 Daniele Margutti +* +* +* 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 Foundation diff --git a/Sources/Promise+Ensure.swift b/Sources/Promise+Ensure.swift index cc2d031..1e039ff 100644 --- a/Sources/Promise+Ensure.swift +++ b/Sources/Promise+Ensure.swift @@ -1,10 +1,35 @@ -// -// Promise+Ensure.swift -// Hydra -// -// Created by Daniele Margutti on 05/01/2017. -// Copyright © 2017 Daniele Margutti. All rights reserved. -// +/* +* Hydra +* Fullfeatured lightweight Promise & Await Library for Swift +* +* Created by: Daniele Margutti +* Email: hello@danielemargutti.com +* Web: http://www.danielemargutti.com +* Twitter: @danielemargutti +* +* Copyright © 2017 Daniele Margutti +* +* +* 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 Foundation diff --git a/Sources/Promise+Forward.swift b/Sources/Promise+Forward.swift index a88a0b9..29e5a79 100644 --- a/Sources/Promise+Forward.swift +++ b/Sources/Promise+Forward.swift @@ -1,10 +1,35 @@ -// -// Promise+Forward.swift -// Hydra -// -// Created by Daniele Margutti on 05/01/2017. -// Copyright © 2017 Daniele Margutti. All rights reserved. -// +/* +* Hydra +* Fullfeatured lightweight Promise & Await Library for Swift +* +* Created by: Daniele Margutti +* Email: hello@danielemargutti.com +* Web: http://www.danielemargutti.com +* Twitter: @danielemargutti +* +* Copyright © 2017 Daniele Margutti +* +* +* 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 Foundation diff --git a/Sources/Promise+Map.swift b/Sources/Promise+Map.swift index 5d2d38a..16e9134 100644 --- a/Sources/Promise+Map.swift +++ b/Sources/Promise+Map.swift @@ -1,10 +1,35 @@ -// -// Promise+Map.swift -// Hydra -// -// Created by Daniele Margutti on 07/01/2017. -// Copyright © 2017 Daniele Margutti. All rights reserved. -// +/* +* Hydra +* Fullfeatured lightweight Promise & Await Library for Swift +* +* Created by: Daniele Margutti +* Email: hello@danielemargutti.com +* Web: http://www.danielemargutti.com +* Twitter: @danielemargutti +* +* Copyright © 2017 Daniele Margutti +* +* +* 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 Foundation diff --git a/Sources/Promise+Recover.swift b/Sources/Promise+Recover.swift index e6f59fd..5220a27 100644 --- a/Sources/Promise+Recover.swift +++ b/Sources/Promise+Recover.swift @@ -1,10 +1,35 @@ -// -// Promise+Recover.swift -// Hydra -// -// Created by Daniele Margutti on 05/01/2017. -// Copyright © 2017 Daniele Margutti. All rights reserved. -// +/* +* Hydra +* Fullfeatured lightweight Promise & Await Library for Swift +* +* Created by: Daniele Margutti +* Email: hello@danielemargutti.com +* Web: http://www.danielemargutti.com +* Twitter: @danielemargutti +* +* Copyright © 2017 Daniele Margutti +* +* +* 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 Foundation diff --git a/Sources/Promise+Then.swift b/Sources/Promise+Then.swift index 4dfaad5..5ed6dd1 100644 --- a/Sources/Promise+Then.swift +++ b/Sources/Promise+Then.swift @@ -1,10 +1,35 @@ -// -// Promise+Flow.swift -// Hydra -// -// Created by Daniele Margutti on 05/01/2017. -// Copyright © 2017 Daniele Margutti. All rights reserved. -// +/* +* Hydra +* Fullfeatured lightweight Promise & Await Library for Swift +* +* Created by: Daniele Margutti +* Email: hello@danielemargutti.com +* Web: http://www.danielemargutti.com +* Twitter: @danielemargutti +* +* Copyright © 2017 Daniele Margutti +* +* +* 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 Foundation diff --git a/Sources/Promise+Timeout.swift b/Sources/Promise+Timeout.swift index 491e929..96ac07c 100644 --- a/Sources/Promise+Timeout.swift +++ b/Sources/Promise+Timeout.swift @@ -1,10 +1,35 @@ -// -// Promise+Timeout.swift -// Hydra -// -// Created by Daniele Margutti on 05/01/2017. -// Copyright © 2017 Daniele Margutti. All rights reserved. -// +/* +* Hydra +* Fullfeatured lightweight Promise & Await Library for Swift +* +* Created by: Daniele Margutti +* Email: hello@danielemargutti.com +* Web: http://www.danielemargutti.com +* Twitter: @danielemargutti +* +* Copyright © 2017 Daniele Margutti +* +* +* 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 Foundation diff --git a/Sources/Promise+Zip.swift b/Sources/Promise+Zip.swift index f3c0e7c..bee843f 100644 --- a/Sources/Promise+Zip.swift +++ b/Sources/Promise+Zip.swift @@ -1,10 +1,34 @@ -// -// Promise+Zip.swift -// Hydra -// -// Created by Daniele Margutti on 05/01/2017. -// Copyright © 2017 Daniele Margutti. All rights reserved. -// +/* +* Hydra +* Fullfeatured lightweight Promise & Await Library for Swift +* +* Created by: Daniele Margutti +* Email: hello@danielemargutti.com +* Web: http://www.danielemargutti.com +* Twitter: @danielemargutti +* +* Copyright © 2017 Daniele Margutti +* +* +* 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 Foundation diff --git a/Sources/Promise.swift b/Sources/Promise.swift index 5953e72..f2000d4 100644 --- a/Sources/Promise.swift +++ b/Sources/Promise.swift @@ -1,10 +1,35 @@ -// -// Promise.swift -// Hydra -// -// Created by Daniele Margutti on 05/01/2017. -// Copyright © 2017 Daniele Margutti. All rights reserved. -// +/* +* Hydra +* Fullfeatured lightweight Promise & Await Library for Swift +* +* Created by: Daniele Margutti +* Email: hello@danielemargutti.com +* Web: http://www.danielemargutti.com +* Twitter: @danielemargutti +* +* Copyright © 2017 Daniele Margutti +* +* +* 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 Foundation diff --git a/Sources/Shared.swift b/Sources/Shared.swift index 2a7a566..b6a90da 100644 --- a/Sources/Shared.swift +++ b/Sources/Shared.swift @@ -1,10 +1,35 @@ -// -// Shared.swift -// Hydra -// -// Created by Daniele Margutti on 05/01/2017. -// Copyright © 2017 Daniele Margutti. All rights reserved. -// +/* +* Hydra +* Fullfeatured lightweight Promise & Await Library for Swift +* +* Created by: Daniele Margutti +* Email: hello@danielemargutti.com +* Web: http://www.danielemargutti.com +* Twitter: @danielemargutti +* +* Copyright © 2017 Daniele Margutti +* +* +* 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 Foundation @@ -55,6 +80,7 @@ public enum Context { return queue } } + }