Comparing version 1.1.2 to 2.0.0
{ | ||
"name": "swap-case", | ||
"version": "1.1.2", | ||
"description": "Swap the case of a string", | ||
"main": "swap-case.js", | ||
"typings": "swap-case.d.ts", | ||
"version": "2.0.0", | ||
"description": "Transform a string by swapping every character from upper to lower case, or lower to upper case", | ||
"main": "dist/index.js", | ||
"typings": "dist/index.d.ts", | ||
"module": "dist.es2015/index.js", | ||
"sideEffects": false, | ||
"jsnext:main": "dist.es2015/index.js", | ||
"files": [ | ||
"swap-case.js", | ||
"swap-case.d.ts", | ||
"dist/", | ||
"dist.es2015/", | ||
"LICENSE" | ||
], | ||
"scripts": { | ||
"lint": "standard", | ||
"test-std": "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/swap-case.git" | ||
"url": "git://github.com/blakeembrey/change-case.git" | ||
}, | ||
@@ -25,4 +30,7 @@ "keywords": [ | ||
"case", | ||
"reverse", | ||
"switch" | ||
"invert", | ||
"convert", | ||
"transform", | ||
"lower", | ||
"upper" | ||
], | ||
@@ -36,15 +44,44 @@ "author": { | ||
"bugs": { | ||
"url": "https://github.com/blakeembrey/swap-case/issues" | ||
"url": "https://github.com/blakeembrey/change-case/issues" | ||
}, | ||
"homepage": "https://github.com/blakeembrey/swap-case", | ||
"homepage": "https://github.com/blakeembrey/change-case/tree/master/packages/swap-case#readme", | ||
"size-limit": [ | ||
{ | ||
"path": "dist/index.js", | ||
"limit": "100 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" | ||
}, | ||
"devDependencies": { | ||
"istanbul": "^0.3.0", | ||
"mocha": "^2.2.1", | ||
"pre-commit": "^1.0.6", | ||
"standard": "^3.3.0" | ||
"@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": { | ||
"lower-case": "^1.1.1", | ||
"upper-case": "^1.1.1" | ||
} | ||
"gitHead": "55911ca17c2e0c964b9b84143e14e29ffc9ff499" | ||
} |
@@ -5,9 +5,6 @@ # Swap 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] | ||
Swap the case of a string. | ||
> Transform a string by swapping every character from upper to lower case, or lower to upper case. | ||
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,17 +18,10 @@ | ||
```javascript | ||
var swapCase = require('swap-case') | ||
```js | ||
import { swapCase } from "swap-case"; | ||
swapCase(null) //=> "" | ||
swapCase('string') //=> "STRING" | ||
swapCase('PascalCase') //=> "pASCALcASE" | ||
swapCase('Iñtërnâtiônàlizætiøn') //=> "iÑTËRNÂTIÔNÀLIZÆTIØN" | ||
swapCase('My String', 'tr') //=> "mY sTRİNG" | ||
swapCase("string"); //=> "STRING" | ||
swapCase("dot.case"); //=> "DOT.CASE" | ||
swapCase("PascalCase"); //=> "pASCALcASE" | ||
``` | ||
## Typings | ||
Includes a [TypeScript definition](swap-case.d.ts). | ||
## License | ||
@@ -45,5 +35,3 @@ | ||
[downloads-url]: https://npmjs.org/package/swap-case | ||
[travis-image]: https://img.shields.io/travis/blakeembrey/swap-case.svg?style=flat | ||
[travis-url]: https://travis-ci.org/blakeembrey/swap-case | ||
[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/swap-case.svg?style=flat | ||
[coveralls-url]: https://coveralls.io/r/blakeembrey/swap-case?branch=master | ||
[bundlephobia-image]: https://img.shields.io/bundlephobia/minzip/swap-case.svg | ||
[bundlephobia-url]: https://bundlephobia.com/result?p=swap-case |
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
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
9505
0
15
57
0
0
10
35
- Removedlower-case@^1.1.1
- Removedupper-case@^1.1.1
- Removedlower-case@1.1.4(transitive)
- Removedupper-case@1.1.3(transitive)