You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "AtarisMio (GitHub)" <gi...@apache.org> on 2019/11/04 09:56:58 UTC

[GitHub] [dubbo-js] AtarisMio opened pull request #151: 过滤private field不翻译

fix #33

[ Full content available at: https://github.com/apache/dubbo-js/pull/151 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo-js] hufeng closed pull request #151: 过滤private field不翻译

Posted by "hufeng (GitHub)" <gi...@apache.org>.
[ pull request closed by hufeng ]

[ Full content available at: https://github.com/apache/dubbo-js/pull/151 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo-js] hsiaosiyuan0 commented on pull request #151: 过滤private field不翻译

Posted by "hsiaosiyuan0 (GitHub)" <gi...@apache.org>.
Please consider below test case:

```js
const fieldName = 'name';
const regex = new RegExp(`^(get|set${fieldName.slice(0, 1).toUpperCase()}${fieldName.slice(1)})$`);
regex.test('getName'); // expect `true` but got `false`
```

and then if we just want to capitalize the first character I think the better way is using `fieldName[0].toUpperCase()` directly, it's safe since `fieldName` can never be an empty string


[ Full content available at: https://github.com/apache/dubbo-js/pull/151 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo-js] hsiaosiyuan0 commented on pull request #151: 过滤private field不翻译

Posted by "hsiaosiyuan0 (GitHub)" <gi...@apache.org>.
Please consider below test case:

```js
const fieldName = 'name';
const regex = new RegExp(`^(get|set${fieldName.slice(0, 1).toUpperCase()}${fieldName.slice(1)})$`);
regex.test('getName'); // expect `true` but got `false`
```

and then if we just want to capitalize the first character I think the better way is using `fieldName[0].toUpperCase()` directly, it's safe since `fieldName` can never be a empty string


[ Full content available at: https://github.com/apache/dubbo-js/pull/151 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo-js] AtarisMio commented on pull request #151: 过滤private field不翻译

Posted by "AtarisMio (GitHub)" <gi...@apache.org>.
Oh, sorry. It's a typo. Please review it again.

[ Full content available at: https://github.com/apache/dubbo-js/pull/151 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [dubbo-js] hsiaosiyuan0 commented on pull request #151: 过滤private field不翻译

Posted by "hsiaosiyuan0 (GitHub)" <gi...@apache.org>.
LGTM. It's up to @hufeng 😏

[ Full content available at: https://github.com/apache/dubbo-js/pull/151 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org