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

@spare/pad-string

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spare/pad-string - npm Package Compare versions

Comparing version 0.4.6 to 0.4.7

24

dist/index.cjs.js

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

var numStrict = require('@typen/num-strict');
var fullwidth = require('@spare/fullwidth');

@@ -36,2 +37,24 @@ const fixpad = (tx, pd) => lange.hasAnsi(tx) ? tx.length + pd - lange.lange(tx) : pd;

const PadFW = ({
dock,
ansi,
fill,
fwfill
}) => {
const padHW = Pad({
dock,
ansi,
fill
}),
padFW = Pad({
dock,
ansi,
fill: fwfill
}),
toFW = fullwidth.FullWidth({
ansi
});
return (x, pd, fw, v) => fw ? padFW(toFW(x), pd, v) : padHW(x, pd, v);
};
const LEFT = -1;

@@ -45,3 +68,4 @@ const RIGHT = 1;

exports.Pad = Pad;
exports.PadFW = PadFW;
exports.RIGHT = RIGHT;
exports.RPad = RPad;

25

dist/index.esm.js
import { hasAnsi, lange } from '@spare/lange';
import { isNumeric } from '@typen/num-strict';
import { FullWidth } from '@spare/fullwidth';

@@ -31,2 +32,24 @@ const fixpad = (tx, pd) => hasAnsi(tx) ? tx.length + pd - lange(tx) : pd;

const PadFW = ({
dock,
ansi,
fill,
fwfill
}) => {
const padHW = Pad({
dock,
ansi,
fill
}),
padFW = Pad({
dock,
ansi,
fill: fwfill
}),
toFW = FullWidth({
ansi
});
return (x, pd, fw, v) => fw ? padFW(toFW(x), pd, v) : padHW(x, pd, v);
};
const LEFT = -1;

@@ -36,2 +59,2 @@ const RIGHT = 1;

export { CENTRE, LEFT, LPad, Pad, RIGHT, RPad };
export { CENTRE, LEFT, LPad, Pad, PadFW, RIGHT, RPad };

7

package.json
{
"name": "@spare/pad-string",
"version": "0.4.6",
"version": "0.4.7",
"description": "A debugging tool",

@@ -18,3 +18,4 @@ "main": "dist/index.cjs.js",

"dependencies": {
"@spare/lange": "^0.4.6",
"@spare/fullwidth": "^0.4.7",
"@spare/lange": "^0.4.7",
"@typen/num-strict": "^0.0.4"

@@ -38,3 +39,3 @@ },

"homepage": "https://github.com/hoyeungw/spare#readme",
"gitHead": "2c0ddc97b56771d32dba00b646a400effaac4a61"
"gitHead": "8602f92ef05ca35d14b37c1dec6e54e48320499d"
}
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