Code Monkey home page Code Monkey logo

string.prototype.codepointat's Introduction

ES6 String.prototype.codePointAt polyfill string.prototype.codepointat on npm

A robust & optimized polyfill for the String.prototype.codePointAt method in ECMAScript 6.

This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec.

Other polyfills for String.prototype.codePointAt are available:

Installation

Via npm:

npm install string.prototype.codepointat

Then, in Node.js:

require('string.prototype.codepointat');

// On Windows and on Mac systems with default settings, case doesn’t matter,
// which allows you to do this instead:
require('String.prototype.codePointAt');

In a browser:

<script src="https://bundle.run/string.prototype.codepointat"></script>

NOTE: It's recommended that you install this module using a package manager such as npm, because loading multiple polyfills from a CDN (such as bundle.run) will lead to duplicated code.

Notes

A polyfill + test suite for String.fromCodePoint is available, too.

For maintainers

How to publish a new release

  1. On the main branch, bump the version number in package.json:

    npm version patch -m 'Release v%s'

    Instead of patch, use minor or major as needed.

    Note that this produces a Git commit + tag.

  2. Push the release commit and tag:

    git push && git push --tags

    Our CI then automatically publishes the new release to npm.

Author

twitter/mathias
Mathias Bynens

License

This polyfill is available under the MIT license.

string.prototype.codepointat's People

Contributors

mathiasbynens avatar nicolo-ribaudo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

string.prototype.codepointat's Issues

Publish new version with updated license file?

The current release has a deprecated method of listing the license in the package.json, namely, a licenses property with an array of license objects. This has been updated in master but there hasn't been a new release since then; any change of getting a new version of this package with that license update in the package.json?

version that doesn't punch globals

This is really useful code but it punches the global String.prototype.codePointAt, which doesn't compose well (thrashing/breakage likely when multiple competing modules try to "fix" the same thing). Can we get a version of this that just does a module.exports= instead of mutating a global?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.