numcodecs
Advanced tools
Comparing version 0.0.13 to 0.0.14
{ | ||
"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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
3540314
17483
2
31
31
5