
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
A robust & optimized ES3-compatible polyfill for the `String.prototype.at` proposal for ECMAScript 6/7 - based on https://mths.be/at
A robust & optimized ES3-compatible polyfill for the String.prototype.at
proposal for ECMAScript 6/7.
This code is almost entirely copied from @mathiasbynens's excellent polyfill at https://mths.be/at - I created this one so that it did not automatically modify String.prototype
, and so that it would fit in more neatly with the es7-shim
.
Use it as a standalone function, or call its shim
method to install it as a polyfill.
var at = require('string-at');
var assert = require('assert');
var surrogatePair = '\uD834\uDF06 abc'; // a surrogate pair
assert(surrogatePair.length === 6);
assert(at(surrogatePair, 0) === '\uD834\uDF06');
assert(at(surrogatePair, 1) === '\uDF06');
var i = 0;
var str = '';
while (str.length < surrogatePair.length) {
str += at(surrogatePair, str.length);
i += 1;
}
assert(str === surrogatePair);
assert(i === 4); // 4 code points
assert(str.length === 6); // 6 "characters"
at.shim();
assert(surrogatePair.at(0) === at(surrogatePair, 0));
Simply clone the repo, npm install
, and run npm test
v1.1.0 - 2019-12-19
cb8740c
define-properties
, tape
, eslint
, semver
, es5-shim
; use my personal shared eslint
config. 4c0b886
jscs
d47b0ea
node
v8.2
, v7.10
, v6.11
, v4.8
; newer npm breaks on older node; improve matrix 44e9dc3
46aa4a2
node
v11.6
, v10.15
, v8.15
, v6.16
30532b9
node
v9.2
; v8.9
; v6.12
; use nvm install-latest-npm
; pin included builds to LTS. 226999c
tape
, jscs
, nsp
, eslint
, @ljharb/eslint-config
, semver
, es5-shim
, es6-shim
c31b8b0
auto-changelog
c5fc05e
node
v12.7
, v11.15
, v10.16
, v8.16
, v6.17
; use nvm install-latest-npm
d4444bb
node
v10.0
, v9.11
, v8.11
, v6.14
, v4.9
b69db22
es-abstract
, jscs
, eslint
, @ljharb/eslint-config
, es6-shim
3839e7d
nsp
, eslint
, es5-shim
, es6-shim
fa89f64
node
v7.2
, v6.9
, v4.6
; improve test matrix; allow coverage to fail. 6bb9230
@es-shims/api
, @ljharb/eslint-config
, eslint
, nsp
, tape
, semver
ca95176
eslint
, @ljharb/eslint-config
, replace
b994ee8
node
v5.6
, v4.3
ec9187e
tape
, jscs
, eslint
, @ljharb/eslint-config
, es5-shim
, es6-shim
7597246
define-properties
, eslint
, semver
, es5-shim
, es6-shim
c147b44
jscs
, eslint
, @ljharb/eslint-config
a46f365
tape
, jscs
, nsp
, eslint
, @ljharb/eslint-config
5fe26c7
jscs
, nsp
, eslint
, es5-shim
20ee134
es-abstract
(78% bundle size decrease) f01bb1e
eslint
, @ljharb/eslint-config
, covert
, replace
, semver
, tape
, es5-shim
, es6-shim
32c06c2
tape
, jscs
, nsp
, eslint
, @ljharb/eslint-config
, semver
7e6eeec
jscs
, eslint
, @ljharb/eslint-config
, es5-shim
, es6-shim
5433d98
86cb327
jscs
, nsp
, eslint
, @ljharb/eslint-config
, es5-shim
, es6-shim
b4e41b5
jscs
, eslint
, @ljharb/eslint-config
dbe9284
jscs
, nsp
, eslint
, @ljharb/eslint-config
, semver
, es5-shim
, es6-shim
e25e94c
ab0891c
es5-shim
, es6-shim
, eslint
, replace
, semver
, tape
ef73bb8
tape
, jscs
, nsp
, eslint
, @ljharb/eslint-config
, semver
00ac6fe
@es-shims/api
, es5-shim
, eslint
, nsp
, semver
, tape
284e78c
io.js
v3.3
, node
v4.1
c7d5cc7
eslint
, @ljharb/eslint-config
, functions-have-names
, tape
001bdf1
node
v12.11
658bd56
npm audit
instead of nsp
3cda4df
nsp
, eslint
, @ljharb/eslint-config
, es6-shim
6655a7c
pretest
/posttest
b6e180f
node
v5.9
, v4.4
2519b15
jscs
954e885
io.js
v2.2
e56a178
npx aud
instead of nsp
or npm audit
with hoops e75464e
node
v6.2
24cbf33
eslint
, @ljharb/eslint-config
, nsp
e48cfb1
62754a7
tape
, eslint
, @ljharb/eslint-config
bcb53c6
bd09780
eslint
, @ljharb/eslint-config
8e1b5e8
node
v12.8
62b166d
semver
, tape
aa12572
eclint
instead of editorconfig-tools
d09a00f
define-properties
, es-abstract
da9ce3d
@es-shims/api
, replace
0361c7e
node
v10.1
abe2801
es-abstract
, function-bind
8ca4a62
es-abstract
, function-bind
ce5560b
define-properties
, es-abstract
f7392c2
tape
, eslint
e831ec8
funding
field 16721ed
functions-have-names
12e5b3c
auto
entry point 7c46663
es-abstract
7fe28a4
semver
608f43c
es-abstract
d63023b
es-abstract
4f71450
es-abstract
ebd0b7e
node
v5.12
adcd99d
es-abstract
9b80bca
node
v5.10
5896da7
node
v5.7
b630576
node
v4.2
ecf605a
es-abstract
9712990
es-abstract
0979ce2
tape
fad1430
tape
92b7c87
0f00781
tape
789827e
io.js
v2.5
01e0b96
io.js
v2.4
6be715a
io.js
v2.3
fc92e06
io.js
v3.0
ab286c0
FAQs
A robust & optimized ES3-compatible polyfill for the `String.prototype.at` proposal for ECMAScript 6/7 - based on https://mths.be/at
The npm package string-at receives a total of 31,305 weekly downloads. As such, string-at popularity was classified as popular.
We found that string-at demonstrated a not healthy version release cadence and project activity because the last version was released 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
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.