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

apps-consumer-utils

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apps-consumer-utils - npm Package Compare versions

Comparing version 1.0.5-0 to 1.0.6-0

23

index.js

@@ -7,3 +7,2 @@ "use strict";

module.exports = {
// getEventIds :: [Object] -> [String]

@@ -19,2 +18,3 @@ "getEventIds": R.pipe(

// getSource :: Object -> Object
"normalizeJSON": (record) => {

@@ -42,12 +42,15 @@ let recordImage,

// getId :: Object -> String
"getId": (content) => R.head(content.Source.split('-')) + '.' + content.Id,
// getSource :: Object -> String
"getSource": getSource,
// getId :: Object -> String
"getSource": (content) => R.head(content.Source.split('-')),
"getId": (content) => getSource(content) + '.' + content.Id,
// getId :: Object -> String
"getHomeSectionId": (content) => R.head(content.Source.split('-')) + '.' + content.OwnerHomeSection,
// getHomeSectionId :: Object -> String
"getHomeSectionId": (content) => getSource(content) + '.' + content.OwnerHomeSection,
// getLatestEventById :: [Object] -> [Object]
// getPubId :: Object -> String
"getPubId": (content) => getSource(content) + '.' + content.OwnerPublicationId,
// getLatestEventsById :: [Object] -> [Object]
"getLatestEventsById": (records) => {

@@ -60,2 +63,6 @@ const grouped = R.groupBy(record => {

}
};
};
function getSource(content) {
return R.head(content.Source.split('-'));
}
{
"name": "apps-consumer-utils",
"version": "1.0.5-0",
"version": "1.0.6-0",
"description": "",

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

@@ -30,9 +30,21 @@ "use strict";

Source: 'nationals-article',
OwnerHomeSection: '123'
OwnerHomeSection: '456'
};
assert.equal(index.getHomeSectionId(content), 'nationals.123');
assert.equal(index.getHomeSectionId(content), 'nationals.456');
});
});
describe('getPubId', () => {
it('should not return the pubId', () => {
const content = {
Source: 'nationals-article',
OwnerPublicationId: '789'
};
assert.equal(index.getPubId(content), 'nationals.789');
});
});
describe('normalizeJSON', () => {

@@ -39,0 +51,0 @@ it('should not add deleted field to non-delete event', () => {

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