Skip to content

intitni/Whatever

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"))

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages