anima-data

2.0.1 • Public • Published

data


data module from zepto.


data

data(name) ⇒ value data(name, value) ⇒ self

Read or write data-* DOM attributes. Behaves like attr, but prepends data- to the attribute name.

When reading attribute values, the following conversions apply: v1.0+

  • “true”, “false”, and “null” are converted to corresponding types;
  • number values are converted to actual numeric types;
  • JSON values are parsed, if it’s valid JSON;
  • everything else is returned as string.

Readme

Keywords

none

Package Sidebar

Install

npm i anima-data

Weekly Downloads

4

Version

2.0.1

License

MIT

Last publish

Collaborators

  • jaredleechn
  • smbey0nd