-
-
Notifications
You must be signed in to change notification settings - Fork 805
feat: add assert/is-well-formed-string
#1388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add assert/is-well-formed-string
#1388
Conversation
This commit adds the string/is-well-formed-string module for checking well-formed-strings.
This commit adds the assert/is-well-formed-string module for checking well-formed-strings.
assert/is-well-formed-string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! Looks very good; left some comments that will need to be addressed before merging.
lib/node_modules/@stdlib/assert/is-well-formed-string/package.json
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/assert/is-well-formed-string/lib/primitive.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/assert/is-well-formed-string/README.md
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/assert/is-well-formed-string/README.md
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/assert/is-well-formed-string/README.md
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/assert/is-well-formed-string/README.md
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/assert/is-well-formed-string/README.md
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/assert/is-well-formed-string/docs/types/test.ts
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/assert/is-well-formed-string/docs/types/test.ts
Show resolved
Hide resolved
lib/node_modules/@stdlib/assert/is-well-formed-string/examples/index.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com> Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
lib/node_modules/@stdlib/assert/is-well-formed-string/lib/iswellformed.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/assert/is-well-formed-string/lib/iswellformed.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/assert/is-well-formed-string/lib/iswellformed.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/assert/is-well-formed-string/lib/iswellformed.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/assert/is-well-formed-string/lib/iswellformed.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/assert/is-well-formed-string/lib/iswellformed.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/assert/is-well-formed-string/lib/iswellformed.js
Outdated
Show resolved
Hide resolved
|
||
var RE_UTF16_LOW_SURROGATE = /[\uDC00-\uDFFF]/; | ||
var RE_UTF16_HIGH_SURROGATE = /[\uD800-\uDBFF]/; | ||
var i = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not initialize the i
variable outside the function scope. Just declare var i;
in L45 before the loop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assumed that all variables should be declared in the variables section.
But yes, it is outside the scope of the function, and we should avoid using global variables.
I've made the suggested change.
Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
…itive.js Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com> Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com> Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com> Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com> Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com> Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
…es/test.ts Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com> Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
…es/test.ts Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com> Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
…/index.js Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com> Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
…llformed.js Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com> Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
…llformed.js Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com> Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
…llformed.js Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com> Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
…llformed.js Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com> Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
…llformed.js Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com> Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
…llformed.js Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com> Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
…llformed.js Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com> Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
@Planeshifter ![]() |
@gunjjoshi Thanks for checking! I believe the issue is that the |
Sure, I'll update this package. |
This commit adds the assert/is-well-formed-string module for checking well-formed-strings.
Great ! It got passed by the CI pipeline. |
lib/node_modules/@stdlib/assert/is-well-formed-string/lib/iswellformed.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/assert/is-well-formed-string/lib/iswellformed.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/assert/is-well-formed-string/lib/object.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/assert/is-well-formed-string/lib/object.js
Outdated
Show resolved
Hide resolved
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
@gunjjoshi Will merge after CI clears; thanks again for your contribution! |
This commit adds the assert/is-well-formed-string module for checking well-formed-strings.
Resolves #1065
Description
Added the is-well-formed-string package. It checks for four things to check if a string is well formed or not:
This pull request:
Related Issues
This pull request:
@stdlib/assert/is-well-formed-string
#1065Questions
No.
Other
Screenshot of tests:
Checklist
@stdlib-js/reviewers