Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
string.prototype.split
Advanced tools
An ES spec-compliant `String.prototype.split` shim/polyfill/replacement that works as far down as ES3
An ES spec-compliant String.prototype.split
shim/polyfill/replacement that works as far down as ES3. There's a number of bugs in various browser versions that this package addresses.
This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec.
Because String.prototype.split
depends on a receiver (the “this” value), the main export takes the string to operate on as the first argument.
var split = require('string.prototype.split');
var assert = require('assert');
assert.deepEqual(split('abc', ''), ['a', 'b', 'c']);
var split = require('string.prototype.split');
var assert = require('assert');
/* when String#split is not present */
delete String.prototype.split;
var shimmedSplit = split.shim();
assert.equal(shimmedSplit, String.prototype.split);
assert.deepEqual(shimmedSplit('abc', ''), ['a', 'b', 'c']);
var split = require('string.prototype.split');
var assert = require('assert');
/* when String#split is present */
var shimmedSplit = split.shim();
assert.equal(shimmedSplit, String.prototype.split);
assert.deepEqual(shimmedSplit('abc', ''), ['a', 'b', 'c']);
Simply clone the repo, npm install
, and run npm test
v1.0.6 - 2022-04-08
bb283ec
eslint
, @ljharb/eslint-config
, @es-shims/api
, safe-publish-latest
, tape
2009e5c
0ec83c6
eslint
, @ljharb/eslint-config
, aud
, auto-changelog
, tape
148a49c
es-abstract
, regexp.prototype.flags
003e2bc
test
observably looks up exec
on the object a6f8a68
FAQs
An ES spec-compliant `String.prototype.split` shim/polyfill/replacement that works as far down as ES3
The npm package string.prototype.split receives a total of 1,732 weekly downloads. As such, string.prototype.split popularity was classified as popular.
We found that string.prototype.split demonstrated a healthy version release cadence and project activity because the last version was released less than 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.