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

snake-case

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snake-case - npm Package Compare versions

Comparing version 3.0.4 to 4.0.0

4

dist/index.d.ts

@@ -1,3 +0,3 @@

import { Options } from "dot-case";
export { Options };
import { Options } from "no-case";
export type { Options };
export declare function snakeCase(input: string, options?: Options): string;

@@ -1,11 +0,6 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.snakeCase = void 0;
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));
import { split, toLower } from "no-case";
export function snakeCase(input, options) {
const lower = toLower(options?.locale);
return split(input, options).map(lower).join("_");
}
exports.snakeCase = snakeCase;
//# sourceMappingURL=index.js.map
{
"name": "snake-case",
"version": "3.0.4",
"version": "4.0.0",
"description": "Transform into a lower case string with underscores 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"
},

@@ -47,25 +44,2 @@ "repository": {

"homepage": "https://github.com/blakeembrey/change-case/tree/master/packages/snake-case#readme",
"size-limit": [
{
"path": "dist/index.js",
"limit": "400 B"
}
],
"jest": {
"roots": [
"<rootDir>/src/"
],
"transform": {
"\\.tsx?$": "ts-jest"
},
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
]
},
"publishConfig": {

@@ -75,18 +49,4 @@ "access": "public"

"dependencies": {
"dot-case": "^3.0.4",
"tslib": "^2.0.3"
},
"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"
}
}
# Snake Case
[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]
[![Bundle size][bundlephobia-image]][bundlephobia-url]
> Transform into a lower case string with underscores between words.

@@ -31,8 +27,1 @@

MIT
[npm-image]: https://img.shields.io/npm/v/snake-case.svg?style=flat
[npm-url]: https://npmjs.org/package/snake-case
[downloads-image]: https://img.shields.io/npm/dm/snake-case.svg?style=flat
[downloads-url]: https://npmjs.org/package/snake-case
[bundlephobia-image]: https://img.shields.io/bundlephobia/minzip/snake-case.svg
[bundlephobia-url]: https://bundlephobia.com/result?p=snake-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