{"id":16829710,"url":"https://github.com/mxcl/chuzzlekit","last_synced_at":"2025-04-09T16:19:41.666Z","repository":{"id":15110606,"uuid":"17837490","full_name":"mxcl/ChuzzleKit","owner":"mxcl","description":"A chuzzled object is nil if it is falsy, otherwise it has its falsy parts removed.","archived":false,"fork":false,"pushed_at":"2024-12-16T22:06:31.000Z","size":33,"stargazers_count":48,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T16:19:32.131Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"HT524/500LineorLess_CN","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mxcl.png","metadata":{"funding":{"github":"mxcl","patreon":"mxcl"},"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-03-17T17:49:52.000Z","updated_at":"2024-12-16T22:06:35.000Z","dependencies_parsed_at":"2024-05-08T13:29:11.291Z","dependency_job_id":"c09cfee1-a821-4cae-8412-9ed6d40f41e7","html_url":"https://github.com/mxcl/ChuzzleKit","commit_stats":{"total_commits":32,"total_committers":5,"mean_commits":6.4,"dds":0.1875,"last_synced_commit":"84ca5bd4b9fde0e91556c593158c416e60a31cc1"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxcl%2FChuzzleKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxcl%2FChuzzleKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxcl%2FChuzzleKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxcl%2FChuzzleKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mxcl","download_url":"https://codeload.github.com/mxcl/ChuzzleKit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065281,"owners_count":21041872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T11:35:16.736Z","updated_at":"2025-04-09T16:19:41.649Z","avatar_url":"https://github.com/mxcl.png","language":"Objective-C","funding_links":["https://github.com/sponsors/mxcl","https://patreon.com/mxcl"],"categories":[],"sub_categories":[],"readme":"# ChuzzleKit [![Build Status](https://travis-ci.org/mxcl/ChuzzleKit.svg?branch=master)](https://travis-ci.org/mxcl/ChuzzleKit)\n\nA chuzzled object is nil if it is *falsy*, otherwise it has its *falsy* parts\nremoved.\n\nFor example:\n\n* `@\"\".chuzzle` is `nil`\n* Also `@\" \".chuzzle` is `nil`\n* And `@\"\\r\\t\".chuzzle` is `nil`\n* `@\" 2 \".chuzzle` is `@\"2\"`\n* `@[].chuzzle` is `nil`\n* `@[@\"\", @1].chuzzle` is `@[@1]`\n* `[NSNull null].chuzzle` is `nil`\n* `@{}.chuzzle` is `nil`\n* `@{@1: @\"\"}.chuzzle` is `nil`\n* `@{@1: @\"\", @2: @\" 2  \"}.chuzzle` is `@{@2: @\"2\"}`\n\n\n\u003e Note that: `@\"  2 3   \"` chuzzles to: `@\"2 3\"`, that is, it only trims the string, it doesn’t eat the internal whitespace. This is because the “falsy” whitespace is just the trailing whitespace, not the internal whitespace. This is probably what you expected.\n\n\nMutable Chuzzling\n=================\nWe removed mutable chuzzling. There are issues with adding category methods to mutable variants in Cocoa, which led to us having to enact hacks. However there were unexpected issues, eg: https://github.com/mxcl/ChuzzleKit/issues/3\n\n\nCustom Chuzzling\n================\nAll our `chuzzle` methods on container classes will call `chuzzle` on the objects they contain, if it is implemented.\n\nSo if you want to support recursive chuzzling on your own objects, simply implement a `chuzzle` method.\n\n\nMaking JSON PLIST-Compliant\n===========================\nSince `NSNull` cannot be encoded into a PLIST, a convenient (but by **no means** the primary) usage of ChuzzleKit is to make saving JSON to a plist not crash (eg. via `writeToFile:atomically`).\n\n\nStripping Strings\n=================\n`-chuzzle` can be a less enormous alternative to `-stringByTrimmingCharactersInSet:`, just don’t forget to expect `nil` in the response.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxcl%2Fchuzzlekit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmxcl%2Fchuzzlekit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxcl%2Fchuzzlekit/lists"}