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

cockblock

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cockblock - npm Package Compare versions

Comparing version 1.2.0 to 2.0.0

yarn.lock

14

index.js

@@ -1,3 +0,1 @@

var $ = require("cheerio");
function cockblock(html, options) {

@@ -7,2 +5,10 @@ return sanitizeHtml(html, options || cockblock.defaults);

function $wrap(value) {
if (!cockblock.$) {
throw new Error("cockblock.$ must be set to cheerio to jquery");
}
return cockblock.$(value);
}
cockblock.url = function(url, options) {

@@ -160,3 +166,3 @@ return sanitizeResource(url, options || cockblock.defaults);

function sanitizeHtml(html, options) {
var $wrapper = $("<body>");
var $wrapper = $wrap("<body>");
$wrapper.html(html);

@@ -196,3 +202,3 @@ sanitizeChildren($wrapper, initializeOptions(options));

$el.children().each(function() {
sanitizeElement($(this), options);
sanitizeElement($wrap(this), options);
});

@@ -199,0 +205,0 @@ }

{
"name": "cockblock",
"version": "1.2.0",
"version": "2.0.0",
"homepage": "http://github.com/rymohr/cockblock",

@@ -25,11 +25,10 @@ "repository": "http://github.com/rymohr/cockblock",

"main": "index.js",
"dependencies": {
"cheerio": "*"
},
"dependencies": {},
"devDependencies": {
"jquery": "*",
"browserify": "~9.0.3",
"browserify-shim": "~3.8.3",
"chai": "~1.9.0",
"mocha": "~1.17.1",
"browserify": "~9.0.3",
"browserify-shim": "~3.8.3"
"cheerio": "^0.22.0",
"jquery": "^3.2.1",
"mocha": "~1.17.1"
},

@@ -36,0 +35,0 @@ "browserify": {

var expect = require("chai").expect;
var cockblock = require("..");
cockblock.$ = require("cheerio");
describe("cockblock()", function() {

@@ -5,0 +7,0 @@ function html(given, expected) {

Sorry, the diff of this file is too big to display

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