buffer-shims

WebJar for buffer-shims

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

buffer-shims
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

buffer-shims
WebJar for buffer-shims
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/calvinmetcalf/buffer-shims

Download buffer-shims

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/buffer-shims/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>buffer-shims</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/buffer-shims/
implementation 'org.webjars.npm:buffer-shims:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/buffer-shims/
implementation ("org.webjars.npm:buffer-shims:1.0.0")
'org.webjars.npm:buffer-shims:jar:1.0.0'
<dependency org="org.webjars.npm" name="buffer-shims" rev="1.0.0">
  <artifact name="buffer-shims" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='buffer-shims', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "buffer-shims" % "1.0.0"
[org.webjars.npm/buffer-shims "1.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

buffer-shims

functions to make sure the new buffer methods work in older browsers.

var bufferShim = require('buffer-shims');
bufferShim.from('foo');
bufferShim.alloc(9, 'cafeface', 'hex');
bufferShim.allocUnsafe(15);
bufferShim.allocUnsafeSlow(21);

should just use the original in newer nodes and on older nodes uses fallbacks.

Known Issues

  • this does not patch the buffer object, only the constructor stuff
  • it's actually a polyfill

Versions

Version
1.0.0