Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

string.prototype.replaceall

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

string.prototype.replaceall - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

.github/FUNDING.yml

16

CHANGELOG.md

@@ -8,2 +8,18 @@ # Changelog

## [v1.0.6](https://github.com/es-shims/String.prototype.replaceAll/compare/v1.0.5...v1.0.6) - 2021-10-04
### Commits
- [Deps] update `es-abstract` [`823d403`](https://github.com/es-shims/String.prototype.replaceAll/commit/823d403d0226e0a6eee4426e9daabdc27ef287af)
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`23b0615`](https://github.com/es-shims/String.prototype.replaceAll/commit/23b06153625f70ec9f11b7fec938d97aabd93304)
- [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)
- [meta] add FUNDING.yml [`392afd7`](https://github.com/es-shims/String.prototype.replaceAll/commit/392afd7c543da9da3da18302e16ac1152baac298)
- [readme] add github actions/codecov badges [`e01952a`](https://github.com/es-shims/String.prototype.replaceAll/commit/e01952adde43f1f9ef4a62fae110b0bd267902f3)
- [Deps] update `es-abstract`, `is-regex` [`f763b3b`](https://github.com/es-shims/String.prototype.replaceAll/commit/f763b3b221a16e378df4f0155e59dcf292adbe5c)
- [Deps] update `es-abstract`, `has-symbols` [`35cfd7a`](https://github.com/es-shims/String.prototype.replaceAll/commit/35cfd7a57236ea86a54aa8679c5c513d65f40be3)
- [Dev Deps] update `eslint`, `tape` [`d066e34`](https://github.com/es-shims/String.prototype.replaceAll/commit/d066e342cc87266cb933d48001ed0051e74aac5a)
- [actions] update workflows [`c592b5d`](https://github.com/es-shims/String.prototype.replaceAll/commit/c592b5d690ebcfc755aeab647914817faaab5703)
- [meta] use `prepublishOnly` script for npm 7+ [`bb345fd`](https://github.com/es-shims/String.prototype.replaceAll/commit/bb345fd8b2f9a4f6a0a494f2ec07da5b69cd0811)
- [Dev Deps] update `@es-shims/api` [`4050d23`](https://github.com/es-shims/String.prototype.replaceAll/commit/4050d237e6bc4123c1dda4efc925334521d75ea7)
## [v1.0.5](https://github.com/es-shims/String.prototype.replaceAll/compare/v1.0.4...v1.0.5) - 2021-02-22

@@ -10,0 +26,0 @@

47

implementation.js
'use strict';
var Call = require('es-abstract/2020/Call');
var GetMethod = require('es-abstract/2020/GetMethod');
var GetSubstitution = require('es-abstract/2020/GetSubstitution');
var IsCallable = require('es-abstract/2020/IsCallable');
var IsInteger = require('es-abstract/2020/IsInteger');
var RequireObjectCoercible = require('es-abstract/2020/RequireObjectCoercible');
var ToString = require('es-abstract/2020/ToString');
var Type = require('es-abstract/2020/Type');
var Call = require('es-abstract/2021/Call');
var GetMethod = require('es-abstract/2021/GetMethod');
var GetSubstitution = require('es-abstract/2021/GetSubstitution');
var IsCallable = require('es-abstract/2021/IsCallable');
var RequireObjectCoercible = require('es-abstract/2021/RequireObjectCoercible');
var ToString = require('es-abstract/2021/ToString');
var StringIndexOf = require('es-abstract/2021/StringIndexOf');
var Type = require('es-abstract/2021/Type');
var GetIntrinsic = require('get-intrinsic');

@@ -24,33 +24,2 @@ var callBound = require('call-bind/callBound');

// TODO: replace this with the es-abstract 2021 impl once it's merged and published
// eslint-disable-next-line func-style
function StringIndexOf(string, searchValue, fromIndex) {
if (Type(string) !== 'String' || Type(searchValue) !== 'String') {
throw new $TypeError('Assertion failed: string and searchValue must both be Strings');
}
if (!IsInteger(fromIndex) || fromIndex < 0) {
throw new $TypeError('Assertion failed: fromIndex must be a nonnegative integer');
}
var len = string.length;
if (searchValue === '' && fromIndex <= len) {
return fromIndex;
}
var searchLen = searchValue.length;
// Note 2 of https://tc39.es/ecma262/#sec-stringindexof
if (fromIndex > len) {
return -1;
}
for (var i = fromIndex; i < len; i += 1) {
if (searchValue === '' || $slice(string, i, i + searchLen) === searchValue) {
return i;
}
}
return -1;
}
// eslint-disable-next-line max-statements, max-lines-per-function

@@ -57,0 +26,0 @@ module.exports = function replaceAll(searchValue, replaceValue) {

{
"name": "string.prototype.replaceall",
"version": "1.0.5",
"version": "1.0.6",
"description": "Spec-compliant polyfill for String.prototype.replaceAll ESnext proposal",
"main": "index.js",
"scripts": {
"prepublish": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"pretest": "npm run lint",

@@ -43,9 +44,9 @@ "test": "npm run tests-only",

"devDependencies": {
"@es-shims/api": "^2.1.2",
"@ljharb/eslint-config": "^17.5.1",
"aud": "^1.1.4",
"auto-changelog": "^2.2.1",
"es5-shim": "^4.5.15",
"@es-shims/api": "^2.2.2",
"@ljharb/eslint-config": "^18.0.0",
"aud": "^1.1.5",
"auto-changelog": "^2.3.0",
"es5-shim": "^4.6.2",
"es6-shim": "^0.35.6",
"eslint": "^7.20.0",
"eslint": "^7.32.0",
"evalmd": "^0.0.19",

@@ -55,3 +56,3 @@ "functions-have-names": "^1.2.2",

"safe-publish-latest": "^1.1.4",
"tape": "^5.2.0"
"tape": "^5.3.1"
},

@@ -61,6 +62,6 @@ "dependencies": {

"define-properties": "^1.1.3",
"es-abstract": "^1.18.0-next.2",
"es-abstract": "^1.19.1",
"get-intrinsic": "^1.1.1",
"has-symbols": "^1.0.1",
"is-regex": "^1.1.2"
"has-symbols": "^1.0.2",
"is-regex": "^1.1.4"
},

@@ -67,0 +68,0 @@ "auto-changelog": {

# string.prototype.replaceall <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][deps-svg]][deps-url]

@@ -56,1 +58,5 @@ [![dev dependency status][dev-deps-svg]][dev-deps-url]

[downloads-url]: https://npm-stat.com/charts.html?package=string.prototype.replaceall
[codecov-image]: https://codecov.io/gh/es-shims/string.prototype.replaceall/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/es-shims/string.prototype.replaceall/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/string.prototype.replaceall
[actions-url]: https://github.com/es-shims/string.prototype.replacealstring.prototype.replaceall

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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