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

string.prototype.split

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

string.prototype.split - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

6

CHANGELOG.md

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

## [v1.0.3](https://github.com/es-shims/String.prototype.split/compare/v1.0.2...v1.0.3) - 2020-11-21
### Commits
- [Fix] `node` `v0.8`: ensure the raw implementation includes this bugfix [`60d4bf2`](https://github.com/es-shims/String.prototype.split/commit/60d4bf221617c4ef7e94b80b39620a8534f020cf)
## [v1.0.2](https://github.com/es-shims/String.prototype.split/compare/v1.0.1...v1.0.2) - 2020-11-19

@@ -10,0 +16,0 @@

22

implementation.js
'use strict';
// var ToObject = require('es-abstract/2020/ToObject');
var callBind = require('call-bind');
var callBound = require('call-bind/callBound');
var $split = callBind.apply(String.prototype.split);
var $split = callBound('String.prototype.split');
module.exports = function split() {
// var O = ToObject(this);
return $split(this, arguments);
/*
* [bugfix, chrome, node 0.8]
* If separator is undefined, then the result array contains just one String,
* which is the this value (converted to a String). If limit is not undefined,
* then the output array is truncated so that it contains no more than limit
* elements.
* "0".split(undefined, 0) -> []
*/
module.exports = function split(separator, limit) {
if (typeof separator === 'undefined' && limit === 0) {
return [];
}
return $split(this, separator, limit);
};
{
"name": "string.prototype.split",
"version": "1.0.2",
"version": "1.0.3",
"description": "An ES spec-compliant `String.prototype.split` shim/polyfill/replacement that works as far down as ES3",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -23,3 +23,3 @@ 'use strict';

/*
* [bugfix, chrome]
* [bugfix, chrome, node 0.8]
* If separator is undefined, then the result array contains just one String,

@@ -32,4 +32,3 @@ * which is the this value (converted to a String). If limit is not undefined,

if ('0'.split(void 0, 0).length) {
// eslint-disable-next-line global-require
return require('./implementation-undefined-separator');
return implementation;
}

@@ -36,0 +35,0 @@

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