New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

fixedstr

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

fixedstr - npm Package Compare versions

Comparing version
0.0.3
to
0.0.4
+11
-0
index.js

@@ -46,2 +46,13 @@ 'use strict';

fixedstr.strTrunc = function (name, size) {
return {
name: name,
size: size,
toFixedString: function (field, value) {
var str = (value || '').substring(0, size);
return textToString(field, str);
}
};
}
fixedstr.number = function (name, size) {

@@ -48,0 +59,0 @@ return {

+1
-1
{
"name": "fixedstr",
"description": "Transforms fixed string to object and vice versa",
"version": "0.0.3",
"version": "0.0.4",
"keywords": [

@@ -6,0 +6,0 @@ "string",

@@ -96,2 +96,10 @@ 'use strict';

});
it('should not throw truncation error if using fixedstr.strTrunc', function() {
var t = fixedstr([fixedstr.strTrunc('TEST', 5)]);
var str = t.stringify({
TEST: '123456'
});
expect(str).to.equal('12345');
});
});