constant-case
Advanced tools
Comparing version 3.0.4 to 4.0.0
import { Options } from "no-case"; | ||
export { Options }; | ||
export type { Options }; | ||
export declare function constantCase(input: string, options?: Options): string; |
@@ -1,12 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.constantCase = void 0; | ||
var tslib_1 = require("tslib"); | ||
var no_case_1 = require("no-case"); | ||
var upper_case_1 = require("upper-case"); | ||
function constantCase(input, options) { | ||
if (options === void 0) { options = {}; } | ||
return no_case_1.noCase(input, tslib_1.__assign({ delimiter: "_", transform: upper_case_1.upperCase }, options)); | ||
import { split, toUpper } from "no-case"; | ||
export function constantCase(input, options) { | ||
const upper = toUpper(options?.locale); | ||
return split(input, options).map(upper).join("_"); | ||
} | ||
exports.constantCase = constantCase; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "constant-case", | ||
"version": "3.0.4", | ||
"version": "4.0.0", | ||
"description": "Transform into upper case string with an underscore between words", | ||
"main": "dist/index.js", | ||
"typings": "dist/index.d.ts", | ||
"module": "dist.es2015/index.js", | ||
"sideEffects": false, | ||
"jsnext:main": "dist.es2015/index.js", | ||
"type": "module", | ||
"files": [ | ||
"dist/", | ||
"dist.es2015/", | ||
"LICENSE" | ||
"dist/" | ||
], | ||
"exports": { | ||
".": "./dist/index.js" | ||
}, | ||
"scripts": { | ||
"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", | ||
"size": "size-limit", | ||
"prepare": "npm run build" | ||
"format": "ts-scripts format", | ||
"specs": "ts-scripts specs", | ||
"test": "ts-scripts test", | ||
"build": "ts-scripts build", | ||
"bench": "vitest bench", | ||
"prepublishOnly": "npm run build" | ||
}, | ||
@@ -46,25 +43,2 @@ "repository": { | ||
"homepage": "https://github.com/blakeembrey/change-case/tree/master/packages/constant-case#readme", | ||
"size-limit": [ | ||
{ | ||
"path": "dist/index.js", | ||
"limit": "650 B" | ||
} | ||
], | ||
"jest": { | ||
"roots": [ | ||
"<rootDir>/src/" | ||
], | ||
"transform": { | ||
"\\.tsx?$": "ts-jest" | ||
}, | ||
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$", | ||
"moduleFileExtensions": [ | ||
"ts", | ||
"tsx", | ||
"js", | ||
"jsx", | ||
"json", | ||
"node" | ||
] | ||
}, | ||
"publishConfig": { | ||
@@ -74,19 +48,4 @@ "access": "public" | ||
"dependencies": { | ||
"no-case": "^3.0.4", | ||
"tslib": "^2.0.3", | ||
"upper-case": "^2.0.2" | ||
}, | ||
"devDependencies": { | ||
"@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": "^4.1.2" | ||
}, | ||
"gitHead": "76a21a7f6f2a226521ef6abd345ff309cbd01fb0" | ||
"no-case": "^4.0.0" | ||
} | ||
} |
# Constant Case | ||
[![NPM version][npm-image]][npm-url] | ||
[![NPM downloads][downloads-image]][downloads-url] | ||
[![Bundle size][bundlephobia-image]][bundlephobia-url] | ||
> Transform into upper case string with an underscore between words. | ||
@@ -31,8 +27,1 @@ | ||
MIT | ||
[npm-image]: https://img.shields.io/npm/v/constant-case.svg?style=flat | ||
[npm-url]: https://npmjs.org/package/constant-case | ||
[downloads-image]: https://img.shields.io/npm/dm/constant-case.svg?style=flat | ||
[downloads-url]: https://npmjs.org/package/constant-case | ||
[bundlephobia-image]: https://img.shields.io/bundlephobia/minzip/constant-case.svg | ||
[bundlephobia-url]: https://bundlephobia.com/result?p=constant-case |
Sorry, the diff of this file is not supported yet
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
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
1
0
Yes
2600
5
8
1
27
1
+ Addedno-case@4.0.0(transitive)
- Removedtslib@^2.0.3
- Removedupper-case@^2.0.2
- Removedlower-case@2.0.2(transitive)
- Removedno-case@3.0.4(transitive)
- Removedtslib@2.8.1(transitive)
- Removedupper-case@2.0.2(transitive)
Updatedno-case@^4.0.0