Socket
Socket
Sign inDemoInstall

left-pad

Package Overview
Dependencies
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

left-pad - npm Package Compare versions

Comparing version 1.1.3 to 1.2.0

index.d.ts

4

index.js

@@ -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.
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