Skip to content

Commit 1df6f5b

Browse files
committed
.
0 parents  commit 1df6f5b

File tree

12 files changed

+8840
-0
lines changed

12 files changed

+8840
-0
lines changed

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_size = 2
7+
indent_style = space
8+
end_of_line = lf
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true

.eslintrc.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
parser: "@typescript-eslint/parser",
3+
extends: [
4+
"plugin:@typescript-eslint/recommended",
5+
"prettier/@typescript-eslint",
6+
"plugin:prettier/recommended"
7+
],
8+
parserOptions: {
9+
ecmaVersion: 2018,
10+
sourceType: "module"
11+
}
12+
};

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
coverage/
3+
.DS_Store
4+
npm-debug.log
5+
dist/
6+
dist.es2015/

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
language: node_js
2+
3+
notifications:
4+
email:
5+
on_success: never
6+
on_failure: change
7+
8+
node_js:
9+
- "10"
10+
- stable
11+
12+
after_script:
13+
- npm install coveralls@2
14+
- cat ./coverage/lcov.info | coveralls

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2020 Blake Embrey ([email protected])
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Parse Authorization
2+
3+
[![NPM version][npm-image]][npm-url]
4+
[![NPM downloads][downloads-image]][downloads-url]
5+
[![Build status][travis-image]][travis-url]
6+
[![Test coverage][coveralls-image]][coveralls-url]
7+
8+
> Parse the HTTP authorization header.
9+
10+
## Installation
11+
12+
```sh
13+
npm install @borderless/parse-authorization --save
14+
```
15+
16+
## Usage
17+
18+
```js
19+
import { basic, bearer } from "@borderless/parse-authorization";
20+
21+
expect(bearer("Bearer 123")).toEqual("123");
22+
expect(basic("Basic dGVzdDoxMjPCow==")).toEqual(["test", "123£"]);
23+
```
24+
25+
## TypeScript
26+
27+
This project is written using [TypeScript](https://github.com/Microsoft/TypeScript) and publishes the definitions directly to NPM.
28+
29+
## License
30+
31+
MIT
32+
33+
[npm-image]: https://img.shields.io/npm/v/@borderless/parse-authorization.svg?style=flat
34+
[npm-url]: https://npmjs.org/package/@borderless/parse-authorization
35+
[downloads-image]: https://img.shields.io/npm/dm/@borderless/parse-authorization.svg?style=flat
36+
[downloads-url]: https://npmjs.org/package/@borderless/parse-authorization
37+
[travis-image]: https://img.shields.io/travis/BorderlessLabs/parse-authorization.svg?style=flat
38+
[travis-url]: https://travis-ci.org/BorderlessLabs/parse-authorization
39+
[coveralls-image]: https://img.shields.io/coveralls/BorderlessLabs/parse-authorization.svg?style=flat
40+
[coveralls-url]: https://coveralls.io/r/BorderlessLabs/parse-authorization?branch=master

0 commit comments

Comments
 (0)