Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bianco.attr

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bianco.attr - npm Package Compare versions

Comparing version 0.0.5 to 1.0.0

2

index.js

@@ -137,3 +137,3 @@ 'use strict';

has
}
};

@@ -140,0 +140,0 @@ exports.set = set;

{
"name": "bianco.attr",
"version": "0.0.5",
"version": "1.0.0",
"description": "Helper to set/get/remove DOM attributes on a list of nodes",

@@ -35,12 +35,12 @@ "main": "index.js",

"@gianlucaguarini/eslint-config": "^2.0.0",
"eslint": "^4.19.1",
"jsdom": "11.11.0",
"eslint": "^5.8.0",
"jsdom": "12.2.0",
"jsdom-global": "3.0.2",
"mocha": "^5.2.0",
"rollup": "^0.59.4",
"rollup-plugin-node-resolve": "^3.3.0"
"rollup": "^0.66.6",
"rollup-plugin-node-resolve": "^3.4.0"
},
"dependencies": {
"bianco.dom-to-array": "^0.0.8"
"bianco.dom-to-array": "^0.0.10"
}
}

@@ -43,2 +43,17 @@ # bianco.attr

#### Table of Contents
- [set](#set)
- [Parameters](#parameters)
- [Examples](#examples)
- [get](#get)
- [Parameters](#parameters-1)
- [Examples](#examples-1)
- [remove](#remove)
- [Parameters](#parameters-2)
- [Examples](#examples-2)
- [has](#has)
- [Parameters](#parameters-3)
- [Examples](#examples-3)
### set

@@ -48,10 +63,10 @@

**Parameters**
#### Parameters
- `els` **([HTMLElement](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) \| [NodeList](https://developer.mozilla.org/en-US/docs/Web/API/NodeList) \| [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array))** DOM node/s to parse
- `name` **([String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object))** either the name of the attribute to set
- `els` **([HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element) \| [NodeList](https://developer.mozilla.org/docs/Web/API/NodeList) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))** DOM node/s to parse
- `name` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object))** either the name of the attribute to set
or a list of properties as object key - value
- `value` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the new value of the attribute (optional)
- `value` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the new value of the attribute (optional)
**Examples**
#### Examples

@@ -72,3 +87,3 @@ ```javascript

Returns **([HTMLElement](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) \| [NodeList](https://developer.mozilla.org/en-US/docs/Web/API/NodeList) \| [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array))** the original array of elements passed to this function
Returns **([HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element) \| [NodeList](https://developer.mozilla.org/docs/Web/API/NodeList) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))** the original array of elements passed to this function

@@ -79,8 +94,8 @@ ### get

**Parameters**
#### Parameters
- `els` **([HTMLElement](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) \| [NodeList](https://developer.mozilla.org/en-US/docs/Web/API/NodeList) \| [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array))** DOM node/s to parse
- `name` **([String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array))** name or list of attributes to get
- `els` **([HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element) \| [NodeList](https://developer.mozilla.org/docs/Web/API/NodeList) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))** DOM node/s to parse
- `name` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))** name or list of attributes to get
**Examples**
#### Examples

@@ -101,3 +116,3 @@ ```javascript

Returns **([Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) \| [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String))** list of the attributes found
Returns **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array) \| [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** list of the attributes found

@@ -108,8 +123,8 @@ ### remove

**Parameters**
#### Parameters
- `els` **([HTMLElement](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) \| [NodeList](https://developer.mozilla.org/en-US/docs/Web/API/NodeList) \| [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array))** DOM node/s to parse
- `name` **([String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array))** name or list of attributes to remove
- `els` **([HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element) \| [NodeList](https://developer.mozilla.org/docs/Web/API/NodeList) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))** DOM node/s to parse
- `name` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))** name or list of attributes to remove
**Examples**
#### Examples

@@ -128,3 +143,3 @@ ```javascript

Returns **([HTMLElement](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) \| [NodeList](https://developer.mozilla.org/en-US/docs/Web/API/NodeList) \| [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array))** the original array of elements passed to this function
Returns **([HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element) \| [NodeList](https://developer.mozilla.org/docs/Web/API/NodeList) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))** the original array of elements passed to this function

@@ -135,8 +150,8 @@ ### has

**Parameters**
#### Parameters
- `els` **([HTMLElement](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) \| [NodeList](https://developer.mozilla.org/en-US/docs/Web/API/NodeList) \| [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array))** DOM node/s to parse
- `name` **([String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array))** name or list of attributes to detect
- `els` **([HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element) \| [NodeList](https://developer.mozilla.org/docs/Web/API/NodeList) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))** DOM node/s to parse
- `name` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))** name or list of attributes to detect
**Examples**
#### Examples

@@ -155,2 +170,2 @@ ```javascript

Returns **([Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) \| [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array))** true or false or an array of boolean values
Returns **([boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))** true or false or an array of boolean values
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc