Comparing version 1.0.0 to 1.0.1
@@ -46,3 +46,15 @@ 'use strict'; | ||
return str.replace(new RegExp('.{' + lineLength + '}', 'g'), '$&\r\n').trim(); | ||
let result = []; | ||
let pos = 0; | ||
let chunkLength = lineLength * 1024; | ||
while (pos < str.length) { | ||
let wrappedLines = str | ||
.substr(pos, chunkLength) | ||
.replace(new RegExp('.{' + lineLength + '}', 'g'), '$&\r\n') | ||
.trim(); | ||
result.push(wrappedLines); | ||
pos += chunkLength; | ||
} | ||
return result.join('\r\n').trim(); | ||
} | ||
@@ -49,0 +61,0 @@ |
{ | ||
"name": "libbase64", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Encode and decode base64 encoded strings", | ||
@@ -13,3 +13,6 @@ "main": "lib/libbase64.js", | ||
}, | ||
"keywords": ["base64", "mime"], | ||
"keywords": [ | ||
"base64", | ||
"mime" | ||
], | ||
"author": "Andris Reinman", | ||
@@ -16,0 +19,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9799
181