Socket
Socket
Sign inDemoInstall

capital-case

Package Overview
Dependencies
4
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

6

dist.es2015/index.js

@@ -0,1 +1,2 @@

import { __assign } from "tslib";
import { noCase } from "no-case";

@@ -6,5 +7,6 @@ import { upperCaseFirst } from "upper-case-first";

}
export function capitalCase(input, options = {}) {
return noCase(input, Object.assign({ delimiter: " ", transform: capitalCaseTransform }, options));
export function capitalCase(input, options) {
if (options === void 0) { options = {}; }
return noCase(input, __assign({ delimiter: " ", transform: capitalCaseTransform }, options));
}
//# sourceMappingURL=index.js.map
import { capitalCase } from ".";
const TEST_CASES = [
var TEST_CASES = [
["", ""],

@@ -11,9 +11,13 @@ ["test", "Test"],

];
describe("capital case", () => {
for (const [input, result] of TEST_CASES) {
it(`${input} -> ${result}`, () => {
describe("capital case", function () {
var _loop_1 = function (input, result) {
it(input + " -> " + result, function () {
expect(capitalCase(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_first_1 = require("upper-case-first");
var tslib_1 = require("tslib");
var no_case_1 = require("no-case");
var upper_case_first_1 = require("upper-case-first");
function capitalCaseTransform(input) {

@@ -9,6 +10,7 @@ return upper_case_first_1.upperCaseFirst(input.toLowerCase());

exports.capitalCaseTransform = capitalCaseTransform;
function capitalCase(input, options = {}) {
return no_case_1.noCase(input, Object.assign({ delimiter: " ", transform: capitalCaseTransform }, options));
function capitalCase(input, options) {
if (options === void 0) { options = {}; }
return no_case_1.noCase(input, tslib_1.__assign({ delimiter: " ", transform: capitalCaseTransform }, options));
}
exports.capitalCase = capitalCase;
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const _1 = require(".");
const TEST_CASES = [
var _1 = require(".");
var TEST_CASES = [
["", ""],

@@ -13,9 +13,13 @@ ["test", "Test"],

];
describe("capital case", () => {
for (const [input, result] of TEST_CASES) {
it(`${input} -> ${result}`, () => {
describe("capital case", function () {
var _loop_1 = function (input, result) {
it(input + " -> " + result, function () {
expect(_1.capitalCase(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": "capital-case",
"version": "1.0.1",
"version": "1.0.2",
"description": "Transform into a space separated string with each word capitalized",

@@ -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",

@@ -74,4 +74,5 @@ "prepare": "npm run build"

"dependencies": {
"no-case": "^3.0.1",
"upper-case-first": "^2.0.0"
"no-case": "^3.0.2",
"tslib": "^1.10.0",
"upper-case-first": "^2.0.1"
},

@@ -90,3 +91,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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc