Whatever

0.4.0

Whatever offers you a placeholder when you are not sure what to type in code.
intitni/Whatever

What's New

0.4.0

2021-04-16T15:03:08Z
  • Fix that file case is not updated
  • Add deprecation warning for Whatever and WhatOf

Whatever

Whatever is a pacakge that offers you a placeholder when you are not sure what to type in code.

screenshot

Using WHATEVER emits warnings, and will crash at run time.

Usage

You can use the provided WHATEVER instance directly. But if you don't want to import everytime, you can create your own instance and add an available check to deprecate it.

@available(*, deprecated, message: "Replace WHATEVER.")
let WHATEVER = Whatever.WHATEVER

@available(*, deprecated, message: "Replace WhateverType.")
typealias WhateverType = Whatever

Preceding anything with WHATEVER

let s: String = WHATEVER.any.thing.that.doesnt.exit.yet

Using IS(_:) to make an instance of any type

WHATEVER.IS(UIColor.self)
let s: String = WHATEVER.IS()

Calling functions when the functions are not implemented or even named yet

WHATEVER(param: 123)

Calling methods from something doesn't exist yet

WHATEVER.viewDidAppear(true)

Rushly wrote a method call before you implement the method

WHATEVER.METHOD.dependency.service.doSomthing(param: true)
    .RETURNS(Promise<Void>.self)
    .then { _ in }
    .catch { _ in }

Defining a function that returns something not exists yet

func accept(whatever: Whatever) -> Whatever {
    return WHATEVER
}

Subscript! But on what

WHATEVER[0]
WHATEVER["What"]
WHATEVER[/*anithing*/]

Install

.package(url: "https://github.com/intitni/Whatever.git", .branch("main"))

Description

  • Swift Tools 5.3.0
View More Packages from this Author

Dependencies

  • None
Last updated: Tue Nov 08 2022 06:32:47 GMT-0500 (GMT-05:00)