Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
A Node 4.x compatible ES2015 alternative to left-pad
$ npm install es-leftpad
leftpad = require('es-leftpad')
leftpad('foo', 5)
// => " foo"
leftpad('foobar', 6)
// => "foobar"
leftpad(1, 2, 0)
// => "01"
Performance compared to left-pad
using benchmark.js
leftPad x 1,420,504 ops/sec ±0.45% (92 runs sampled)
es-leftPad x 4,607,534 ops/sec ±1.31% (91 runs sampled)
Padding to 8 ("999", 80, "0")): Fastest is es-leftPad
leftPad x 2,602,721 ops/sec ±0.94% (89 runs sampled)
es-leftPad x 5,120,414 ops/sec ±0.58% (93 runs sampled)
Padding to 8 ("999", 40, "0")): Fastest is es-leftPad
leftPad x 6,310,671 ops/sec ±0.53% (92 runs sampled)
es-leftPad x 5,318,553 ops/sec ±0.72% (92 runs sampled)
Padding to 12 (999, 12)): Fastest is leftPad
Passing all tests from left-pad/test.js
FAQs
An ES2015 alternative to left-pad
The npm package es-leftpad receives a total of 2 weekly downloads. As such, es-leftpad popularity was classified as not popular.
We found that es-leftpad demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.