header-case
Advanced tools
Comparing version 1.0.1 to 2.0.0
{ | ||
"name": "header-case", | ||
"version": "1.0.1", | ||
"description": "Header case a string", | ||
"main": "header-case.js", | ||
"typings": "header-case.d.ts", | ||
"version": "2.0.0", | ||
"description": "Transform into a dash separated string of capitalized words", | ||
"main": "dist/index.js", | ||
"typings": "dist/index.d.ts", | ||
"module": "dist.es2015/index.js", | ||
"sideEffects": false, | ||
"jsnext:main": "dist.es2015/index.js", | ||
"files": [ | ||
"header-case.js", | ||
"header-case.d.ts", | ||
"dist/", | ||
"dist.es2015/", | ||
"LICENSE" | ||
], | ||
"scripts": { | ||
"lint": "standard", | ||
"test-spec": "mocha -- -R spec --bail", | ||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- -R spec --bail", | ||
"test": "npm run lint && npm run test-cov" | ||
"lint": "tslint \"src/**/*\" --project tsconfig.json", | ||
"build": "rimraf dist/ dist.es2015/ && tsc && tsc -P tsconfig.es2015.json", | ||
"specs": "jest --coverage", | ||
"test": "npm run build && npm run lint && npm run specs && npm run size", | ||
"size": "size-limit", | ||
"prepare": "npm run build" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/blakeembrey/header-case.git" | ||
"url": "git://github.com/blakeembrey/change-case.git" | ||
}, | ||
@@ -25,4 +30,7 @@ "keywords": [ | ||
"case", | ||
"upper", | ||
"http" | ||
"dash", | ||
"hyphen", | ||
"capitalize", | ||
"convert", | ||
"transform" | ||
], | ||
@@ -36,14 +44,47 @@ "author": { | ||
"bugs": { | ||
"url": "https://github.com/blakeembrey/header-case/issues" | ||
"url": "https://github.com/blakeembrey/change-case/issues" | ||
}, | ||
"homepage": "https://github.com/blakeembrey/header-case", | ||
"homepage": "https://github.com/blakeembrey/change-case/tree/master/packages/header-case#readme", | ||
"size-limit": [ | ||
{ | ||
"path": "dist/index.js", | ||
"limit": "400 B" | ||
} | ||
], | ||
"jest": { | ||
"roots": [ | ||
"<rootDir>/src/" | ||
], | ||
"transform": { | ||
"\\.tsx?$": "ts-jest" | ||
}, | ||
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$", | ||
"moduleFileExtensions": [ | ||
"ts", | ||
"tsx", | ||
"js", | ||
"jsx", | ||
"json", | ||
"node" | ||
] | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"dependencies": { | ||
"capital-case": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"istanbul": "^0.4.3", | ||
"mocha": "^3.0.0", | ||
"standard": "^9.0.1" | ||
"@size-limit/preset-small-lib": "^2.2.1", | ||
"@types/jest": "^24.0.23", | ||
"@types/node": "^12.12.14", | ||
"jest": "^24.9.0", | ||
"rimraf": "^3.0.0", | ||
"ts-jest": "^24.2.0", | ||
"tslint": "^5.20.1", | ||
"tslint-config-prettier": "^1.18.0", | ||
"tslint-config-standard": "^9.0.0", | ||
"typescript": "^3.7.2" | ||
}, | ||
"dependencies": { | ||
"no-case": "^2.2.0", | ||
"upper-case": "^1.1.3" | ||
} | ||
"gitHead": "55911ca17c2e0c964b9b84143e14e29ffc9ff499" | ||
} |
@@ -5,9 +5,6 @@ # Header Case | ||
[![NPM downloads][downloads-image]][downloads-url] | ||
[![Build status][travis-image]][travis-url] | ||
[![Test coverage][coveralls-image]][coveralls-url] | ||
[![Bundle size][bundlephobia-image]][bundlephobia-url] | ||
Header case a string. | ||
> Transform into a dash separated string of capitalized words. | ||
Supports Unicode (non-ASCII characters) and non-string entities, such as objects with a `toString` property, numbers and booleans. Empty values (`null` and `undefined`) will result in an empty string. | ||
## Installation | ||
@@ -21,15 +18,11 @@ | ||
```javascript | ||
var headerCase = require('header-case') | ||
```js | ||
import { headerCase } from "header-case"; | ||
headerCase('string') //=> "String" | ||
headerCase('PascalCase') //=> "Pascal-Case" | ||
headerCase('MY_STRING', 'tr') //=> "My-Strıng" | ||
headerCase("string"); //=> "String" | ||
headerCase("dot.case"); //=> "Dot-Case" | ||
headerCase("PascalCase"); //=> "Pascal-Case" | ||
headerCase("version 1.2.10"); //=> "Version-1-2-10" | ||
``` | ||
## Typings | ||
Includes a [TypeScript definition](header-case.d.ts). | ||
## License | ||
@@ -43,5 +36,3 @@ | ||
[downloads-url]: https://npmjs.org/package/header-case | ||
[travis-image]: https://img.shields.io/travis/blakeembrey/header-case.svg?style=flat | ||
[travis-url]: https://travis-ci.org/blakeembrey/header-case | ||
[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/header-case.svg?style=flat | ||
[coveralls-url]: https://coveralls.io/r/blakeembrey/header-case?branch=master | ||
[bundlephobia-image]: https://img.shields.io/bundlephobia/minzip/header-case.svg | ||
[bundlephobia-url]: https://bundlephobia.com/result?p=header-case |
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
9480
1
15
55
0
10
36
+ Addedcapital-case@^1.0.0
+ Addedcapital-case@1.0.4(transitive)
+ Addedlower-case@2.0.2(transitive)
+ Addedno-case@3.0.4(transitive)
+ Addedtslib@2.8.1(transitive)
+ Addedupper-case-first@2.0.2(transitive)
- Removedno-case@^2.2.0
- Removedupper-case@^1.1.3
- Removedlower-case@1.1.4(transitive)
- Removedno-case@2.3.2(transitive)
- Removedupper-case@1.1.3(transitive)