!76 Modify review message of api

Merge pull request !76 from 史凯/master
This commit is contained in:
openharmony_ci
2022-03-07 09:29:00 +00:00
committed by Gitee
36 changed files with 55 additions and 59 deletions
+3 -5
View File
@@ -210,7 +210,7 @@ console.log(params.toString());
```
8、has(name: string): boolean
```
console.log(params.has('bar')); // =>ture
console.log(params.has('bar')); // =>true
```
9、set(name: string, value string): void
```
@@ -274,7 +274,7 @@ for (const [name, value] of params) {
}
// Prints:
// foo bar
// xyz ba
// xyz bar
```
@@ -454,9 +454,7 @@ var options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunc
that.parse(options);
```
## Related warehouse
[js_api_module Subsystem](https://gitee.com/OHOS_STD/js_api_module)
[base/compileruntime/js_api_module/](base/compileruntime/js_api_module-readme.md)
[js_api_module Subsystem](base/compileruntime/js_api_module-readme.md)
## License
+9 -11
View File
@@ -106,7 +106,7 @@ base/compileruntime/js_api_module/
| new URLSearchParams(string) | URLSearchParams(string) 构造器的入参为string数据类型,该方法创建并返回一个新的URLSearchParams 对象。 开头的'?' 字符会被忽略。 |
| new URLSearchParams(obj) | URLSearchParams(obj) 构造器的入参为obj数据类型,该方法创建并返回一个新的URLSearchParams 对象。 开头的'?' 字符会被忽略。 |
| new URLSearchParams(iterable) | URLSearchParams(iterable) 构造器的入参为iterable数据类型,该方法创建并返回一个新的URLSearchParams 对象。 开头的'?' 字符会被忽略。 |
| has(name: string): boolean | 检索searchParams对象中是否含有name。有则返回ture,否则返回false。 |
| has(name: string): boolean | 检索searchParams对象中是否含有name。有则返回true,否则返回false。 |
| set(name: string, value string): void | 检索searchParams对象中是否含有key为name的键值对。没有的话则添加该键值对,有的话则修改对象中第一个key所对应的value,并删除键为name的其余键值对。 |
| sort(): void | 根据键的Unicode代码点,对包含在此对象中的所有键/值对进行排序,并返回undefined。 |
| toString(): string | 根据searchParams对象,返回适用在URL中的查询字符串。 |
@@ -209,7 +209,7 @@ console.log(params.toString());
```
8、has(name: string): boolean
```
console.log(params.has('bar')); // =>ture
console.log(params.has('bar')); // =>true
```
9、set(name: string, value string): void
```
@@ -273,7 +273,7 @@ for (const [name, value] of params) {
}
// Prints:
// foo bar
// xyz ba
// xyz bar
```
@@ -413,8 +413,8 @@ var strXml =
'<?xml version="1.0" encoding="utf-8"?>' +
'<note importance="high" logged="true">' +
' <title>Happy</title>' +
' <todo>Work</todo>' +
' <todo>Play</todo>' +
' <title>Work</title>' +
' <title>Play</title>' +
'</note>';
var arrayBuffer = new ArrayBuffer(strXml.length*2);
var bufView = new Uint8Array(arrayBuffer);
@@ -431,8 +431,8 @@ var strXml =
'<?xml version="1.0" encoding="utf-8"?>' +
'<note importance="high" logged="true">' +
' <title>Happy</title>' +
' <todo>Work</todo>' +
' <todo>Play</todo>' +
' <title>Work</title>' +
' <title>Play</title>' +
'</note>';
var arrayBuffer = new ArrayBuffer(strXml.length*2);
var bufView = new Uint8Array(arrayBuffer);
@@ -451,11 +451,9 @@ function func(key, value){
}
var options = {supportDoctype:true, ignoreNameSpace:true, tokenValueCallbackFunction:func}
that.parse(options);
```
## 相关仓
[js_api_module子系统](https://gitee.com/OHOS_STD/js_api_module)
[base/compileruntime/js_api_module/](base/compileruntime/js_api_module/readme.md)
[js_api_module子系统](base/compileruntime/js_api_module/readme.md)
### 许可证
+2 -4
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -12,13 +12,13 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import shutil
import platform
import argparse
import subprocess
def run_command(in_cmd):
print(" ".join(in_cmd))
proc = subprocess.Popen(in_cmd, stdout=subprocess.PIPE,
@@ -30,8 +30,6 @@ def run_command(in_cmd):
raise Exception(stdout)
if __name__ == '__main__':
PARSER_INST = argparse.ArgumentParser()
PARSER_INST.add_argument('--dst-file',
help='the converted target file')
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
+2 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "js_convertxml.h"
#include "securec.h"
#include "utils/log.h"
+2 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef FOUNDATION_ACE_CCRUNTIME_CONVERT_XML_CLASS_H
#define FOUNDATION_ACE_CCRUNTIME_CONVERT_XML_CLASS_H
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
-1
View File
@@ -3,7 +3,6 @@
"target": "es6",
"module": "es6",
"rootDir": "./src",
//"outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
"outDir": "./out", /* Specify an output folder for all emitted files. */
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
+2 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -15,7 +15,7 @@
The definitions of some interfaces implemented in jsapi/api/js_url.cpp are released under Mozilla license.
The definitions and functions of these interfaces are consistent with the standard interfaces under mozila license,
The definitions and functions of these interfaces are consistent with the standard interfaces under mozilla license,
but the implementation of specific functions is independent and self-developed.
All interfaces are described in d.ts, the following is the interface written in d.ts under to Mozilla license
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
+2 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "js_uri.h"
#include "utils/log.h"
namespace OHOS::Uri {
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
+1 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -13,7 +13,6 @@
* limitations under the License.
*/
#include "js_uri.h"
#include "securec.h"
#include "utils/log.h"
+2 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
declare function requireInternal(s : string) : any;
const uri = requireInternal("uri");
-1
View File
@@ -3,7 +3,6 @@
"target": "es6",
"module": "es6",
"rootDir": "./src",
//"outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
"outDir": "./out", /* Specify an output folder for all emitted files. */
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
+2 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "js_url.h"
#include <regex>
#include <sstream>
+2 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef COMPILERUNTIME_JS_API_URL_H
#define COMPILERUNTIME_JS_API_URL_H
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
-1
View File
@@ -3,7 +3,6 @@
"target": "es6",
"module": "es6",
"rootDir": "./src",
//"outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
"outDir": "./out", /* Specify an output folder for all emitted files. */
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
+4 -4
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -396,14 +396,14 @@ namespace OHOS::xml {
}
}
bool XmlPullParser::DealLength(size_t minimun)
bool XmlPullParser::DealLength(size_t minimum)
{
while (srcLinkList_->next != nullptr) {
if (position_ < max_) {
xmlPullParserError_ = "Unbalanced entity!";
}
PopSrcLinkList();
if (max_ - position_ >= minimun) {
if (max_ - position_ >= minimum) {
return true;
}
}
@@ -432,7 +432,7 @@ namespace OHOS::xml {
}
if (strXml_.size() - max_ > 0 && position_ == 0) {
max_ += strXml_.size() - max_;
if (max_ >= minimun) {
if (max_ >= minimum) {
return true;
}
}
+3 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef FOUNDATION_ACE_CCRUNTIME_XML_CLASS_H
#define FOUNDATION_ACE_CCRUNTIME_XML_CLASS_H
@@ -164,7 +165,7 @@ namespace OHOS::xml {
bool IsWhitespace() const;
void PushSrcLinkList(std::string strBuffer);
void PopSrcLinkList();
bool DealLength(size_t minimun);
bool DealLength(size_t minimum);
void Replace(std::string &strTemp, std::string strSrc, std::string strDes) const;
size_t GetNSCount(size_t iTemp);
void Parse(napi_value thisVar);
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
-1
View File
@@ -3,7 +3,6 @@
"target": "es6",
"module": "es6",
"rootDir": "./src",
//"outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
"outDir": "./out", /* Specify an output folder for all emitted files. */
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,