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

@wordpress/token-list

Package Overview
Dependencies
Maintainers
16
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wordpress/token-list - npm Package Compare versions

Comparing version 1.15.0 to 1.15.1-next.5c9849e156.0

70

build-module/index.js

@@ -1,4 +0,4 @@

import _regeneratorRuntime from "@babel/runtime/regenerator";
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _regeneratorRuntime from "@babel/runtime/regenerator";

@@ -92,4 +92,32 @@ /**

}, {
key: "toString",
key: "value",
get: function get() {
return this._currentValue;
}
/**
* Replaces the associated set with a new string value.
*
* @see https://dom.spec.whatwg.org/#dom-domtokenlist-value
*
* @param {string} value New token set as string.
*/
,
set: function set(value) {
value = String(value);
this._valueAsArray = uniq(compact(value.split(/\s+/g)));
this._currentValue = this._valueAsArray.join(' ');
}
/**
* Returns the number of tokens.
*
* @see https://dom.spec.whatwg.org/#dom-domtokenlist-length
*
* @return {number} Number of tokens.
*/
}, {
key: "length",
get: function get() {
return this._valueAsArray.length;
}
/**

@@ -103,2 +131,5 @@ * Returns the stringified form of the TokenList.

*/
}, {
key: "toString",
value: function toString() {

@@ -117,3 +148,5 @@ return this.value;

key: Symbol.iterator,
value: /*#__PURE__*/_regeneratorRuntime.mark(function value() {
value:
/*#__PURE__*/
_regeneratorRuntime.mark(function value() {
return _regeneratorRuntime.wrap(function value$(_context) {

@@ -267,33 +300,2 @@ while (1) {

}
}, {
key: "value",
get: function get() {
return this._currentValue;
}
/**
* Replaces the associated set with a new string value.
*
* @see https://dom.spec.whatwg.org/#dom-domtokenlist-value
*
* @param {string} value New token set as string.
*/
,
set: function set(value) {
value = String(value);
this._valueAsArray = uniq(compact(value.split(/\s+/g)));
this._currentValue = this._valueAsArray.join(' ');
}
/**
* Returns the number of tokens.
*
* @see https://dom.spec.whatwg.org/#dom-domtokenlist-length
*
* @return {number} Number of tokens.
*/
}, {
key: "length",
get: function get() {
return this._valueAsArray.length;
}
}]);

@@ -300,0 +302,0 @@

@@ -102,4 +102,32 @@ "use strict";

}, {
key: "toString",
key: "value",
get: function get() {
return this._currentValue;
}
/**
* Replaces the associated set with a new string value.
*
* @see https://dom.spec.whatwg.org/#dom-domtokenlist-value
*
* @param {string} value New token set as string.
*/
,
set: function set(value) {
value = String(value);
this._valueAsArray = (0, _lodash.uniq)((0, _lodash.compact)(value.split(/\s+/g)));
this._currentValue = this._valueAsArray.join(' ');
}
/**
* Returns the number of tokens.
*
* @see https://dom.spec.whatwg.org/#dom-domtokenlist-length
*
* @return {number} Number of tokens.
*/
}, {
key: "length",
get: function get() {
return this._valueAsArray.length;
}
/**

@@ -113,2 +141,5 @@ * Returns the stringified form of the TokenList.

*/
}, {
key: "toString",
value: function toString() {

@@ -127,3 +158,5 @@ return this.value;

key: Symbol.iterator,
value: /*#__PURE__*/_regenerator.default.mark(function value() {
value:
/*#__PURE__*/
_regenerator.default.mark(function value() {
return _regenerator.default.wrap(function value$(_context) {

@@ -277,33 +310,2 @@ while (1) {

}
}, {
key: "value",
get: function get() {
return this._currentValue;
}
/**
* Replaces the associated set with a new string value.
*
* @see https://dom.spec.whatwg.org/#dom-domtokenlist-value
*
* @param {string} value New token set as string.
*/
,
set: function set(value) {
value = String(value);
this._valueAsArray = (0, _lodash.uniq)((0, _lodash.compact)(value.split(/\s+/g)));
this._currentValue = this._valueAsArray.join(' ');
}
/**
* Returns the number of tokens.
*
* @see https://dom.spec.whatwg.org/#dom-domtokenlist-length
*
* @return {number} Number of tokens.
*/
}, {
key: "length",
get: function get() {
return this._valueAsArray.length;
}
}]);

@@ -310,0 +312,0 @@ return TokenList;

{
"name": "@wordpress/token-list",
"version": "1.15.0",
"version": "1.15.1-next.5c9849e156.0",
"description": "Constructable, plain JavaScript DOMTokenList implementation, supporting non-browser runtimes.",

@@ -26,3 +26,3 @@ "author": "The WordPress Contributors",

"dependencies": {
"@babel/runtime": "^7.12.5",
"@babel/runtime": "^7.13.10",
"lodash": "^4.17.19"

@@ -33,3 +33,3 @@ },

},
"gitHead": "054f7d722fe561b2bede2d1e89e1add59a6b7093"
"gitHead": "595352e9f9c483d00f19d2b2f89ccca41f92e9a6"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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