
Product
Introducing Supply Chain Attack Campaigns Tracking in the Socket Dashboard
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.
string.prototype.lastindexof
Advanced tools
An ES-spec-compliant `String.prototype.lastIndexOf`shim/polyfill/replacement that works as far down as ES3.
An ES-spec-compliant String.prototype.lastIndexOfshim/polyfill/replacement that works as far down as ES3.
This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec.
npm install --save string.prototype.lastindexof
var assert = require('assert');
assert('abcabc'.lastIndexOf('abc') === 3);
assert('abcabc'.lastIndexOf('abc', 0) === 0);
assert('abcabc'.lastIndexOf('abc', 1) === 0);
assert('abcabc'.lastIndexOf('abc', 2) === 0);
assert('abcabc'.lastIndexOf('abc', 3) === 3);
assert('abcabc'.lastIndexOf('abc', 4) === 3);
assert('abcabc'.lastIndexOf('abc', 5) === 3);
assert('abcabc'.lastIndexOf('abc', 6) === 3);
assert('abc'.lastIndexOf('x') === -1);
Clone the repo, npm install, and run npm test
FAQs
An ES-spec-compliant `String.prototype.lastIndexOf`shim/polyfill/replacement that works as far down as ES3.
The npm package string.prototype.lastindexof receives a total of 0 weekly downloads. As such, string.prototype.lastindexof popularity was classified as not popular.
We found that string.prototype.lastindexof demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.

Research
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.

Security News
Node.js 25.4.0 makes require(esm) stable, formalizing CommonJS and ESM compatibility across supported Node versions.