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

badgeboard

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

badgeboard - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

.package.json.un~

22

lib/badgeboard.js

@@ -23,5 +23,27 @@ /* ================================================================

var getLeftOffset = function(text, default_length) {
var length = text.replace(/[^x00-xff]/g, '01').length;
return Math.max(default_length, length);
};
module.exports = function(data) {
var content = 'render error';
var values = {
offset_x: 50,
offset_left: 44,
default_length: 6,
default_left_offset: 31
};
var length = getLeftOffset(data.left_text, values.default_length);
var offset = values.default_left_offset + values.offset_left / values.default_length * length;
var temp = offset - values.offset_left - values.default_left_offset;
values.offset_left = offset;
values.offset_x += temp / 2;
values.offset_right = values.offset_left + 19;
values.total_width = values.offset_left + 38;
data.values = values;
try {

@@ -28,0 +50,0 @@ content = render(template, data, {

2

package.json
{
"name": "badgeboard",
"version": "0.1.4",
"version": "0.1.5",
"description": "badgeboard",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

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