-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
37 lines (37 loc) · 2.08 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
"name": "caseless",
"version": "0.9.0",
"description": "Caseless object set/get/has, very useful when working with HTTP headers.",
"main": "index.js",
"scripts": {
"test": "node test.js"
},
"repository": {
"type": "git",
"url": "https://github.com/mikeal/caseless"
},
"keywords": [
"headers",
"http",
"caseless"
],
"test": "node test.js",
"author": {
"name": "Mikeal Rogers",
"email": "mikeal.rogers@gmail.com"
},
"license": "BSD",
"bugs": {
"url": "https://github.com/mikeal/caseless/issues"
},
"devDependencies": {
"tape": "^2.10.2"
},
"readme": "## Caseless -- wrap an object to set and get property with caseless semantics but also preserve caseing.\n\nThis library is incredibly useful when working with HTTP headers. It allows you to get/set/check for headers in a caseless manner while also preserving the caseing of headers the first time they are set.\n\n## Usage\n\n```javascript\nvar headers = {}\n , c = caseless(headers)\n ;\nc.set('a-Header', 'asdf')\nc.get('a-header') === 'asdf'\n```\n\n## has(key)\n\nHas takes a name and if it finds a matching header will return that header name with the preserved caseing it was set with.\n\n```javascript\nc.has('a-header') === 'a-Header'\n```\n\n## set(key, value[, clobber=true])\n\nSet is fairly straight forward except that if the header exists and clobber is disabled it will add `','+value` to the existing header.\n\n```javascript\nc.set('a-Header', 'fdas')\nc.set('a-HEADER', 'more', false)\nc.get('a-header') === 'fdsa,more'\n```\n\n## swap(key)\n\nSwaps the casing of a header with the new one that is passed in.\n\n```javascript\nvar headers = {}\n , c = caseless(headers)\n ;\nc.set('a-Header', 'fdas')\nc.swap('a-HEADER')\nc.has('a-header') === 'a-HEADER'\nheaders === {'a-HEADER': 'fdas'}\n```\n",
"readmeFilename": "README.md",
"homepage": "https://github.com/mikeal/caseless",
"_id": "caseless@0.9.0",
"_shasum": "b7b65ce6bf1413886539cfd533f0b30effa9cf88",
"_from": "caseless@>=0.9.0 <0.10.0",
"_resolved": "https://registry.npmjs.org/caseless/-/caseless-0.9.0.tgz"
}