Socket
Socket
Sign inDemoInstall

numcodecs

Package Overview
Dependencies
1
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.13 to 0.0.14

dist/blosc.cjs

20

package.json
{
"name": "numcodecs",
"author": "Trevor James Manz",
"version": "0.0.13",
"version": "0.0.14",
"description": "Buffer compression and transformation codecs for use in data storage and communication applications.",
"main": "dist/index.cjs",
"module": "dist/index.js",
"module": "dist/index.mjs",
"exports": {
".": {
"browser": "./dist/index.js",
"import": "./dist/index.mjs",

@@ -15,4 +14,2 @@ "require": "./dist/index.cjs"

"./gzip": {
"browser": "./dist/gzip.js",
"umd": "./dist/gzip.umd.js",
"import": "./dist/gzip.mjs",

@@ -22,6 +19,8 @@ "require": "./dist/gzip.cjs"

"./zlib": {
"browser": "./dist/zlib.js",
"umd": "./dist/zlib.umd.js",
"import": "./dist/zlib.mjs",
"require": "./dist/zlib.cjs"
},
"./blosc": {
"import": "./dist/blosc.mjs",
"require": "./dist/blosc.cjs"
}

@@ -69,3 +68,3 @@ },

"tslib": "^1.11.1",
"typescript": "^3.8.3"
"typescript": "^3.9.2"
},

@@ -81,3 +80,6 @@ "prettier": {

"src/**/{!(types|errors|index),}.ts"
]
],
"transform": {
"\\.(ts|js)$": "ts-jest"
}
},

@@ -84,0 +86,0 @@ "dependencies": {

@@ -6,17 +6,19 @@ # numcodecs

Some experiments with Node.js 14.1 [module exports](https://nodejs.org/api/modules.html).
Some experiments with Node.js 14.1 [package exports](https://nodejs.org/api/modules.html).
```javascript
const { config } = { id: 'gzip', level: 1 };
// Rollup & webpack don't have great support for exports so the easiest
// way to import from the main (since the lib is completely tree shakeable)
import { GZip } from 'numcodecs';
// Loading
import { registry } from 'numcodecs';
const GZip = await registry.get(config.id)();
// Node 14 conditional exports
// or
// index.mjs
import { GZip } from 'numcodecs';
import GZip from 'numcodecs/gzip';
// or
const { default: GZip } = await import("https://cdn.pika.dev/numcodecs/^0.0.12/gzip");
// index.js
const GZip = require('numcodecs').GZip;
const GZip = require('numcodecs/gzip');
const codec = GZip.fromConfig(config); // or new GZip(1)
const codec = GZip.fromConfig({ level: 1 }); // or new GZip(1);

@@ -23,0 +25,0 @@ // Usage

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc