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

fast-printf

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-printf - npm Package Compare versions

Comparing version 1.6.5 to 1.6.6

5

dist/src/createPrintf.js

@@ -60,3 +60,3 @@ "use strict";

}
else if (token.conversion === 'd') {
else if (token.conversion === 'i' || token.conversion === 'd') {
boundValue = String(Math.trunc(boundValue));

@@ -86,5 +86,2 @@ if (token.width !== null) {

}
else if (token.conversion === 'i') {
result += boundValue;
}
else if (token.conversion === 'o') {

@@ -91,0 +88,0 @@ result += (Number.parseInt(String(boundValue), 10) >>> 0).toString(8);

2

dist/src/tokenize.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.tokenize = void 0;
const TokenRule = /(?:%(?<flag>([+0-]|-\+))?(?<width>\d+)?(?<position>\d+\$)?(?<precision>\.\d+)?(?<conversion>[%BCESb-fosux]))|(\\%)/g;
const TokenRule = /(?:%(?<flag>([+0-]|-\+))?(?<width>\d+)?(?<position>\d+\$)?(?<precision>\.\d+)?(?<conversion>[%BCESb-iosux]))|(\\%)/g;
const tokenize = (subject) => {

@@ -6,0 +6,0 @@ let matchResult;

@@ -27,2 +27,8 @@ "use strict";

});
ava_1.default('interpolates %i', (t) => {
t.is(printf_1.printf('%i', 123), '123');
});
ava_1.default('interpolates %i (removes fractional digits)', (t) => {
t.is(printf_1.printf('%i', 123.567), '123');
});
ava_1.default('interpolates %d', (t) => {

@@ -103,5 +109,2 @@ t.is(printf_1.printf('%d', 123), '123');

});
ava_1.default('interpolates %i', (t) => {
t.is(printf_1.printf('%f', 123), '123');
});
ava_1.default('interpolates %o', (t) => {

@@ -108,0 +111,0 @@ t.is(printf_1.printf('%o', 8), '10');

@@ -64,3 +64,3 @@ {

"typings": "./dist/src/printf.d.ts",
"version": "1.6.5"
"version": "1.6.6"
}
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