attrobj

WebJar for attrobj

Лицензия

Лицензия

MIT
Группа

Группа

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

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

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

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

3.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

attrobj
WebJar for attrobj
Ссылка на сайт

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

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

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

https://github.com/firstandthird/attrobj

Скачать attrobj

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

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

Зависимости

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

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

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

attrobj

Build Status npm

Transforms data-attributes into an array based on key.

Installation

npm install attrobj

Example usage

<div id="example" data-example-name="Test Name" data-example-color="red"></div>
const attrobj = require('attrobj');
const el = document.getElementById('example');

const exampleData = attrobj('example', el);

console.log(exampleData);
// { name: 'Test Name', color: 'red' }

Global Values

Data can be pulled from window.* by using data-<somekey>-global-<valuename>.

Example:

<div id="example2" data-weather-global-rain="rain" data-weather-cloudy="true"></div>
window.rain = '2.1';

const attrobj = require('attrobj');
const el = document.getElementById('example2');

const exampleData = attrobj('weather', el);

console.log(exampleData);
// { rain: '2,1', cloudy: 'true' }
org.webjars.npm

First+Third

We build things... awesome things.

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

Версия
3.1.0