mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-27 13:34:30 -04:00
Clean code.
This commit is contained in:
parent
3246525d78
commit
f6150c58f4
3 changed files with 39 additions and 37 deletions
|
@ -1,4 +1,6 @@
|
|||
const {jq, lo} = require('./globals');
|
||||
const {jq} = require('./globals');
|
||||
|
||||
const each = (obj, fn) => Object.keys(obj).forEach(key => fn(obj[key], key));
|
||||
|
||||
const request = data => {
|
||||
return new Promise(resolve => {
|
||||
|
@ -16,7 +18,7 @@ const request = data => {
|
|||
const formRequest = data => {
|
||||
const $form = jq('<form method="post" action="?" style="display:none;"/>');
|
||||
|
||||
lo.each(data, (val, key) => {
|
||||
each(data, (val, key) => {
|
||||
jq('<input type="hidden"/>')
|
||||
.attr('name', key)
|
||||
.attr('value', val)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue