├── auto.js ├── .npmrc ├── test ├── .eslintrc ├── index.js ├── implementation.js ├── tests.js └── shimmed.js ├── .nycrc ├── .github └── workflows │ ├── node-pretest.yml │ ├── rebase.yml │ ├── require-allow-edits.yml │ ├── node-aught.yml │ └── node-tens.yml ├── polyfill.js ├── .eslintrc ├── shim.js ├── index.js ├── .gitignore ├── LICENSE ├── implementation.js ├── README.md ├── package.json └── CHANGELOG.md /auto.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('./shim')(); 4 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | allow-same-version=true 3 | message=v%s 4 | -------------------------------------------------------------------------------- /test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "max-statements-per-line": [2, { "max": 2 }] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /.nycrc: -------------------------------------------------------------------------------- 1 | { 2 | "all": true, 3 | "check-coverage": false, 4 | "reporter": ["text-summary", "text", "html", "json"], 5 | "exclude": [ 6 | "coverage", 7 | "test" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /.github/workflows/node-pretest.yml: -------------------------------------------------------------------------------- 1 | name: 'Tests: pretest/posttest' 2 | 3 | on: [pull_request, push] 4 | 5 | jobs: 6 | tests: 7 | uses: ljharb/actions/.github/workflows/pretest.yml@main 8 | -------------------------------------------------------------------------------- /.github/workflows/rebase.yml: -------------------------------------------------------------------------------- 1 | name: Automatic Rebase 2 | 3 | on: [pull_request_target] 4 | 5 | jobs: 6 | _: 7 | uses: ljharb/actions/.github/workflows/rebase.yml@main 8 | secrets: 9 | token: ${{ secrets.GITHUB_TOKEN }} 10 | -------------------------------------------------------------------------------- /polyfill.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var implementation = require('./implementation'); 4 | 5 | module.exports = function getPolyfill() { 6 | return typeof String.prototype.padStart === 'function' ? String.prototype.padStart : implementation; 7 | }; 8 | -------------------------------------------------------------------------------- /.github/workflows/require-allow-edits.yml: -------------------------------------------------------------------------------- 1 | name: Require “Allow Edits” 2 | 3 | on: [pull_request_target] 4 | 5 | jobs: 6 | _: 7 | name: "Require “Allow Edits”" 8 | 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | - uses: ljharb/require-allow-edits@main 13 | -------------------------------------------------------------------------------- /.github/workflows/node-aught.yml: -------------------------------------------------------------------------------- 1 | name: 'Tests: node.js < 10' 2 | 3 | on: [pull_request, push] 4 | 5 | jobs: 6 | tests: 7 | uses: ljharb/actions/.github/workflows/node.yml@main 8 | with: 9 | range: '< 10' 10 | type: minors 11 | command: npm run tests-only 12 | -------------------------------------------------------------------------------- /.github/workflows/node-tens.yml: -------------------------------------------------------------------------------- 1 | name: 'Tests: node.js >= 10' 2 | 3 | on: [pull_request, push] 4 | 5 | jobs: 6 | tests: 7 | uses: ljharb/actions/.github/workflows/node.yml@main 8 | with: 9 | range: '>= 10' 10 | type: minors 11 | command: npm run tests-only 12 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | 4 | "extends": "@ljharb", 5 | 6 | "rules": { 7 | "id-length": [2, { "min": 1, "max": 25, "properties": "never" }], 8 | "new-cap": [2, { "capIsNewExceptions": ["ToLength", "ToString", "RequireObjectCoercible"] }], 9 | "no-invalid-this": [1], 10 | "no-magic-numbers": [0] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /shim.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var getPolyfill = require('./polyfill'); 4 | var define = require('define-properties'); 5 | 6 | module.exports = function shimPadStart() { 7 | var polyfill = getPolyfill(); 8 | define(String.prototype, { padStart: polyfill }, { 9 | padStart: function testPadStart() { 10 | return String.prototype.padStart !== polyfill; 11 | } 12 | }); 13 | return polyfill; 14 | }; 15 | -------------------------------------------------------------------------------- /test/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var padStart = require('../'); 4 | var test = require('tape'); 5 | var runTests = require('./tests'); 6 | 7 | test('as a function', function (t) { 8 | t.test('bad array/this value', function (st) { 9 | st['throws'](function () { padStart(undefined, 'a'); }, TypeError, 'undefined is not an object'); 10 | st['throws'](function () { padStart(null, 'a'); }, TypeError, 'null is not an object'); 11 | st.end(); 12 | }); 13 | 14 | runTests(padStart, t); 15 | 16 | t.end(); 17 | }); 18 | -------------------------------------------------------------------------------- /test/implementation.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var padStart = require('../implementation'); 4 | var callBind = require('call-bind'); 5 | var test = require('tape'); 6 | var hasStrictMode = require('has-strict-mode')(); 7 | var runTests = require('./tests'); 8 | 9 | test('as a function', function (t) { 10 | t.test('bad array/this value', { skip: !hasStrictMode }, function (st) { 11 | /* eslint no-useless-call: 0 */ 12 | st['throws'](function () { padStart.call(undefined); }, TypeError, 'undefined is not an object'); 13 | st['throws'](function () { padStart.call(null); }, TypeError, 'null is not an object'); 14 | st.end(); 15 | }); 16 | 17 | runTests(callBind(padStart), t); 18 | 19 | t.end(); 20 | }); 21 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var define = require('define-properties'); 4 | var RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible'); 5 | var callBind = require('call-bind'); 6 | 7 | var implementation = require('./implementation'); 8 | var getPolyfill = require('./polyfill'); 9 | var shim = require('./shim'); 10 | 11 | var bound = callBind.apply(getPolyfill()); 12 | 13 | var boundPadStart = function padStart(str, maxLength) { 14 | RequireObjectCoercible(str); 15 | var args = arguments.length > 2 ? [maxLength, arguments[2]] : [maxLength]; 16 | return bound(str, args); 17 | }; 18 | 19 | define(boundPadStart, { 20 | getPolyfill: getPolyfill, 21 | implementation: implementation, 22 | shim: shim 23 | }); 24 | 25 | module.exports = boundPadStart; 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | # Directory for instrumented libs generated by jscoverage/JSCover 11 | lib-cov 12 | 13 | # Coverage directory used by tools like istanbul 14 | coverage 15 | .nyc_output 16 | 17 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 18 | .grunt 19 | 20 | # node-waf configuration 21 | .lock-wscript 22 | 23 | # Compiled binary addons (http://nodejs.org/api/addons.html) 24 | build/Release 25 | 26 | # Dependency directory 27 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 28 | node_modules 29 | 30 | # Only apps should have lockfiles 31 | npm-shrinkwrap.json 32 | yarn.lock 33 | package-lock.json 34 | 35 | .npmignore 36 | -------------------------------------------------------------------------------- /test/tests.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function (padStart, t) { 4 | t.test('normal cases', function (st) { 5 | st.equal(padStart('a', 3, 'b'), 'bba', 'string pads start with single character'); 6 | st.equal(padStart('abc', 3, 'd'), 'abc', 'string already of maximum length noops'); 7 | st.equal(padStart('abc', -3, 'd'), 'abc', 'string already larger than maximum length noops'); 8 | st.equal(padStart('cd', 3, 'ab'), 'acd', 'string with maximum length equal to length plus filler length, pads'); 9 | st.equal(padStart('abc'), 'abc', 'absent maximum length is noop'); 10 | st.equal(padStart('a', 3), ' a', 'absent fillStr defaults to a space'); 11 | st.equal(padStart('ed', 6, null), 'nulled', 'non-string fillStr gets stringified'); 12 | 13 | st.end(); 14 | }); 15 | 16 | t.test('truncated fill string', function (st) { 17 | st.equal(padStart('a', 2, 'bc'), 'ba', 'truncates at the provided max length'); 18 | 19 | st.end(); 20 | }); 21 | 22 | t.test('exceptions', function (st) { 23 | 24 | st.end(); 25 | }); 26 | }; 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 EcmaScript Shims 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /implementation.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var ToLength = require('es-abstract/2024/ToLength'); 4 | var ToString = require('es-abstract/2024/ToString'); 5 | var RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible'); 6 | 7 | var callBound = require('call-bound'); 8 | var $slice = callBound('String.prototype.slice'); 9 | 10 | module.exports = function padStart(maxLength) { 11 | var O = RequireObjectCoercible(this); 12 | var S = ToString(O); 13 | var stringLength = ToLength(S.length); 14 | var fillString; 15 | if (arguments.length > 1) { 16 | fillString = arguments[1]; 17 | } 18 | var filler = typeof fillString === 'undefined' ? '' : ToString(fillString); 19 | if (filler === '') { 20 | filler = ' '; 21 | } 22 | var intMaxLength = ToLength(maxLength); 23 | if (intMaxLength <= stringLength) { 24 | return S; 25 | } 26 | var fillLen = intMaxLength - stringLength; 27 | while (filler.length < fillLen) { 28 | var fLen = filler.length; 29 | var remainingCodeUnits = fillLen - fLen; 30 | filler += fLen > remainingCodeUnits ? $slice(filler, 0, remainingCodeUnits) : filler; 31 | } 32 | 33 | var truncatedStringFiller = filler.length > fillLen ? $slice(filler, 0, fillLen) : filler; 34 | return truncatedStringFiller + S; 35 | }; 36 | -------------------------------------------------------------------------------- /test/shimmed.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('../auto'); 4 | 5 | var test = require('tape'); 6 | var defineProperties = require('define-properties'); 7 | var callBind = require('call-bind'); 8 | var isEnumerable = Object.prototype.propertyIsEnumerable; 9 | var functionsHaveNames = require('functions-have-names')(); 10 | 11 | var runTests = require('./tests'); 12 | 13 | test('shimmed', function (t) { 14 | t.equal(String.prototype.padStart.length, 1, 'String#padStart has a length of 1'); 15 | t.test('Function name', { skip: !functionsHaveNames }, function (st) { 16 | st.equal(String.prototype.padStart.name, 'padStart', 'String#padStart has name "padStart"'); 17 | st.end(); 18 | }); 19 | 20 | t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { 21 | et.equal(false, isEnumerable.call(String.prototype, 'padStart'), 'String#padStart is not enumerable'); 22 | et.end(); 23 | }); 24 | 25 | var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); 26 | 27 | t.test('bad string/this value', { skip: !supportsStrictMode }, function (st) { 28 | st['throws'](function () { return String.prototype.padStart.call(undefined, 'a'); }, TypeError, 'undefined is not an object'); 29 | st['throws'](function () { return String.prototype.padStart.call(null, 'a'); }, TypeError, 'null is not an object'); 30 | st.end(); 31 | }); 32 | 33 | runTests(callBind(String.prototype.padStart), t); 34 | 35 | t.end(); 36 | }); 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # String.prototype.padStart [![Version Badge][npm-version-svg]][package-url] 2 | 3 | [![github actions][actions-image]][actions-url] 4 | [![coverage][codecov-image]][codecov-url] 5 | [![dependency status][deps-svg]][deps-url] 6 | [![dev dependency status][dev-deps-svg]][dev-deps-url] 7 | [![License][license-image]][license-url] 8 | [![Downloads][downloads-image]][downloads-url] 9 | 10 | [![npm badge][npm-badge-png]][package-url] 11 | 12 | An ES2017 spec-compliant `String.prototype.padStart` shim. Invoke its "shim" method to shim `String.prototype.padStart` if it is unavailable. 13 | 14 | This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://github.com/tc39/ecma262/pull/581). 15 | 16 | Most common usage: 17 | ```js 18 | var padStart = require('string.prototype.padstart'); 19 | 20 | assert(padStart('foo', 5, 'bar') === 'bafoo'); 21 | 22 | padStart.shim(); 23 | 24 | assert(padStart('foo', 2) === 'foo'.padStart(2)); 25 | ``` 26 | 27 | ## Tests 28 | Simply clone the repo, `npm install`, and run `npm test` 29 | 30 | [package-url]: https://npmjs.com/package/string.prototype.padstart 31 | [npm-version-svg]: http://versionbadg.es/es-shims/String.prototype.padStart.svg 32 | [travis-svg]: https://travis-ci.org/es-shims/String.prototype.padStart.svg 33 | [travis-url]: https://travis-ci.org/es-shims/String.prototype.padStart 34 | [deps-svg]: https://david-dm.org/es-shims/String.prototype.padStart.svg 35 | [deps-url]: https://david-dm.org/es-shims/String.prototype.padStart 36 | [dev-deps-svg]: https://david-dm.org/es-shims/String.prototype.padStart/dev-status.svg 37 | [dev-deps-url]: https://david-dm.org/es-shims/String.prototype.padStart#info=devDependencies 38 | [npm-badge-png]: https://nodei.co/npm/string.prototype.padstart.png?downloads=true&stars=true 39 | [license-image]: http://img.shields.io/npm/l/string.prototype.padstart.svg 40 | [license-url]: LICENSE 41 | [downloads-image]: http://img.shields.io/npm/dm/string.prototype.padstart.svg 42 | [downloads-url]: http://npm-stat.com/charts.html?package=string.prototype.padstart 43 | [codecov-image]: https://codecov.io/gh/es-shims/String.prototype.padStart/branch/main/graphs/badge.svg 44 | [codecov-url]: https://app.codecov.io/gh/es-shims/String.prototype.padStart/ 45 | [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/String.prototype.padStart 46 | [actions-url]: https://github.com/es-shims/String.prototype.padStart/actions 47 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "string.prototype.padstart", 3 | "version": "3.1.7", 4 | "author": "Jordan Harband ", 5 | "funding": { 6 | "url": "https://github.com/sponsors/ljharb" 7 | }, 8 | "description": "ES2017 spec-compliant String.prototype.padStart shim.", 9 | "license": "MIT", 10 | "main": "index.js", 11 | "scripts": { 12 | "prepack": "npmignore --auto --commentLines=autogenerated", 13 | "prepublish": "not-in-publish || npm run prepublishOnly", 14 | "prepublishOnly": "safe-publish-latest", 15 | "pretest": "npm run lint", 16 | "test": "npm run tests-only", 17 | "posttest": "npx npm@\">= 10.2\" audit --production", 18 | "tests-only": "nyc tape 'test/**/*.js'", 19 | "lint": "eslint --ext=js,mjs .", 20 | "postlint": "es-shim-api --bound", 21 | "version": "auto-changelog && git add CHANGELOG.md", 22 | "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" 23 | }, 24 | "repository": { 25 | "type": "git", 26 | "url": "git://github.com/es-shims/String.prototype.padStart.git" 27 | }, 28 | "keywords": [ 29 | "String.prototype.padLeft", 30 | "String.prototype.padStart", 31 | "string", 32 | "ES8", 33 | "ES2017", 34 | "shim", 35 | "trim", 36 | "padLeft", 37 | "padRight", 38 | "padStart", 39 | "padEnd", 40 | "polyfill", 41 | "es-shim API" 42 | ], 43 | "dependencies": { 44 | "call-bind": "^1.0.8", 45 | "call-bound": "^1.0.4", 46 | "define-properties": "^1.2.1", 47 | "es-abstract": "^1.23.9", 48 | "es-object-atoms": "^1.1.1" 49 | }, 50 | "devDependencies": { 51 | "@es-shims/api": "^2.5.1", 52 | "@ljharb/eslint-config": "^21.1.1", 53 | "auto-changelog": "^2.5.0", 54 | "encoding": "^0.1.13", 55 | "eslint": "=8.8.0", 56 | "functions-have-names": "^1.2.3", 57 | "has-strict-mode": "^1.1.0", 58 | "in-publish": "^2.0.1", 59 | "npmignore": "^0.3.1", 60 | "nyc": "^10.3.2", 61 | "safe-publish-latest": "^2.0.0", 62 | "tape": "^5.9.0" 63 | }, 64 | "testling": { 65 | "files": "test/index.js", 66 | "browsers": [ 67 | "iexplore/9.0..latest", 68 | "firefox/4.0..6.0", 69 | "firefox/15.0..latest", 70 | "firefox/nightly", 71 | "chrome/4.0..10.0", 72 | "chrome/20.0..latest", 73 | "chrome/canary", 74 | "opera/11.6..latest", 75 | "opera/next", 76 | "safari/5.0..latest", 77 | "ipad/6.0..latest", 78 | "iphone/6.0..latest", 79 | "android-browser/4.2" 80 | ] 81 | }, 82 | "engines": { 83 | "node": ">= 0.4" 84 | }, 85 | "auto-changelog": { 86 | "output": "CHANGELOG.md", 87 | "template": "keepachangelog", 88 | "unreleased": false, 89 | "commitLimit": false, 90 | "backfillLimit": false, 91 | "hideCredit": true, 92 | "startingVersion": "3.1.4" 93 | }, 94 | "publishConfig": { 95 | "ignore": [ 96 | ".github/workflows" 97 | ] 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 | 8 | ## [v3.1.7](https://github.com/es-shims/String.prototype.padStart/compare/v3.1.6...v3.1.7) - 2025-03-13 9 | 10 | ### Commits 11 | 12 | - [actions] use reusable workflows [`ae59509`](https://github.com/es-shims/String.prototype.padStart/commit/ae59509d83c62385e25627e8b3bb98a88dd59c23) 13 | - [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `auto-changelog`, `has-strict-mode`, `tape` [`42bb53b`](https://github.com/es-shims/String.prototype.padStart/commit/42bb53b4bd2152aadfa57969b16c0f2632698545) 14 | - [Deps] update `call-bind`, `es-abstract`, `es-object-atoms` [`76ef765`](https://github.com/es-shims/String.prototype.padStart/commit/76ef765665b39eb1bfc013f081489d0831529c8d) 15 | - [Refactor] use `call-bound` directly [`8d2e2ae`](https://github.com/es-shims/String.prototype.padStart/commit/8d2e2ae6587efe2dffa95d8632e5b5c408837f33) 16 | - [Tests] replace `aud` with `npm audit` [`e3270b6`](https://github.com/es-shims/String.prototype.padStart/commit/e3270b6ea48bb0c726a14f38fd1fa3f40b14a889) 17 | - [Deps] update `es-abstract` [`002c22f`](https://github.com/es-shims/String.prototype.padStart/commit/002c22fb1af96651b64c5a5d9f5be110b123d91f) 18 | - [Dev Deps] add missing peer dep [`f9efe37`](https://github.com/es-shims/String.prototype.padStart/commit/f9efe3716254bd2f06909fc43c4823cbed89f788) 19 | 20 | ## [v3.1.6](https://github.com/es-shims/String.prototype.padStart/compare/v3.1.5...v3.1.6) - 2024-03-16 21 | 22 | ### Commits 23 | 24 | - [Refactor] update `es-abstract`; use `es-object-atoms` [`a3025f1`](https://github.com/es-shims/String.prototype.padStart/commit/a3025f14f75c25d7e2047c61374c1a75c31a345a) 25 | - [Dev Deps] update `aud`, `npmignore`, `tape` [`421d652`](https://github.com/es-shims/String.prototype.padStart/commit/421d65225ab1889f74d88d7c4b2805cc90869b5a) 26 | - [Deps] update `call-bind`, `define-properties` [`b70498f`](https://github.com/es-shims/String.prototype.padStart/commit/b70498ff8bbebc20bc74b81bda90eb6a86e0c861) 27 | 28 | ## [v3.1.5](https://github.com/es-shims/String.prototype.padStart/compare/v3.1.4...v3.1.5) - 2023-08-29 29 | 30 | ### Commits 31 | 32 | - [Deps] update `define-properties`, `es-abstract` [`42a83bc`](https://github.com/es-shims/String.prototype.padStart/commit/42a83bca97668a418e349bac39fd477e7a8d05f9) 33 | - [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `tape` [`cdcb754`](https://github.com/es-shims/String.prototype.padStart/commit/cdcb75415dc5ef06a4b4e0c053514b6325e6b485) 34 | 35 | ## [v3.1.4](https://github.com/es-shims/String.prototype.padStart/compare/v3.1.3...v3.1.4) - 2022-11-07 36 | 37 | ### Commits 38 | 39 | - [actions] reuse common workflows [`dab6400`](https://github.com/es-shims/String.prototype.padStart/commit/dab6400b2f377c461a211170b8a8283a189d5688) 40 | - [meta] use `npmignore` to autogenerate an npmignore file [`986e57a`](https://github.com/es-shims/String.prototype.padStart/commit/986e57a03638fc945d1555cd3be2a40e8530a82c) 41 | - [meta] add `auto-changelog` [`2ee6cfc`](https://github.com/es-shims/String.prototype.padStart/commit/2ee6cfc98604b85d4b76d660e898a531499b12bb) 42 | - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `safe-publish-latest`, `tape` [`b1e92b1`](https://github.com/es-shims/String.prototype.padStart/commit/b1e92b11fc20d13164ae892a356a3af817ffd9dc) 43 | - [Deps] update `define-properties`, `es-abstract` [`92e11e2`](https://github.com/es-shims/String.prototype.padStart/commit/92e11e2ea6db9c4f895b0d1eab499ac0dedc5c5c) 44 | - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `functions-have-names`, `tape` [`509d44d`](https://github.com/es-shims/String.prototype.padStart/commit/509d44d79e889838fce63b745c4a06ccae52450c) 45 | - [actions] update rebase action to use reusable workflow [`7769cb6`](https://github.com/es-shims/String.prototype.padStart/commit/7769cb66172b33a04490a240915584d0d4c71c8f) 46 | - [actions] update codecov uploader [`52a16c8`](https://github.com/es-shims/String.prototype.padStart/commit/52a16c80f424067f0b5e430dd24f4a26ea154f4c) 47 | 48 | 49 | 50 | 3.1.3 / 2021-10-04 51 | ================= 52 | * [Robustness] avoid a runtime call to `.push` 53 | * [Deps] update `es-abstract` 54 | * [readme] add github actions/codecov badges 55 | * [meta] use `prepublishOnly` script for npm 7+ 56 | * [actions] update workflows 57 | * [actions] use `node/install` instead of `node/run`; use `codecov` action 58 | * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `tape` 59 | 60 | 3.1.2 / 2021-02-20 61 | ================= 62 | * [meta] do not publish github action workflow files 63 | * [Deps] update `call-bind`, `es-abstract` 64 | * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `functions-have-names`, `has-strict-mode`, `tape` 65 | * [actions] update workflows 66 | * [Tests] increase coverage 67 | 68 | 3.1.1 / 2020-11-21 69 | ================= 70 | * [Deps] update `es-abstract`; use `call-bind` where applicable 71 | * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `functions-have-names`, `tape`; add `aud` 72 | * [actions] add "Allow Edits" workflow 73 | * [actions] switch Automatic Rebase workflow to `pull_request_target` event 74 | * [meta] gitignore nyc output 75 | * [meta] add `safe-publish-latest` 76 | * [Tests] migrate tests to Github Actions 77 | * [Tests] run `nyc` on all tests 78 | * [Tests] add `implementation` test; run `es-shim-api` in postlint; use `tape` runner 79 | * [Tests] update `function-bind` 80 | 81 | 3.1.0 / 2019-12-14 82 | ================= 83 | * [New] add `auto` entry point 84 | * [Refactor] use split-up `es-abstract` (77% bundle size decrease) 85 | * [readme] remove testling 86 | * [readme] Fixed syntax error in README (#12) 87 | * [readme] Stage 4 88 | * [Deps] update `define-properties`, `es-abstract`, `function-bind` 89 | * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `functions-have-names`, `covert`, `tape`, `@es-shims/api` 90 | * [meta] add `funding` field 91 | * [meta] Only apps should have lockfiles. 92 | * [Tests] use pretest/posttest for linting/security 93 | * [Tests] use `functions-have-names` 94 | * [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops 95 | * [Tests] remove `jscs` 96 | * [Tests] use shared travis-ci configs 97 | * [actions] add automatic rebasing / merge commit blocking 98 | 99 | 3.0.0 / 2015-11-17 100 | ================= 101 | * Renamed to `padStart`/`padEnd` per November 2015 TC39 meeting. 102 | 103 | 2.0.0 / 2015-09-25 104 | ================= 105 | * [Breaking] Take the *first* part of the `fillStr` when truncating (#1) 106 | * Implement the [es-shim API](es-shims/api) 107 | * [Tests] up to `io.js` `v3.3`, `node` `v4.1` 108 | * [Deps] update `es-abstract` 109 | * [Dev Deps] Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config`, `nsp` 110 | * [Refactor] Remove redundant `max` operation, per https://github.com/ljharb/proposal-string-pad-left-right/pull/2 111 | 112 | 1.0.0 / 2015-07-30 113 | ================= 114 | * v1.0.0 115 | --------------------------------------------------------------------------------