New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@adobe/helix-shared-indexer

Package Overview
Dependencies
Maintainers
0
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adobe/helix-shared-indexer - npm Package Compare versions

Comparing version 2.1.7 to 2.2.0

7

CHANGELOG.md

@@ -0,1 +1,8 @@

# [@adobe/helix-shared-indexer-v2.2.0](https://github.com/adobe/helix-shared/compare/@adobe/helix-shared-indexer-v2.1.7...@adobe/helix-shared-indexer-v2.2.0) (2024-11-07)
### Features
* support characters function ([#1022](https://github.com/adobe/helix-shared/issues/1022)) ([1f4e6f2](https://github.com/adobe/helix-shared/commit/1f4e6f255839c5494c4bb325481025d06d3ef5de))
# [@adobe/helix-shared-indexer-v2.1.7](https://github.com/adobe/helix-shared/compare/@adobe/helix-shared-indexer-v2.1.6...@adobe/helix-shared-indexer-v2.1.7) (2024-10-12)

@@ -2,0 +9,0 @@

2

package.json
{
"name": "@adobe/helix-shared-indexer",
"version": "2.1.7",
"version": "2.2.0",
"description": "Shared modules of the Helix Project - Indexer",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -22,2 +22,33 @@ /*

/**
* Returns the substring from `start` to `end` of the given text. If `start` or `end` are
* negative, they address the position counted from the end of the text. `end` is optional,
* and defaults to the length of the text.
*
* Examples:
* - characters('hello, world.', 0, 5) = 'hello'
* - characters('hello, world.', 7) = 'world.'
* - characters('hello, world.', -6, -1) = 'world'
*
* @param {string|Array<string>} text
* @param {number} start The start position.
* @param {number} [end] The end position.
* @returns {Array<string>}
*/
const characters = (text, start, end) => {
if (Array.isArray(text)) {
// eslint-disable-next-line no-param-reassign
text = text.join(' ');
}
if (start < 0) {
// eslint-disable-next-line no-param-reassign
start += text.length;
}
if (end <= 0) {
// eslint-disable-next-line no-param-reassign
end += text.length;
}
return [text.substring(start, end)];
};
const helpers = {

@@ -97,2 +128,3 @@ dateValue: (elements, format) => {

},
characters,
replace: (s, searchValue, replaceValue) => [s.replace(searchValue, replaceValue)],

@@ -134,2 +166,10 @@ replaceAll: (s, searchValue, replaceValue) => [s.replaceAll(searchValue, replaceValue)],

}
case Jsep.UNARY_EXP: {
const value = evalNode(node.argument);
if (node.operator === '-') {
return -value;
}
log.warn('operator not supported: ', node.operator);
return undefined;
}
default: {

@@ -136,0 +176,0 @@ log.warn('evaluate type not supported: ', node.type);

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