{"_id":"string-at","_rev":"88474","name":"string-at","description":"A robust & optimized ES3-compatible polyfill for the `String.prototype.at` proposal for ECMAScript 6/7 - based on https://mths.be/at","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"ljharb","email":""}],"time":{"modified":"2021-06-03T10:28:45.000Z","created":"2015-03-20T10:38:16.839Z","1.1.0":"2019-12-19T05:56:20.648Z","1.0.1":"2015-05-23T23:57:34.261Z","1.0.0":"2015-03-20T10:38:16.839Z"},"users":{},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com","url":"http://ljharb.codes"},"repository":{"type":"git","url":"git://github.com/ljharb/string-at.git"},"versions":{"1.1.0":{"name":"string-at","version":"1.1.0","author":{"name":"Jordan Harband","email":"ljharb@gmail.com","url":"http://ljharb.codes"},"funding":{"url":"https://github.com/sponsors/ljharb"},"contributors":[{"name":"Jordan Harband","email":"ljharb@gmail.com","url":"http://ljharb.codes"}],"description":"A robust & optimized ES3-compatible polyfill for the `String.prototype.at` proposal for ECMAScript 6/7 - based on https://mths.be/at","license":"MIT","main":"index.js","scripts":{"pretest":"npm run lint","test":"npm run tests-only","posttest":"npx aud","tests-only":"npm run --silent test:shimmed && npm run --silent test:module","test:shimmed":"node --harmony --es-staging test/shimmed.js","test:module":"node --harmony --es-staging test/index.js","coverage":"covert test/*.js","lint":"eslint .","eccheck":"eclint check *.js **/*.js > /dev/null","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git://github.com/ljharb/string-at.git"},"keywords":["String","string","unicode","ES6","ES7","ecmascript","polyfill","code point","at"],"dependencies":{"define-properties":"^1.1.3","es-abstract":"^1.17.0-next.1"},"devDependencies":{"@es-shims/api":"^2.1.2","@ljharb/eslint-config":"^15.0.2","auto-changelog":"^1.16.2","covert":"^1.1.1","eclint":"^2.8.1","es5-shim":"^4.5.13","es6-shim":"^0.35.5","eslint":"^6.7.2","functions-have-names":"^1.2.0","tape":"^4.12.0"},"testling":{"files":"test.js","browsers":["iexplore/6.0..latest","firefox/3.0..6.0","firefox/15.0..latest","firefox/nightly","chrome/4.0..10.0","chrome/20.0..latest","chrome/canary","opera/10.0..latest","opera/next","safari/4.0..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2"]},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false},"gitHead":"6acf0f732893264df92eaaabb3fb9ec3e329ad57","bugs":{"url":"https://github.com/ljharb/string-at/issues"},"homepage":"https://github.com/ljharb/string-at#readme","_id":"string-at@1.1.0","_nodeVersion":"13.4.0","_npmVersion":"6.13.4","dist":{"shasum":"332e090c5724418266a27a09394924b9fad41275","size":9347,"noattachment":false,"key":"/string-at/-/string-at-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/string-at/download/string-at-1.1.0.tgz"},"maintainers":[{"name":"ljharb","email":""}],"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/string-at_1.1.0_1576734980486_0.5806393414224744"},"_hasShrinkwrap":false,"publish_time":1576734980648,"_cnpm_publish_time":1576734980648,"deprecated":"The original `String.prototype.at` proposal has been replaced by a new one; please use v1 or later of `string.prototype.at` instead"},"1.0.1":{"name":"string-at","version":"1.0.1","author":{"name":"Jordan Harband"},"description":"A robust & optimized ES3-compatible polyfill for the `String.prototype.at` proposal for ECMAScript 6/7 - based on https://mths.be/at","license":"MIT","main":"index.js","scripts":{"test":"npm run lint && npm run test:shimmed && npm run test:module && npm run security","test:shimmed":"node --harmony --es-staging test/shimmed.js","test:module":"node --harmony --es-staging test/index.js","coverage":"covert test/*.js","coverage-quiet":"covert test/*.js --quiet","lint":"npm run jscs && npm run eslint","jscs":"jscs test/*.js *.js","eslint":"eslint test/*.js *.js","eccheck":"editorconfig-tools check *.js **/*.js > /dev/null","security":"nsp package"},"repository":{"type":"git","url":"git://github.com/ljharb/string-at.git"},"keywords":["String","string","unicode","ES6","ES7","ecmascript","polyfill","code point","at"],"dependencies":{"define-properties":"^1.0.1","es-abstract":"^1.2.1","function-bind":"^1.0.2"},"devDependencies":{"tape":"^4.0.0","covert":"^1.1.0","jscs":"^1.13.1","editorconfig-tools":"^0.1.1","nsp":"^1.0.1","eslint":"^0.21.2","semver":"^4.3.4","replace":"^0.3.0","es5-shim":"^4.1.3","es6-shim":"^0.31.2"},"testling":{"files":"test.js","browsers":["iexplore/6.0..latest","firefox/3.0..6.0","firefox/15.0..latest","firefox/nightly","chrome/4.0..10.0","chrome/20.0..latest","chrome/canary","opera/10.0..latest","opera/next","safari/4.0..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2"]},"engines":{"node":">= 0.4"},"gitHead":"a719773dd46d3b8105702e60aaa9138fc596c149","bugs":{"url":"https://github.com/ljharb/string-at/issues"},"homepage":"https://github.com/ljharb/string-at#readme","_id":"string-at@1.0.1","_shasum":"73b755adbaac3e178dabe7e4d7d79de56003fb37","_from":".","_npmVersion":"2.9.0","_nodeVersion":"2.0.2","_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"dist":{"shasum":"73b755adbaac3e178dabe7e4d7d79de56003fb37","size":8783,"noattachment":false,"key":"/string-at/-/string-at-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/string-at/download/string-at-1.0.1.tgz"},"maintainers":[{"name":"ljharb","email":""}],"directories":{},"publish_time":1432425454261,"_cnpm_publish_time":1432425454261,"_hasShrinkwrap":false,"deprecated":"The original `String.prototype.at` proposal has been replaced by a new one; please use v1 or later of `string.prototype.at` instead"},"1.0.0":{"name":"string-at","version":"1.0.0","author":{"name":"Jordan Harband"},"description":"A robust & optimized ES3-compatible polyfill for the `String.prototype.at` proposal for ECMAScript 6/7 - based on https://mths.be/at","license":"MIT","main":"index.js","scripts":{"test":"npm run lint && npm run test:shimmed && npm run test:module && npm run security","test:shimmed":"node --harmony --es-staging test/shimmed.js","test:module":"node --harmony --es-staging test/index.js","coverage":"covert test/*.js","coverage-quiet":"covert test/*.js --quiet","lint":"npm run jscs && npm run eslint","jscs":"jscs test/*.js *.js","eslint":"eslint test/*.js *.js","eccheck":"editorconfig-tools check *.js **/*.js > /dev/null","security":"nsp package"},"repository":{"type":"git","url":"git://github.com/ljharb/string-at.git"},"keywords":["String","string","unicode","ES6","ES7","ecmascript","polyfill","code point","at"],"dependencies":{"define-properties":"^1.0.1","es-abstract":"^1.2.0","function-bind":"^1.0.2"},"devDependencies":{"tape":"^3.5.0","covert":"^1.0.1","jscs":"^1.11.3","editorconfig-tools":"^0.1.1","nsp":"^1.0.1","eslint":"^0.17.1","semver":"^4.3.1","replace":"^0.3.0","es5-shim":"^4.1.0","es6-shim":"^0.27.1"},"testling":{"files":"test.js","browsers":["iexplore/6.0..latest","firefox/3.0..6.0","firefox/15.0..latest","firefox/nightly","chrome/4.0..10.0","chrome/20.0..latest","chrome/canary","opera/10.0..latest","opera/next","safari/4.0..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2"]},"engines":{"node":">= 0.4"},"gitHead":"792163009976b8dab58d5d77c9a221012f45e39a","bugs":{"url":"https://github.com/ljharb/string-at/issues"},"homepage":"https://github.com/ljharb/string-at","_id":"string-at@1.0.0","_shasum":"330401c56abfde24b2076b71da6b3788af2f788c","_from":".","_npmVersion":"2.7.1","_nodeVersion":"1.6.1","_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"maintainers":[{"name":"ljharb","email":""}],"dist":{"shasum":"330401c56abfde24b2076b71da6b3788af2f788c","size":8403,"noattachment":false,"key":"/string-at/-/string-at-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/string-at/download/string-at-1.0.0.tgz"},"directories":{},"publish_time":1426847896839,"_cnpm_publish_time":1426847896839,"_hasShrinkwrap":false,"deprecated":"The original `String.prototype.at` proposal has been replaced by a new one; please use v1 or later of `string.prototype.at` instead"}},"readme":"# string-at <sup>[![Version Badge][2]][1]</sup>\n\n[![Build Status][3]][4]\n[![dependency status][5]][6]\n[![dev dependency status][7]][8]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][11]][1]\n\n[![browser support][9]][10]\n\nA robust & optimized ES3-compatible polyfill for [the `String.prototype.at` proposal for ECMAScript 6/7](http://esdiscuss.org/topic/string-prototype-symbolat-improved-string-prototype-charat).\n\nThis 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`.\n\nUse it as a standalone function, or call its `shim` method to install it as a polyfill.\n\n## Example\n\n```js\nvar at = require('string-at');\nvar assert = require('assert');\n\nvar surrogatePair = '\\uD834\\uDF06 abc'; // a surrogate pair\nassert(surrogatePair.length === 6);\nassert(at(surrogatePair, 0) === '\\uD834\\uDF06');\nassert(at(surrogatePair, 1) === '\\uDF06');\n\nvar i = 0;\nvar str = '';\nwhile (str.length < surrogatePair.length) {\n\tstr += at(surrogatePair, str.length);\n\ti += 1;\n}\nassert(str === surrogatePair);\nassert(i === 4); // 4 code points\nassert(str.length === 6); // 6 \"characters\"\n\nat.shim();\nassert(surrogatePair.at(0) === at(surrogatePair, 0));\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[1]: https://npmjs.org/package/string-at\n[2]: http://versionbadg.es/ljharb/string-at.svg\n[3]: https://travis-ci.org/ljharb/string-at.svg\n[4]: https://travis-ci.org/ljharb/string-at\n[5]: https://david-dm.org/ljharb/string-at.svg\n[6]: https://david-dm.org/ljharb/string-at\n[7]: https://david-dm.org/ljharb/string-at/dev-status.svg\n[8]: https://david-dm.org/ljharb/string-at#info=devDependencies\n[9]: https://ci.testling.com/ljharb/string-at.png\n[10]: https://ci.testling.com/ljharb/string-at\n[11]: https://nodei.co/npm/string-at.png?downloads=true&stars=true\n[license-image]: http://img.shields.io/npm/l/string-at.svg\n[license-url]: LICENSE\n[downloads-image]: http://img.shields.io/npm/dm/string-at.svg\n[downloads-url]: http://npm-stat.com/charts.html?package=string-at\n","_attachments":{},"homepage":"https://github.com/ljharb/string-at#readme","bugs":{"url":"https://github.com/ljharb/string-at/issues"},"license":"MIT"}