JSPM

arraybuffer.prototype.detached

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11
  • Score
    100M100P100Q47639F
  • License MIT

ES Proposal spec-compliant shim for ArrayBuffer.prototype.detached

Package Exports

  • arraybuffer.prototype.detached
  • arraybuffer.prototype.detached/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (arraybuffer.prototype.detached) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ArrayBuffer.prototype.detached Version Badge

Build Status License Downloads

npm badge

browser support

An ES6 spec-compliant ArrayBuffer.prototype.detached shim. Invoke its "shim" method to shim ArrayBuffer.prototype.detached if it is unavailable. Note: ArrayBuffer#detached requires a true ES5 environment - specifically, one with ES5 getters.

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

Most common usage:

var detached = require('arraybuffer.prototype.detached');

assert(detached(new ArrayBuffer('a') === false);

if (!ArrayBuffer.prototype.detached) {
    detached.shim();
}

assert(new ArrayBuffer('a').detached, false);

Tests

Simply clone the repo, npm install, and run npm test