Comparing version 0.2.0 to 0.2.1
@@ -57,13 +57,11 @@ (function (global, factory) { | ||
function encode ( value ) { | ||
var result; | ||
var result, i; | ||
if ( typeof value === 'number' ) { | ||
result = encodeInteger( value ); | ||
} else if ( Array.isArray( value ) ) { | ||
} else { | ||
result = ''; | ||
value.forEach( function ( num ) { | ||
result += encodeInteger( num ); | ||
}); | ||
} else { | ||
throw new Error( 'vlq.encode accepts an integer or an array of integers' ); | ||
for ( i = 0; i < value.length; i += 1 ) { | ||
result += encodeInteger( value[i] ); | ||
} | ||
} | ||
@@ -70,0 +68,0 @@ |
@@ -7,3 +7,3 @@ { | ||
"license": "MIT", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"main": "dist/vlq.js", | ||
@@ -10,0 +10,0 @@ "jsnext:main": "src/vlq.js", |
@@ -48,13 +48,11 @@ var charToInteger = {}; | ||
export function encode ( value ) { | ||
var result; | ||
var result, i; | ||
if ( typeof value === 'number' ) { | ||
result = encodeInteger( value ); | ||
} else if ( Array.isArray( value ) ) { | ||
} else { | ||
result = ''; | ||
value.forEach( function ( num ) { | ||
result += encodeInteger( num ); | ||
}); | ||
} else { | ||
throw new Error( 'vlq.encode accepts an integer or an array of integers' ); | ||
for ( i = 0; i < value.length; i += 1 ) { | ||
result += encodeInteger( value[i] ); | ||
} | ||
} | ||
@@ -86,2 +84,2 @@ | ||
return result; | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
5860
5
0
135