Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

docs: Fix outdated pre-ES6 function examples.

Abhijeet Prasad Bodas80ccfc79dfc0
diff --git a/docs/subsystems/input-pills.md b/docs/subsystems/input-pills.md
index c3b7f7d87f7..0d4e3f44ba5 100644
--- a/docs/subsystems/input-pills.md
+++ b/docs/subsystems/input-pills.md
@@ -49,16 +49,16 @@ source: function () {
And then in `user_pill.js`...
```js
-exports.typeahead_source = function (pill_widget) {
+export function typeahead_source(pill_widget) {
const persons = people.get_realm_users();
- return exports.filter_taken_users(persons, pill_widget);
-};
+ return filter_taken_users(persons, pill_widget);
+}
-exports.filter_taken_users = function (items, pill_widget) {
- const taken_user_ids = exports.get_user_ids(pill_widget);
- items = items.filter(item => !taken_user_ids.includes(item.user_id));
+export function filter_taken_users(items, pill_widget) {
+ const taken_user_ids = get_user_ids(pill_widget);
+ items = items.filter((item) => !taken_user_ids.includes(item.user_id));
return items;
-};
+}
```
### `onPillCreate` and `onPillRemove` methods
diff --git a/docs/subsystems/sending-messages.md b/docs/subsystems/sending-messages.md
index d292ecf3713..ed831c2a5a7 100644
--- a/docs/subsystems/sending-messages.md
+++ b/docs/subsystems/sending-messages.md
@@ -160,7 +160,7 @@ messages.
relevant message feed, it updates the (locally echoed) message's
properties (at the very least, message ID and timestamp) and
rerenders it in any message lists where it appears. This is
- primarily done in `exports.process_from_server` in
+ primarily done in the `process_from_server` function in
`static/js/echo.js`.
### Local echo in message editing