snake-case
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -0,5 +1,7 @@ | ||
import { __assign } from "tslib"; | ||
import { dotCase } from "dot-case"; | ||
export function snakeCase(input, options = {}) { | ||
return dotCase(input, Object.assign({ delimiter: "_" }, options)); | ||
export function snakeCase(input, options) { | ||
if (options === void 0) { options = {}; } | ||
return dotCase(input, __assign({ delimiter: "_" }, options)); | ||
} | ||
//# sourceMappingURL=index.js.map |
import { snakeCase } from "."; | ||
const TEST_CASES = [ | ||
var TEST_CASES = [ | ||
["", ""], | ||
@@ -11,9 +11,13 @@ ["test", "test"], | ||
]; | ||
describe("snake case", () => { | ||
for (const [input, result] of TEST_CASES) { | ||
it(`${input} -> ${result}`, () => { | ||
describe("snake case", function () { | ||
var _loop_1 = function (input, result) { | ||
it(input + " -> " + result, function () { | ||
expect(snakeCase(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 dot_case_1 = require("dot-case"); | ||
function snakeCase(input, options = {}) { | ||
return dot_case_1.dotCase(input, Object.assign({ delimiter: "_" }, options)); | ||
var tslib_1 = require("tslib"); | ||
var dot_case_1 = require("dot-case"); | ||
function snakeCase(input, options) { | ||
if (options === void 0) { options = {}; } | ||
return dot_case_1.dotCase(input, tslib_1.__assign({ delimiter: "_" }, options)); | ||
} | ||
exports.snakeCase = snakeCase; | ||
//# 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("snake case", () => { | ||
for (const [input, result] of TEST_CASES) { | ||
it(`${input} -> ${result}`, () => { | ||
describe("snake case", function () { | ||
var _loop_1 = function (input, result) { | ||
it(input + " -> " + result, function () { | ||
expect(_1.snakeCase(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": "snake-case", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Transform into a lower case string with underscores 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", | ||
@@ -75,3 +75,4 @@ "prepare": "npm run build" | ||
"dependencies": { | ||
"dot-case": "^3.0.1" | ||
"dot-case": "^3.0.2", | ||
"tslib": "^1.10.0" | ||
}, | ||
@@ -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
10164
67
2
+ Addedtslib@^1.10.0
+ Addedtslib@1.14.1(transitive)
Updateddot-case@^3.0.2