Last change
on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
617 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | # code-point-at [![Build Status](https://travis-ci.org/sindresorhus/code-point-at.svg?branch=master)](https://travis-ci.org/sindresorhus/code-point-at)
|
---|
| 2 |
|
---|
| 3 | > ES2015 [`String#codePointAt()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt) [ponyfill](https://ponyfill.com)
|
---|
| 4 |
|
---|
| 5 |
|
---|
| 6 | ## Install
|
---|
| 7 |
|
---|
| 8 | ```
|
---|
| 9 | $ npm install --save code-point-at
|
---|
| 10 | ```
|
---|
| 11 |
|
---|
| 12 |
|
---|
| 13 | ## Usage
|
---|
| 14 |
|
---|
| 15 | ```js
|
---|
| 16 | var codePointAt = require('code-point-at');
|
---|
| 17 |
|
---|
| 18 | codePointAt('🐴');
|
---|
| 19 | //=> 128052
|
---|
| 20 |
|
---|
| 21 | codePointAt('abc', 2);
|
---|
| 22 | //=> 99
|
---|
| 23 | ```
|
---|
| 24 |
|
---|
| 25 | ## API
|
---|
| 26 |
|
---|
| 27 | ### codePointAt(input, [position])
|
---|
| 28 |
|
---|
| 29 |
|
---|
| 30 | ## License
|
---|
| 31 |
|
---|
| 32 | MIT © [Sindre Sorhus](https://sindresorhus.com)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.