append-field

WebJar for append-field

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

append-field
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

append-field
WebJar for append-field
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/LinusU/node-append-field

Скачать append-field

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/append-field/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>append-field</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/append-field/
implementation 'org.webjars.npm:append-field:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/append-field/
implementation ("org.webjars.npm:append-field:1.0.0")
'org.webjars.npm:append-field:jar:1.0.0'
<dependency org="org.webjars.npm" name="append-field" rev="1.0.0">
  <artifact name="append-field" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='append-field', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "append-field" % "1.0.0"
[org.webjars.npm/append-field "1.0.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

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

Версии библиотеки

Версия
1.0.0