File tree Expand file tree Collapse file tree 6 files changed +20
-19
lines changed Expand file tree Collapse file tree 6 files changed +20
-19
lines changed Original file line number Diff line number Diff line change 22[ @codec-bytes/error ] ( https://codec-bytes.github.io/error )
33==
44
5- Codecs for JavaScript.
5+ Codec errors for JavaScript.
66See [ docs] ( https://codec-bytes.github.io/error/index.html ) .
77
88[ ![ License] ( https://img.shields.io/github/license/codec-bytes/error.svg )] ( https://raw.githubusercontent.com/codec-bytes/error/main/LICENSE )
Original file line number Diff line number Diff line change 1- # Example
1+ # Examples
2+
3+ > More examples in [ the test files] ( https://github.com/codec-bytes/error/tree/main/test/src ) .
Original file line number Diff line number Diff line change 11# Installation
22
33Can be managed using
4- [ jspm] ( http://jspm.io )
5- or [ npm] ( https://github.com/npm/npm ) .
4+ [ yarn] ( https://yarnpkg.com/en/docs ) ,
5+ [ npm] ( https://docs.npmjs.com ) ,
6+ or [ jspm] ( https://jspm.org/docs ) .
67
7- ### jspm
8+
9+ ### yarn
810``` terminal
9- jspm install npm: @codec-bytes/error
11+ yarn add @codec-bytes/error
1012```
1113
1214### npm
1315``` terminal
1416npm install @codec-bytes/error --save
1517```
18+
19+ ### jspm
20+ ``` terminal
21+ jspm install npm:@codec-bytes/error
22+ ```
Original file line number Diff line number Diff line change 11# Usage
22
3- The code needs a ES2015+ polyfill to work, for example
4- [ regenerator-runtime/runtime] ( https://babeljs.io/docs/usage/polyfill ) .
3+ Import the library where needed
54``` js
6- await import ( ' regenerator-runtime/runtime.js ' ) ;
5+ const { EncodeError , DecodeError } = await import (' @codec-bytes/error ' ) ;
76// or
8- import ' regenerator-runtime/runtime.js' ;
9- ```
10-
11- Then
12- ``` js
13- const codec = await import ( ' @codec-bytes/error' ) ;
14- // or
15- import * as codec from ' @codec-bytes/error' ;
7+ import {EncodeError , DecodeError } from ' @codec-bytes/error' ;
168```
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const domReady = function (callback) {
1010domReady ( ( ) => {
1111 const projectname = document . createElement ( 'a' ) ;
1212 projectname . classList . add ( 'project-name' ) ;
13- projectname . text = 'codec-bytes/error' ;
13+ projectname . text = '@ codec-bytes/error' ;
1414 projectname . href = './index.html' ;
1515
1616 const header = document . querySelector ( 'header' ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " @codec-bytes/error" ,
3- "description" : " Codecs for JavaScript" ,
3+ "description" : " Codec errors for JavaScript" ,
44 "version" : " 4.0.0" ,
55 "license" : " AGPL-3.0" ,
66 "author" : " make-github-pseudonymous-again" ,
You can’t perform that action at this time.
0 commit comments