mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
Zulip 服务器和 Web 应用程序。开源团队聊天可帮助团队保持高效和专注。
This is like Python's dict.setdefault. I don't love the name, but
the consistency is nice.
We have lots of places where we do things like:
if (! dict.has('foo')) {
dict.set('foo', []);
}
var arr = dict.get('foo');
arr.push(3);
We can now write:
var arr = dict.setdefault('foo', []);
arr.push(3);
(imported from commit b8933809c69ba47ec346ed51d53966793403e56c)
|
||
|---|---|---|
| api | ||
| assets | ||
| bots | ||
| certs | ||
| confirmation | ||
| humbug | ||
| node_modules | ||
| servers | ||
| static | ||
| templates | ||
| tools | ||
| zerver | ||
| zproject | ||
| .gitignore | ||
| manage.py | ||