Comparing version 1.1.3 to 1.2.0
@@ -23,3 +23,3 @@ /* This program is free software. It comes without any warranty, to | ||
function leftPad (str, len, ch) { | ||
// convert `str` to `string` | ||
// convert `str` to a `string` | ||
str = str + ''; | ||
@@ -32,3 +32,3 @@ // `len` is the `pad`'s length now | ||
if (!ch && ch !== 0) ch = ' '; | ||
// convert `ch` to `string` | ||
// convert `ch` to a `string` cuz it could be a number | ||
ch = ch + ''; | ||
@@ -35,0 +35,0 @@ // cache common use cases |
{ | ||
"name": "left-pad", | ||
"version": "1.1.3", | ||
"version": "1.2.0", | ||
"description": "String left pad", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"scripts": { | ||
@@ -7,0 +8,0 @@ "test": "node test", |
@@ -5,4 +5,2 @@ ## left-pad | ||
Time complexity: **O(log(n))** | ||
[![Build Status][travis-image]][travis-url] | ||
@@ -38,1 +36,5 @@ | ||
[travis-url]: https://travis-ci.org/stevemao/left-pad | ||
## Typings | ||
Typings copied from [@types/left-pad](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/left-pad) for convenience. |
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
8338
11
159
39