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

font-family-papandreou

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

font-family-papandreou - npm Package Compare versions

Comparing version 0.2.0-patch1 to 0.2.0-patch2

15

index.js

@@ -13,2 +13,3 @@ // parse

var SPACEAFTERIDENTIFIER = 5;
var ESCAPINGIDENTIFIER = 6;

@@ -131,6 +132,18 @@ // patterns

state = SPACEAFTERIDENTIFIER;
} else if (c === "\\") {
state = ESCAPINGIDENTIFIER;
} else {
}
} else if (state === ESCAPINGIDENTIFIER) {
if (/[0-9a-f]/i.test(c)) {
// TODO: Support escaped unicode characters (backslash followed by hex digits)
// https://developer.mozilla.org/en-US/docs/Web/CSS/custom-ident
throw new Error('Parse error');
} else {
buffer += c;
state = IDENTIFIER;
}

@@ -137,0 +150,0 @@ } else if (state === SPACEAFTERIDENTIFIER) {

2

package.json
{
"name": "font-family-papandreou",
"version": "0.2.0-patch1",
"version": "0.2.0-patch2",
"description": "CSS font-family parser/stringifier",

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

@@ -34,2 +34,16 @@ var expect = require('chai').expect;

});
it('should parse a family name with an escaped space', function() {
var result = parse('Font Awesome\\ 5 Free');
expect(result).to.have.length(1);
expect(result[0]).to.equal('Font Awesome 5 Free');
});
it('should parse a family name with an escaped backslash', function() {
var result = parse('Foo\\\\Bar');
expect(result).to.have.length(1);
expect(result[0]).to.equal('Foo\\Bar');
});
});

@@ -36,0 +50,0 @@

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