├── auto.js ├── .npmrc ├── .nycrc ├── .github ├── workflows │ ├── node-pretest.yml │ ├── rebase.yml │ ├── require-allow-edits.yml │ ├── node-aught.yml │ └── node-tens.yml └── FUNDING.yml ├── polyfill.js ├── test ├── index.js ├── implementation.js ├── tests.js └── shimmed.js ├── shim.js ├── index.js ├── .eslintrc ├── LICENSE ├── .gitignore ├── package.json ├── README.md ├── implementation.js └── 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 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /polyfill.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var implementation = require('./implementation'); 4 | 5 | module.exports = function getPolyfill() { 6 | return String.prototype.replaceAll || implementation; 7 | }; 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 | -------------------------------------------------------------------------------- /test/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var replaceAllShim = require('../'); 4 | var test = require('tape'); 5 | 6 | var runTests = require('./tests'); 7 | 8 | test('as a function', function (t) { 9 | runTests(replaceAllShim, t); 10 | 11 | t.end(); 12 | }); 13 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /shim.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var define = require('define-properties'); 4 | var getPolyfill = require('./polyfill'); 5 | 6 | module.exports = function shimReplaceAll() { 7 | var polyfill = getPolyfill(); 8 | define( 9 | String.prototype, 10 | { replaceAll: polyfill }, 11 | { replaceAll: function () { return String.prototype.replaceAll !== polyfill; } } 12 | ); 13 | return polyfill; 14 | }; 15 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var callBind = require('call-bind'); 4 | var define = require('define-properties'); 5 | 6 | var implementation = require('./implementation'); 7 | var getPolyfill = require('./polyfill'); 8 | var shim = require('./shim'); 9 | 10 | var boundReplaceAll = callBind(implementation); 11 | 12 | define(boundReplaceAll, { 13 | getPolyfill: getPolyfill, 14 | implementation: implementation, 15 | shim: shim 16 | }); 17 | 18 | module.exports = boundReplaceAll; 19 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | 4 | "extends": "@ljharb", 5 | 6 | "rules": { 7 | "array-bracket-newline": 0, 8 | "eqeqeq": [2, "always", { "null": "ignore" }], 9 | "id-length": 1, 10 | "new-cap": [2, { 11 | "capIsNewExceptions": [ 12 | "Call", 13 | "GetIntrinsic", 14 | "GetMethod", 15 | "GetSubstitution", 16 | "IsCallable", 17 | "RequireObjectCoercible", 18 | "StringIndexOf", 19 | "ToString", 20 | "Type", 21 | ], 22 | }], 23 | }, 24 | } 25 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [ljharb] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: npm/string.prototype.replaceall 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /test/implementation.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var test = require('tape'); 4 | var callBind = require('call-bind'); 5 | var functionsHaveNames = require('functions-have-names')(); 6 | 7 | var implementation = require('../implementation'); 8 | var runTests = require('./tests'); 9 | 10 | test('implementation', function (t) { 11 | t.equal(implementation.length, 2, 'implementation has a length of 2'); 12 | 13 | t.test('Function name', { skip: !functionsHaveNames }, function (st) { 14 | st.equal(implementation.name, 'replaceAll', 'implementation has name "replaceAll"'); 15 | st.end(); 16 | }); 17 | 18 | runTests(callBind(implementation), t); 19 | 20 | t.end(); 21 | }); 22 | -------------------------------------------------------------------------------- /test/tests.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function (replaceAll, t) { 4 | // t.equal(replaceAll('abcabc', /a/, 'z'), 'abcabc'.replace(/a/, 'z'), 'replaceAll with a non-global regex matches replace with the same args'); 5 | t['throws']( 6 | function () { replaceAll('abcabc', /a/, 'z'); }, 7 | TypeError, 8 | 'replaceAll with a non-global regex throws' 9 | ); 10 | 11 | t.equal(replaceAll('abcabc', /a/g, 'z'), 'abcabc'.replace(/a/g, 'z'), 'replaceAll with a global regex matches replace with the same args'); 12 | 13 | t.equal(replaceAll('abcabc', 'a', 'z'), 'zbczbc', 'replaceAll with a string replaces all'); 14 | 15 | t.equal(replaceAll('x', '', '_'), '_x_', 'an empty string to replace, replaces each code unit in a single char string'); 16 | t.equal(replaceAll('xxx', '', '_'), '_x_x_x_', 'an empty string to replace, replaces each code unit in a multi char string'); 17 | 18 | t.equal(replaceAll('xxx', /(?:)/g, '_'), '_x_x_x_', 'an empty regex to replace, replaces each code unit'); 19 | }; 20 | -------------------------------------------------------------------------------- /test/shimmed.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('es5-shim'); 4 | require('es6-shim'); 5 | require('../auto'); 6 | 7 | var test = require('tape'); 8 | var defineProperties = require('define-properties'); 9 | var callBind = require('call-bind'); 10 | 11 | var isEnumerable = Object.prototype.propertyIsEnumerable; 12 | var functionsHaveNames = require('functions-have-names')(); 13 | 14 | var runTests = require('./tests'); 15 | 16 | test('shimmed', function (t) { 17 | t.equal(String.prototype.replaceAll.length, 2, 'String#replaceAll has a length of 2'); 18 | t.test('Function name', { skip: !functionsHaveNames }, function (st) { 19 | st.equal(String.prototype.replaceAll.name, 'replaceAll', 'String#replaceAll has name "replaceAll"'); 20 | st.end(); 21 | }); 22 | 23 | t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { 24 | et.equal(false, isEnumerable.call(String.prototype, 'replaceAll'), 'String#replaceAll is not enumerable'); 25 | et.end(); 26 | }); 27 | 28 | runTests( 29 | callBind(String.prototype.replaceAll), 30 | t 31 | ); 32 | 33 | t.end(); 34 | }); 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Jordan Harband 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 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # TypeScript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | # next.js build output 61 | .next 62 | 63 | # Only apps should have lockfiles 64 | npm-shrinkwrap.json 65 | package-lock.json 66 | yarn.lock 67 | 68 | .npmignore 69 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "string.prototype.replaceall", 3 | "version": "1.0.11", 4 | "description": "Spec-compliant polyfill for String.prototype.replaceAll ESnext proposal", 5 | "main": "index.js", 6 | "scripts": { 7 | "prepack": "npmignore --auto --commentLines=autogenerated", 8 | "prepublish": "not-in-publish || npm run prepublishOnly", 9 | "prepublishOnly": "safe-publish-latest", 10 | "pretest": "npm run lint", 11 | "test": "npm run tests-only", 12 | "posttest": "npx npm@\">= 10.2\" audit --production", 13 | "tests-only": "nyc tape 'test/**/*.js'", 14 | "prelint": "evalmd *.md", 15 | "lint": "eslint --ext=js,mjs .", 16 | "postlint": "es-shim-api --bound", 17 | "version": "auto-changelog && git add CHANGELOG.md", 18 | "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" 19 | }, 20 | "repository": { 21 | "type": "git", 22 | "url": "git+https://github.com/es-shims/String.prototype.replaceAll.git" 23 | }, 24 | "keywords": [ 25 | "string", 26 | "replaceall", 27 | "replace", 28 | "regex", 29 | "all", 30 | "es2020", 31 | "esnext", 32 | "javascript", 33 | "spec" 34 | ], 35 | "author": "Jordan Harband ", 36 | "funding": { 37 | "url": "https://github.com/sponsors/ljharb" 38 | }, 39 | "license": "MIT", 40 | "bugs": { 41 | "url": "https://github.com/es-shims/String.prototype.replaceAll/issues" 42 | }, 43 | "homepage": "https://github.com/es-shims/String.prototype.replaceAll#readme", 44 | "devDependencies": { 45 | "@es-shims/api": "^2.5.1", 46 | "@ljharb/eslint-config": "^21.2.0", 47 | "auto-changelog": "^2.5.0", 48 | "encoding": "^0.1.13", 49 | "es5-shim": "^4.6.7", 50 | "es6-shim": "^0.35.8", 51 | "eslint": "=8.8.0", 52 | "evalmd": "^0.0.19", 53 | "functions-have-names": "^1.2.3", 54 | "in-publish": "^2.0.1", 55 | "npmignore": "^0.3.1", 56 | "nyc": "^10.3.2", 57 | "safe-publish-latest": "^2.0.0", 58 | "tape": "^5.9.0" 59 | }, 60 | "dependencies": { 61 | "call-bind": "^1.0.8", 62 | "define-properties": "^1.2.1", 63 | "es-abstract": "^1.24.0", 64 | "es-errors": "^1.3.0", 65 | "es-object-atoms": "^1.1.1", 66 | "get-intrinsic": "^1.3.0", 67 | "has-symbols": "^1.1.0", 68 | "is-regex": "^1.2.1" 69 | }, 70 | "auto-changelog": { 71 | "output": "CHANGELOG.md", 72 | "template": "keepachangelog", 73 | "unreleased": false, 74 | "commitLimit": false, 75 | "backfillLimit": false, 76 | "hideCredit": true 77 | }, 78 | "publishConfig": { 79 | "ignore": [ 80 | ".github/workflows" 81 | ] 82 | }, 83 | "engines": { 84 | "node": ">= 0.4" 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # string.prototype.replaceall [![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 | ES Proposal spec-compliant shim for String.prototype.replaceAll. Invoke its "shim" method to shim `String.prototype.replaceAll` if it is unavailable or noncompliant. 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 [proposed spec](https://github.com/tc39/proposal-string-replaceall). 15 | 16 | Most common usage: 17 | ```js 18 | const assert = require('assert'); 19 | const replaceAll = require('string.prototype.replaceall'); 20 | 21 | const str = 'aabc'; 22 | 23 | // replaceAll and replace are the same, when given a global regex to replace 24 | assert.equal(replaceAll(str, /a/g, 'z'), str.replace(/a/g, 'z')); 25 | 26 | // replace, with a string, replaces once 27 | assert.equal(str.replace('a', 'z'), 'zabc'); 28 | 29 | // replaceAll, with a string, replaces all 30 | assert.equal(replaceAll(str, 'a', 'z'), 'zzbc'); 31 | 32 | replaceAll.shim(); // will be a no-op if not needed 33 | 34 | // replaceAll and replace are the same, when given a global regex to replace 35 | assert.equal(str.replaceAll(/a/g, 'z'), str.replace(/a/g, 'z')); 36 | 37 | // replace, with a string, replaces once 38 | assert.equal(str.replace('a', 'z'), 'zabc'); 39 | 40 | // replaceAll, with a string, replaces all 41 | assert.equal(str.replaceAll('a', 'z'), 'zzbc'); 42 | ``` 43 | 44 | ## Tests 45 | Simply clone the repo, `npm install`, and run `npm test` 46 | 47 | [package-url]: https://npmjs.com/package/string.prototype.replaceall 48 | [npm-version-svg]: https://versionbadg.es/es-shims/String.prototype.replaceAll.svg 49 | [deps-svg]: https://david-dm.org/es-shims/String.prototype.replaceAll.svg 50 | [deps-url]: https://david-dm.org/es-shims/String.prototype.replaceAll 51 | [dev-deps-svg]: https://david-dm.org/es-shims/String.prototype.replaceAll/dev-status.svg 52 | [dev-deps-url]: https://david-dm.org/es-shims/String.prototype.replaceAll#info=devDependencies 53 | [npm-badge-png]: https://nodei.co/npm/string.prototype.replaceall.png?downloads=true&stars=true 54 | [license-image]: https://img.shields.io/npm/l/string.prototype.replaceall.svg 55 | [license-url]: LICENSE 56 | [downloads-image]: https://img.shields.io/npm/dm/string.prototype.replaceall.svg 57 | [downloads-url]: https://npm-stat.com/charts.html?package=string.prototype.replaceall 58 | [codecov-image]: https://codecov.io/gh/es-shims/string.prototype.replaceall/branch/main/graphs/badge.svg 59 | [codecov-url]: https://app.codecov.io/gh/es-shims/string.prototype.replaceall/ 60 | [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/string.prototype.replaceall 61 | [actions-url]: https://github.com/es-shims/string.prototype.replacealstring.prototype.replaceall 62 | -------------------------------------------------------------------------------- /implementation.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Call = require('es-abstract/2025/Call'); 4 | var GetMethod = require('es-abstract/2025/GetMethod'); 5 | var GetSubstitution = require('es-abstract/2025/GetSubstitution'); 6 | var IsCallable = require('es-abstract/2025/IsCallable'); 7 | var RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible'); 8 | var ToString = require('es-abstract/2025/ToString'); 9 | var StringIndexOf = require('es-abstract/2025/StringIndexOf'); 10 | 11 | var GetIntrinsic = require('get-intrinsic'); 12 | var callBound = require('call-bind/callBound'); 13 | var hasSymbols = require('has-symbols')(); 14 | var isRegex = require('is-regex'); 15 | 16 | var max = GetIntrinsic('%Math.max%'); 17 | var $TypeError = require('es-errors/type'); 18 | 19 | var $push = callBound('Array.prototype.push'); 20 | var $slice = callBound('String.prototype.slice'); 21 | var $indexOf = callBound('String.prototype.indexOf'); 22 | var $replace = callBound('String.prototype.replace'); 23 | 24 | // https://tc39.es/ecma262/#sec-string.prototype.replaceall 25 | 26 | // eslint-disable-next-line max-statements, max-lines-per-function 27 | module.exports = function replaceAll(searchValue, replaceValue) { 28 | var O = RequireObjectCoercible(this); 29 | 30 | var searchValueIsRegex = isRegex(searchValue); 31 | if (searchValueIsRegex && $indexOf($slice(searchValue, searchValue.source.length + 2), 'g') === -1) { 32 | throw new $TypeError('use .replace for a non-global regex. NOTE: this may be allowed in the future.'); 33 | 34 | } 35 | if (hasSymbols && Symbol.replace) { 36 | if (searchValue != null) { 37 | var replacer = GetMethod(searchValue, Symbol.replace); 38 | if (typeof replacer !== 'undefined') { 39 | return Call(replacer, searchValue, [O, replaceValue]); 40 | } 41 | } 42 | } else if (searchValueIsRegex) { 43 | return $replace(O, searchValue, replaceValue); 44 | } 45 | 46 | var string = ToString(O); 47 | var searchString = ToString(searchValue); 48 | var functionalReplace = IsCallable(replaceValue); 49 | if (!functionalReplace) { 50 | replaceValue = ToString(replaceValue); // eslint-disable-line no-param-reassign 51 | } 52 | 53 | var searchLength = searchString.length; 54 | var advanceBy = max(1, searchLength); 55 | var matchPositions = []; 56 | 57 | var position = StringIndexOf(string, searchString, 0); 58 | while (position !== 'NOT-FOUND') { 59 | $push(matchPositions, position); 60 | position = StringIndexOf(string, searchString, position + advanceBy); 61 | } 62 | 63 | var endOfLastMatch = 0; 64 | var result = ''; 65 | for (var i = 0; i < matchPositions.length; i += 1) { 66 | var replacement; 67 | if (functionalReplace) { 68 | replacement = ToString(Call(replaceValue, undefined, [searchString, matchPositions[i], string])); 69 | } else { 70 | if (typeof replaceValue !== 'string') { 71 | throw new $TypeError('Assertion failed: `replaceValue` should be a string at this point'); 72 | } 73 | var captures = []; 74 | replacement = GetSubstitution(searchString, string, matchPositions[i], captures, undefined, replaceValue); 75 | } 76 | var stringSlice = $slice(string, endOfLastMatch, matchPositions[i]); 77 | result += stringSlice + replacement; 78 | endOfLastMatch = matchPositions[i] + searchLength; 79 | } 80 | 81 | if (endOfLastMatch < string.length) { 82 | result += $slice(string, endOfLastMatch); 83 | } 84 | 85 | return result; 86 | }; 87 | -------------------------------------------------------------------------------- /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 | ## [v1.0.11](https://github.com/es-shims/String.prototype.replaceAll/compare/v1.0.10...v1.0.11) - 2025-09-11 9 | 10 | ### Commits 11 | 12 | - [Deps] update `call-bind`, `es-abstract`, `es-object-atoms`, `get-intrinsic`, `has-symbols`, `is-regex` [`42093cf`](https://github.com/es-shims/String.prototype.replaceAll/commit/42093cf783e701698bc248eac64ba24dbeed1556) 13 | - [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `auto-changelog`, `tape` [`ead7f09`](https://github.com/es-shims/String.prototype.replaceAll/commit/ead7f0907c36bc66cc35b9409785555bbd6bc591) 14 | - [Tests] replace `aud` with `npm audit` [`12907f6`](https://github.com/es-shims/String.prototype.replaceAll/commit/12907f67c1725fcf397a7922f38e5f85732c7731) 15 | - [Dev Deps] add missing peer dep [`8c69aa5`](https://github.com/es-shims/String.prototype.replaceAll/commit/8c69aa5aac0f4acd0148c15d168ebc8d82065d23) 16 | 17 | ## [v1.0.10](https://github.com/es-shims/String.prototype.replaceAll/compare/v1.0.9...v1.0.10) - 2024-03-19 18 | 19 | ### Commits 20 | 21 | - [Deps] update `call-bind`, `es-abstract`, `es-errors`, `get-intrinsic` [`769d1cf`](https://github.com/es-shims/String.prototype.replaceAll/commit/769d1cf2ee05915f9a666f7ad55dbd60eebf99e0) 22 | - [actions] remove redundant finisher [`74bfab2`](https://github.com/es-shims/String.prototype.replaceAll/commit/74bfab2b3b63b406677b725b685e0b62e1ae6914) 23 | - [Refactor] use `es-object-atoms` where possible [`6696151`](https://github.com/es-shims/String.prototype.replaceAll/commit/6696151c0b5ffd8374a0f8fcc5872ddc7eff894e) 24 | - [meta] add missing `engines.node` [`e38cb2b`](https://github.com/es-shims/String.prototype.replaceAll/commit/e38cb2b68328349e689a0ac996298e027ec4570d) 25 | - [Dev Deps] update `tape` [`784df8c`](https://github.com/es-shims/String.prototype.replaceAll/commit/784df8c7f611a1f09db5b59e4cc2beaa1b0cfb3d) 26 | 27 | ## [v1.0.9](https://github.com/es-shims/String.prototype.replaceAll/compare/v1.0.8...v1.0.9) - 2024-02-04 28 | 29 | ### Commits 30 | 31 | - [Deps] update `call-bind`, `define-properties`, `es-abstract`, `get-intrinsic` [`9afaf70`](https://github.com/es-shims/String.prototype.replaceAll/commit/9afaf709ff8d2d43378fc8772dfc1bc7e17a99c3) 32 | - [Dev Deps] update `aud`, `npmignore`, `tape` [`ca2421a`](https://github.com/es-shims/String.prototype.replaceAll/commit/ca2421a9c7f3d62fac38d19066fb7a2e68de96bc) 33 | - [Refactor] use `es-errors` where possible, so things that only need those do not need `get-intrinsic` [`fdad745`](https://github.com/es-shims/String.prototype.replaceAll/commit/fdad74599d52fab1745033767aa27772f60d846a) 34 | 35 | ## [v1.0.8](https://github.com/es-shims/String.prototype.replaceAll/compare/v1.0.7...v1.0.8) - 2023-09-03 36 | 37 | ### Commits 38 | 39 | - [Deps] update `define-properties`, `es-abstract`, `get-intrinsic` [`23e1d04`](https://github.com/es-shims/String.prototype.replaceAll/commit/23e1d04429bbca36ae41050fdd4b8a188b9b9e1e) 40 | - [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `es6-shim`, `tape` [`5ee9858`](https://github.com/es-shims/String.prototype.replaceAll/commit/5ee9858c60e0f354a70aebfd30013ac5dcac0da6) 41 | - [meta] fix `npmignore` integration [`4e1e8a0`](https://github.com/es-shims/String.prototype.replaceAll/commit/4e1e8a0d4c844c24a31e5c4efbd381cddcfe4846) 42 | 43 | ## [v1.0.7](https://github.com/es-shims/String.prototype.replaceAll/compare/v1.0.6...v1.0.7) - 2022-11-07 44 | 45 | ### Commits 46 | 47 | - [actions] reuse common workflows [`4bbf1bc`](https://github.com/es-shims/String.prototype.replaceAll/commit/4bbf1bc8d095ef7ee1c64300eb2c3b516efb8d41) 48 | - [meta] use `npmignore` to autogenerate an npmignore file [`c9a5e01`](https://github.com/es-shims/String.prototype.replaceAll/commit/c9a5e0107cab4ec0c611e5ce0312dffe5805653d) 49 | - [Deps] update `define-properties`, `es-abstract`, `get-intrinsic`, `has-symbols` [`6a559a7`](https://github.com/es-shims/String.prototype.replaceAll/commit/6a559a7ebd926c3756076a65bfdfb8dd50e62dbe) 50 | - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `safe-publish-latest`, `tape` [`02e98d1`](https://github.com/es-shims/String.prototype.replaceAll/commit/02e98d1b9b8a170b6753e6e4004aea0ca841bc43) 51 | - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `es5-shim`, `functions-have-names`, `tape` [`bf0084f`](https://github.com/es-shims/String.prototype.replaceAll/commit/bf0084fa414f9930a87f7e178a1cf2ca0f38c220) 52 | - [actions] update rebase action to use reusable workflow [`ce0e8b7`](https://github.com/es-shims/String.prototype.replaceAll/commit/ce0e8b7f61220e12557e3997c1e30f5d4413c01d) 53 | - [actions] update codecov uploader [`952e5b3`](https://github.com/es-shims/String.prototype.replaceAll/commit/952e5b3209e1b1ac0cad06e1385ae0e823fb4e01) 54 | 55 | ## [v1.0.6](https://github.com/es-shims/String.prototype.replaceAll/compare/v1.0.5...v1.0.6) - 2021-10-04 56 | 57 | ### Commits 58 | 59 | - [Deps] update `es-abstract` [`823d403`](https://github.com/es-shims/String.prototype.replaceAll/commit/823d403d0226e0a6eee4426e9daabdc27ef287af) 60 | - [actions] use `node/install` instead of `node/run`; use `codecov` action [`23b0615`](https://github.com/es-shims/String.prototype.replaceAll/commit/23b06153625f70ec9f11b7fec938d97aabd93304) 61 | - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `auto-changelog`, `es5-shim`, `tape` [`f0f4be9`](https://github.com/es-shims/String.prototype.replaceAll/commit/f0f4be9ea715eeb24e8f53e2666505198de4eca4) 62 | - [meta] add FUNDING.yml [`392afd7`](https://github.com/es-shims/String.prototype.replaceAll/commit/392afd7c543da9da3da18302e16ac1152baac298) 63 | - [readme] add github actions/codecov badges [`e01952a`](https://github.com/es-shims/String.prototype.replaceAll/commit/e01952adde43f1f9ef4a62fae110b0bd267902f3) 64 | - [Deps] update `es-abstract`, `is-regex` [`f763b3b`](https://github.com/es-shims/String.prototype.replaceAll/commit/f763b3b221a16e378df4f0155e59dcf292adbe5c) 65 | - [Deps] update `es-abstract`, `has-symbols` [`35cfd7a`](https://github.com/es-shims/String.prototype.replaceAll/commit/35cfd7a57236ea86a54aa8679c5c513d65f40be3) 66 | - [Dev Deps] update `eslint`, `tape` [`d066e34`](https://github.com/es-shims/String.prototype.replaceAll/commit/d066e342cc87266cb933d48001ed0051e74aac5a) 67 | - [actions] update workflows [`c592b5d`](https://github.com/es-shims/String.prototype.replaceAll/commit/c592b5d690ebcfc755aeab647914817faaab5703) 68 | - [meta] use `prepublishOnly` script for npm 7+ [`bb345fd`](https://github.com/es-shims/String.prototype.replaceAll/commit/bb345fd8b2f9a4f6a0a494f2ec07da5b69cd0811) 69 | - [Dev Deps] update `@es-shims/api` [`4050d23`](https://github.com/es-shims/String.prototype.replaceAll/commit/4050d237e6bc4123c1dda4efc925334521d75ea7) 70 | 71 | ## [v1.0.5](https://github.com/es-shims/String.prototype.replaceAll/compare/v1.0.4...v1.0.5) - 2021-02-22 72 | 73 | ### Commits 74 | 75 | - [meta] do not publish github action workflow files [`5bc61a7`](https://github.com/es-shims/String.prototype.replaceAll/commit/5bc61a7765dc78afd3a63b66321dd45a14b2b717) 76 | - [Refactor] use an explicit step for an empty string searchValue [`5c0a89a`](https://github.com/es-shims/String.prototype.replaceAll/commit/5c0a89afdeb3ef722fc81e5a83ee0768ad88b3fa) 77 | - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `es5-shim`, `functions-have-names`, `tape` [`42c1125`](https://github.com/es-shims/String.prototype.replaceAll/commit/42c1125240eea2b2b9f3d49c3de765dee36d1758) 78 | - [readme] remove travis badge [`ee72ded`](https://github.com/es-shims/String.prototype.replaceAll/commit/ee72dede50a46c03c1e6634fcb0e01f5fe1474f1) 79 | - [Deps] update `call-bind`, `es-abstract`, `get-intrinsic`, `is-regex` [`d79e8fc`](https://github.com/es-shims/String.prototype.replaceAll/commit/d79e8fcab0e82d28d27934c47a84134831d4de00) 80 | - [actions] update workflows [`54098df`](https://github.com/es-shims/String.prototype.replaceAll/commit/54098df89d03c5f91d23427ea9bc530012668f4e) 81 | - [Tests] increase coverage [`e9e96b6`](https://github.com/es-shims/String.prototype.replaceAll/commit/e9e96b6355c9416a2fc48d98ade934996ce8fb33) 82 | 83 | ## [v1.0.4](https://github.com/es-shims/String.prototype.replaceAll/compare/v1.0.3...v1.0.4) - 2020-11-21 84 | 85 | ### Commits 86 | 87 | - [Tests] migrate tests to Github Actions [`a3561c7`](https://github.com/es-shims/String.prototype.replaceAll/commit/a3561c7bcbe2e88bbd5d0d648f7ffb79634fad78) 88 | - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `es6-shim`, `tape` [`80dfacb`](https://github.com/es-shims/String.prototype.replaceAll/commit/80dfacb9694d9227d8c59138cf908c5909001d86) 89 | - [Deps] update `es-abstract`, `is-regex`; use `get-intrinsic` and `call-bind` where applicable [`a956402`](https://github.com/es-shims/String.prototype.replaceAll/commit/a956402c4f9ee6127962acea0ac86d9e9a8531d5) 90 | - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `functions-have-names`; add `safe-publish-latest` [`5e469fd`](https://github.com/es-shims/String.prototype.replaceAll/commit/5e469fda0c48702efc3f816e4be8bdf99cf44ee6) 91 | - [Tests] run `nyc` on all tests [`b5d1eeb`](https://github.com/es-shims/String.prototype.replaceAll/commit/b5d1eebe06414a87b49d01b61755dee8f628685e) 92 | - [actions] add "Allow Edits" workflow [`03f0140`](https://github.com/es-shims/String.prototype.replaceAll/commit/03f0140a2c6a64e8c6c10a06eaedaadf980dc700) 93 | - [Deps] update `es-abstract`, `is-regex`; refactor away from `function-bind` [`dadd98c`](https://github.com/es-shims/String.prototype.replaceAll/commit/dadd98c7b156f9572123520416ee3d73081d16de) 94 | - [Dev Deps] update `es5-shim`, `tape` [`1740467`](https://github.com/es-shims/String.prototype.replaceAll/commit/174046765a0ae2e55eb9eae0f6564f58cefa62e7) 95 | - [Dev Deps] update `auto-changelog`; add `aud` [`41ce396`](https://github.com/es-shims/String.prototype.replaceAll/commit/41ce39649906b98522226fc27ffbc5fa876b1f6e) 96 | - [actions] switch Automatic Rebase workflow to `pull_request_target` event [`77ce2cd`](https://github.com/es-shims/String.prototype.replaceAll/commit/77ce2cd20f0f1b4d5f1ca94c826b11b083fac16f) 97 | - [Dev Deps] update `auto-changelog`, `tape` [`a13336c`](https://github.com/es-shims/String.prototype.replaceAll/commit/a13336c38bb6c35c68a49bac90e34dd0c41bdd66) 98 | - [Tests] only audit prod deps [`c122c88`](https://github.com/es-shims/String.prototype.replaceAll/commit/c122c885a34af4da75f414f7aeb10e2ab0601b51) 99 | - [Deps] update `es-abstract` [`f6b0048`](https://github.com/es-shims/String.prototype.replaceAll/commit/f6b0048e5e1371ee2e599bc25952cdfec8b94445) 100 | 101 | ## [v1.0.3](https://github.com/es-shims/String.prototype.replaceAll/compare/v1.0.2...v1.0.3) - 2019-12-14 102 | 103 | ### Commits 104 | 105 | - [Tests] use shared travis-ci configs [`410a2f8`](https://github.com/es-shims/String.prototype.replaceAll/commit/410a2f88ae5ab038f58fa77d00760a0d74257b99) 106 | - [meta] rerun `auto-changelog` [`de4a904`](https://github.com/es-shims/String.prototype.replaceAll/commit/de4a904e8d530091db510b31598c46da71bd12f1) 107 | - [Refactor] use split-up `es-abstract` (71% bundle size decrease) [`dd62b57`](https://github.com/es-shims/String.prototype.replaceAll/commit/dd62b57c7f51147ac13b401c86bd47f9a16ee767) 108 | - [actions] add automatic rebasing / merge commit blocking [`f390fa7`](https://github.com/es-shims/String.prototype.replaceAll/commit/f390fa70f019a290f6be9b2daa9f38895a0f13f4) 109 | - [Deps] update `es-abstract`, `has-symbols` [`ff7ab0c`](https://github.com/es-shims/String.prototype.replaceAll/commit/ff7ab0c7ec18f3eca5cdcc6e49d54e61be453dc5) 110 | - [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`5945afc`](https://github.com/es-shims/String.prototype.replaceAll/commit/5945afccb80b8b4750f8b2b9173c1265a53846d1) 111 | - [meta] add `funding` field [`f0fdbf1`](https://github.com/es-shims/String.prototype.replaceAll/commit/f0fdbf1f23b8f474c0e427a565be37c62faf07cd) 112 | 113 | ## [v1.0.2](https://github.com/es-shims/String.prototype.replaceAll/compare/v1.0.1...v1.0.2) - 2019-10-31 114 | 115 | ### Fixed 116 | 117 | - [Deps] add missing `define-properties` [`#2`](https://github.com/es-shims/String.prototype.replaceAll/issues/2) 118 | 119 | ## [v1.0.1](https://github.com/es-shims/String.prototype.replaceAll/compare/v1.0.0...v1.0.1) - 2019-10-26 120 | 121 | ### Fixed 122 | 123 | - [Fix] handle an empty string searchValue [`#1`](https://github.com/es-shims/String.prototype.replaceAll/issues/1) 124 | 125 | ### Commits 126 | 127 | - [Deps] update `es-abstract` [`2ab3464`](https://github.com/es-shims/String.prototype.replaceAll/commit/2ab346486859f0f1448f53547740df5274af00c5) 128 | - [Tests] up to `node` `v13.0`, `v12.13`, `v10.17` [`be6a236`](https://github.com/es-shims/String.prototype.replaceAll/commit/be6a2366fd8f57a87af8aaa98ef6b72d66852392) 129 | - [meta] use keepachangelog format [`f5248bb`](https://github.com/es-shims/String.prototype.replaceAll/commit/f5248bb1aea82b6d9c3ca9d250f1b45d540b3d0f) 130 | - [Dev Deps] update `eslint`, `functions-have-names`, `auto-changelog` [`5be4a77`](https://github.com/es-shims/String.prototype.replaceAll/commit/5be4a77a7cf593055f57b8a50147e5868f922f27) 131 | - [Dev Deps] update `eslint` [`376879f`](https://github.com/es-shims/String.prototype.replaceAll/commit/376879f87bd75b1939620bf866af35b15582ad5c) 132 | 133 | ## v1.0.0 - 2019-09-03 134 | 135 | ### Commits 136 | 137 | - tests [`0d23a9b`](https://github.com/es-shims/String.prototype.replaceAll/commit/0d23a9b46f4c0d10f4fe41fcf644e729b73dccf8) 138 | - implementation [`d44c2e9`](https://github.com/es-shims/String.prototype.replaceAll/commit/d44c2e96b823997c669879a6f7de1ac894a35634) 139 | - Initial commit [`6dc47f9`](https://github.com/es-shims/String.prototype.replaceAll/commit/6dc47f9a516f4881b451129936c3275168cf5405) 140 | - readme [`08c5710`](https://github.com/es-shims/String.prototype.replaceAll/commit/08c571056a42d9820f403035796e74172e68ca3d) 141 | - npm init [`f666051`](https://github.com/es-shims/String.prototype.replaceAll/commit/f666051cb7d2d3392d2ba30dfad952048ff47d5b) 142 | - non-global regexes throw, pending web compatibility data [`fbd9a60`](https://github.com/es-shims/String.prototype.replaceAll/commit/fbd9a60c929575111721f9c71d5638804614ba21) 143 | - [fix] add fallback for pre-Symbol.replace engines [`57b33d3`](https://github.com/es-shims/String.prototype.replaceAll/commit/57b33d3dbb8348f2b9e83a652a1771c447e953e8) 144 | - [Tests] add `npm run lint` [`a979c0f`](https://github.com/es-shims/String.prototype.replaceAll/commit/a979c0fc27735abb3a710ae80be5c5c564a5d1fe) 145 | - [meta] add auto-changelog [`f780972`](https://github.com/es-shims/String.prototype.replaceAll/commit/f78097211dcc9a22f805f4198026ee87a41d14e1) 146 | - Only apps should have lockfiles [`b9dc48f`](https://github.com/es-shims/String.prototype.replaceAll/commit/b9dc48f43711a8d38515aeafdd0ffc6a985465bc) 147 | --------------------------------------------------------------------------------