constant-case
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -0,6 +1,8 @@ | ||
import { __assign } from "tslib"; | ||
import { noCase } from "no-case"; | ||
import { upperCase } from 'upper-case'; | ||
export function constantCase(input, options = {}) { | ||
return noCase(input, Object.assign({ delimiter: "_", transform: upperCase }, options)); | ||
import { upperCase } from "upper-case"; | ||
export function constantCase(input, options) { | ||
if (options === void 0) { options = {}; } | ||
return noCase(input, __assign({ delimiter: "_", transform: upperCase }, options)); | ||
} | ||
//# sourceMappingURL=index.js.map |
import { constantCase } from "."; | ||
const TEST_CASES = [ | ||
var TEST_CASES = [ | ||
["", ""], | ||
@@ -13,9 +13,13 @@ ["test", "TEST"], | ||
]; | ||
describe("constant case", () => { | ||
for (const [input, result] of TEST_CASES) { | ||
it(`${input} -> ${result}`, () => { | ||
describe("constant case", function () { | ||
var _loop_1 = function (input, result) { | ||
it(input + " -> " + result, function () { | ||
expect(constantCase(input)).toEqual(result); | ||
}); | ||
}; | ||
for (var _i = 0, TEST_CASES_1 = TEST_CASES; _i < TEST_CASES_1.length; _i++) { | ||
var _a = TEST_CASES_1[_i], input = _a[0], result = _a[1]; | ||
_loop_1(input, result); | ||
} | ||
}); | ||
//# sourceMappingURL=index.spec.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const no_case_1 = require("no-case"); | ||
const upper_case_1 = require("upper-case"); | ||
function constantCase(input, options = {}) { | ||
return no_case_1.noCase(input, Object.assign({ delimiter: "_", transform: upper_case_1.upperCase }, options)); | ||
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)); | ||
} | ||
exports.constantCase = constantCase; | ||
//# sourceMappingURL=index.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const _1 = require("."); | ||
const TEST_CASES = [ | ||
var _1 = require("."); | ||
var TEST_CASES = [ | ||
["", ""], | ||
@@ -15,9 +15,13 @@ ["test", "TEST"], | ||
]; | ||
describe("constant case", () => { | ||
for (const [input, result] of TEST_CASES) { | ||
it(`${input} -> ${result}`, () => { | ||
describe("constant case", function () { | ||
var _loop_1 = function (input, result) { | ||
it(input + " -> " + result, function () { | ||
expect(_1.constantCase(input)).toEqual(result); | ||
}); | ||
}; | ||
for (var _i = 0, TEST_CASES_1 = TEST_CASES; _i < TEST_CASES_1.length; _i++) { | ||
var _a = TEST_CASES_1[_i], input = _a[0], result = _a[1]; | ||
_loop_1(input, result); | ||
} | ||
}); | ||
//# sourceMappingURL=index.spec.js.map |
{ | ||
"name": "constant-case", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Transform into upper case string with an underscore between words", | ||
@@ -19,3 +19,3 @@ "main": "dist/index.js", | ||
"specs": "jest --coverage", | ||
"test": "npm run build && npm run lint && npm run specs && npm run size", | ||
"test": "npm run build && npm run lint && npm run specs", | ||
"size": "size-limit", | ||
@@ -50,3 +50,3 @@ "prepare": "npm run build" | ||
"path": "dist/index.js", | ||
"limit": "550 B" | ||
"limit": "650 B" | ||
} | ||
@@ -75,4 +75,5 @@ ], | ||
"dependencies": { | ||
"no-case": "^3.0.1", | ||
"upper-case": "^2.0.0" | ||
"no-case": "^3.0.2", | ||
"tslib": "^1.10.0", | ||
"upper-case": "^2.0.1" | ||
}, | ||
@@ -91,3 +92,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "a3df3a43bfd3d8e3386d0fb09b69454b91516d18" | ||
"gitHead": "07b68e1a696a1a34090d4f1fc136b1bd467aaa3f" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
11029
73
3
+ Addedtslib@^1.10.0
+ Addedtslib@1.14.1(transitive)
Updatedno-case@^3.0.2
Updatedupper-case@^2.0.1