Skip to content

avalanched/ChuzzleKit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChuzzleKit

A chuzzled object is nil if it is falsy, otherwise it has its falsy parts removed.

For example:

  • @"".chuzzle is nil
  • Also @" ".chuzzle is nil
  • And @"\r\t".chuzzle is nil
  • @" 2 ".chuzzle is @"2"
  • @[].chuzzle is nil
  • @[@"", @1].chuzzle is @[@1]
  • [NSNull null].chuzzle is nil
  • @{}.chuzzle is nil
  • @{@1: @""}.chuzzle is nil
  • @{@1: @"", @2: @" 2 "}.chuzzle is @{@2: @"2"}

Mutable Chuzzling

Chuzzling occurs in-place, as far as it can. If a nil would be the chuzzled result the mutable version becomes the empty equivalent, and the return is nil.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages

  • Ruby 57.2%
  • Objective-C 42.8%