stdlib-js / stdlib-js/stdlib

[RFC]: add `@stdlib/assert/is-complex-string`

Đang mở
#1,370 14 bình luận 0 reaction 0 người được giao Xem trên GitHub
Accepted difficulty: 2 Feature Good First Issue JavaScript priority: Normal RFC
Ngôn ngữ chính
JavaScript
Star
6k
Fork
1.3k
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
611

Mô tả

### Description

This RFC proposes adding package `@stdlib/assert/is-complex-string`.

The package should be similar in structure to [`@stdlib/complex/reviver-float32`](https://github.com/stdlib-js/stdlib/tree/64931c5fdb4abc3a339b619658d3b5acc089e556/lib/node_modules/%40stdlib/complex/reviver-float32).

The goal is to assert if an input string is of a complex number format string`(a + ib)` or `(a+bi)`
where, a and b are numbers

```js
function isComplexString( str ) => boolean
```

Eg : isComplexString( "32+12i" ) returns true
Eg : isComplexString( "32+i12" ) returns true
Eg : isComplexString( null ) returns true
Eg : isComplexString( "" ) returns false
Eg : isComplexString( "abcd+12i" ) returns false
Eg : isComplexString( Infinity ) returns false

> Package: `@stdlib/assert/is-complex-string` Alias: `isComplexString`

### Related Issues

Can help with issues #1332 and #1333

### Questions

This is my first issue so I'd like to know if the way I have proposed the feature is correct

### Other

_No response_

### Checklist

- [X] I have read and understood the [Code of Conduct](https://github.com/stdlib-js/stdlib/blob/develop/CODE_OF_CONDUCT.md).
- [X] Searched for existing issues and pull requests.
- [X] The issue name begins with `RFC:`.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start by reviewing lib/node_modules/@stdlib/complex/reviver-float32 and the related issues #1332 and #1333. Clarify the accepted complex-string formats and contradictory examples, especially the null case, before defining what package behavior and completion criteria should be.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript
Lĩnh vực
tooling
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.