You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dcs/ui/node_modules/append-field
wufayuan 888089ca40
将ui服务器初步写成,实现与爬虫服务器基本通信
3 years ago
..
lib 将ui服务器初步写成,实现与爬虫服务器基本通信 3 years ago
test 将ui服务器初步写成,实现与爬虫服务器基本通信 3 years ago
.npmignore 将ui服务器初步写成,实现与爬虫服务器基本通信 3 years ago
LICENSE 将ui服务器初步写成,实现与爬虫服务器基本通信 3 years ago
README.md 将ui服务器初步写成,实现与爬虫服务器基本通信 3 years ago
index.js 将ui服务器初步写成,实现与爬虫服务器基本通信 3 years ago
package.json 将ui服务器初步写成,实现与爬虫服务器基本通信 3 years ago

README.md

append-field

A W3C HTML JSON forms spec compliant field appender (for lack of a better name). Useful for people implementing application/x-www-form-urlencoded and multipart/form-data parsers.

It works best on objects created with Object.create(null). Otherwise it might conflict with variables from the prototype (e.g. hasOwnProperty).

Installation

npm install --save append-field

Usage

var appendField = require('append-field')
var obj = Object.create(null)

appendField(obj, 'pets[0][species]', 'Dahut')
appendField(obj, 'pets[0][name]', 'Hypatia')
appendField(obj, 'pets[1][species]', 'Felis Stultus')
appendField(obj, 'pets[1][name]', 'Billie')

console.log(obj)
{ pets:
   [ { species: 'Dahut', name: 'Hypatia' },
     { species: 'Felis Stultus', name: 'Billie' } ] }

API

appendField(store, key, value)

Adds the field named key with the value value to the object store.

License

MIT