endianness
Advanced tools
Comparing version 6.0.0-alpha.3 to 6.0.0-alpha.4
{ | ||
"name": "endianness", | ||
"version": "6.0.0-alpha.3", | ||
"version": "6.0.0-alpha.4", | ||
"description": "Swap endianness in byte arrays.", | ||
@@ -24,3 +24,3 @@ "homepage": "https://github.com/rochars/endianness", | ||
"little-endian", | ||
"network order" | ||
"network-order" | ||
], | ||
@@ -36,10 +36,12 @@ "repository": { | ||
"lint": "jshint index.js && jshint test", | ||
"test": "node -r esm ./node_modules/mocha/bin/_mocha test --recursive", | ||
"test-min": "nyc ./node_modules/mocha/bin/_mocha test --min --recursive", | ||
"test-cjs": "nyc ./node_modules/mocha/bin/_mocha test --cjs --recursive", | ||
"test-umd": "nyc ./node_modules/mocha/bin/_mocha test --umd --recursive", | ||
"test": "node -r esm ./node_modules/mocha/bin/_mocha --recursive -R nyc -R min && npm run coverage-text", | ||
"test-min": "node ./node_modules/mocha/bin/_mocha test --min --recursive -R min", | ||
"test-cjs": "node ./node_modules/mocha/bin/_mocha test --cjs --recursive -R min", | ||
"test-umd": "node ./node_modules/mocha/bin/_mocha test --umd --recursive -R min", | ||
"test-dist": "npm run test-min && npm run test-cjs && npm run test-umd", | ||
"coverage": "nyc report --reporter=lcov > coverage.lcov && codecov", | ||
"pack": "npm test && webpack && npm run test-dist", | ||
"doc": "./node_modules/.bin/jsdoc index.js -d docs -r README.md -t node_modules/docdash", | ||
"pack": "npm test && webpack && npm run test-min && npm run test-cjs && npm run test-umd", | ||
"build": "npm run lint && npm run pack && npm run doc" | ||
"build": "npm run lint && npm run pack && npm run doc", | ||
"coverage-text": "nyc report --reporter text" | ||
}, | ||
@@ -55,7 +57,8 @@ "devDependencies": { | ||
"jshint": "^2.9.5", | ||
"mocha": "^3.5.3", | ||
"mocha": "^5.2.0", | ||
"mocha-lcov-reporter": "^1.3.0", | ||
"nyc": "^3.2.2", | ||
"webpack": "^3.8.0" | ||
} | ||
"webpack": "^3.12.0" | ||
}, | ||
"dependencies": {} | ||
} |
@@ -8,6 +8,7 @@ # endianness | ||
Swap endianness in byte arrays. The input array is modified in-place. | ||
Swap endianness in byte arrays. The input buffer is modified in-place. | ||
- Works in Node.js and in the browser | ||
- Works everywhere, server and browser | ||
- Works with any byte offset | ||
- Can swap only a part of the buffer | ||
@@ -68,2 +69,24 @@ ## Install | ||
## Distribution | ||
This library is implemented as a ES6 module and also distributed as a CommonJS module, UMD module and a compiled script for browsers. If your system does not pick one automatically for you, you can pick one in the **dist/** folder. | ||
- The CommonJS is the one used by Node. It is served in the "main" field of this library's package.json | ||
- The UMD module is compatible with Node, AMD and browsers. It is served in the "browser" field. | ||
- The compiled dist is browser-only and should be the one served by CDNs. | ||
- The "module" field points to "./index.js" and should be the default entry point. | ||
If you are using a module bundler to compile a module that depends on **endianness** you might need to specify what is the correct entry point as some bundlers will assume "browser". In general, you should point to "module". | ||
### webpack example: | ||
```javascript | ||
module.exports = { | ||
entry: './index.js', | ||
resolve: { | ||
// tells webpack to use 'module' or 'main' | ||
// not 'browser' | ||
mainFields: ['module', 'main'] | ||
}, | ||
... | ||
}; | ||
``` | ||
## LICENSE | ||
@@ -70,0 +93,0 @@ Copyright (c) 2017-2018 Rafael da Silva Rocha. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22343
111