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

@shaai/core

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shaai/core - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

28

dist/es5/lib/resources/medium/parser.js
'use strict';
var feedAttrs = [{
name: 'title',
feedKey: 'title'
}, {
name: 'link',
feedKey: 'link'
}, {
name: 'guid',
feedKey: 'guid'
}, {
name: 'author',
feedKey: 'dc:creator'
}, {
name: 'publishData',
feedKey: 'pubDate'
}, {
name: 'content',
feedKey: 'content:encoded'
}];
var getItems = function getItems(rssFeed) {
var feedAttrs = ['title', 'link', 'guid', 'dc:creator', 'pubDate', 'content:encoded'];
var itemExtractor = function itemExtractor(feedItem, tagName) {
return feedItem.match(new RegExp('(<' + tagName + '[^>]*>(.|\n)*?</' + tagName + '>)', 'gm'))[0].replace(new RegExp('(<' + tagName + '[^>]*>|</' + tagName + '>)', 'gm'), '').replace(new RegExp('(<!\\[CDATA\\[|\\]\\]>)', 'gm'), '');
var itemExtractor = function itemExtractor(feedItem, feedKey) {
return feedItem.match(new RegExp('(<' + feedKey + '[^>]*>(.|\n)*?</' + feedKey + '>)', 'gm'))[0].replace(new RegExp('(<' + feedKey + '[^>]*>|</' + feedKey + '>)', 'gm'), '').replace(new RegExp('(<!\\[CDATA\\[|\\]\\]>)', 'gm'), '');
};

@@ -14,3 +32,3 @@

feedAttrs.map(function (item) {
return obj[item] = itemExtractor(feedItem, item);
return obj[item.name] = itemExtractor(feedItem, item.feedKey);
});

@@ -17,0 +35,0 @@ return obj;

2

package.json
{
"name": "@shaai/core",
"version": "0.5.0",
"version": "0.5.1",
"description": "A blogging npm",

@@ -5,0 +5,0 @@ "main": "dist/es5/lib/index.js",

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