Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

constant-case

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

constant-case - npm Package Compare versions

Comparing version 3.0.4 to 4.0.0

2

dist/index.d.ts
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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc