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

@gravitywelluk/string-manipulation

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gravitywelluk/string-manipulation - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

dist/punctuate/index.d.ts

7

dist/index.d.ts

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

export { default as sentenceCase } from "./sentence-case";
export { default as slurlgify } from "./slurlgify";
export { default as titleCase } from "./title-case";
export * from "./punctuate";
export * from "./sentence-case";
export * from "./slurlgify";
export * from "./title-case";
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.titleCase = exports.slurlgify = exports.sentenceCase = void 0;
var sentence_case_1 = require("./sentence-case");
Object.defineProperty(exports, "sentenceCase", { enumerable: true, get: function () { return __importDefault(sentence_case_1).default; } });
var slurlgify_1 = require("./slurlgify");
Object.defineProperty(exports, "slurlgify", { enumerable: true, get: function () { return __importDefault(slurlgify_1).default; } });
var title_case_1 = require("./title-case");
Object.defineProperty(exports, "titleCase", { enumerable: true, get: function () { return __importDefault(title_case_1).default; } });
__exportStar(require("./punctuate"), exports);
__exportStar(require("./sentence-case"), exports);
__exportStar(require("./slurlgify"), exports);
__exportStar(require("./title-case"), exports);
/**
* Converts a strings 1st letter to uppercase
*/
declare const sentenceCase: (str: string) => string;
export default sentenceCase;
export declare const sentenceCase: (str: string) => string;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sentenceCase = void 0;
/**

@@ -9,2 +10,2 @@ * Converts a strings 1st letter to uppercase

};
exports.default = sentenceCase;
exports.sentenceCase = sentenceCase;

@@ -15,3 +15,3 @@ interface SlurlgifyOptionAttributes {

*/
declare const slurlgify: (slug: string, opts?: SlurlgifyOptionAttributes) => string;
export default slurlgify;
export declare const slurlgify: (slug: string, opts?: SlurlgifyOptionAttributes) => string;
export {};

@@ -6,3 +6,5 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.slurlgify = void 0;
const slugify_1 = __importDefault(require("slugify"));
const characterReplacements = { "+": "plus" };
/**

@@ -19,3 +21,2 @@ * Converts the given slug into a slugified URL

};
exports.default = slurlgify;
const characterReplacements = { "+": "plus" };
exports.slurlgify = slurlgify;
/**
* Converts the given sentence string into title case
*/
declare const titleCase: (str: string) => string;
export default titleCase;
export declare const titleCase: (str: string) => string;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.titleCase = void 0;
const title_case_1 = require("title-case");

@@ -24,2 +25,2 @@ /**

};
exports.default = titleCase;
exports.titleCase = titleCase;
{
"name": "@gravitywelluk/string-manipulation",
"version": "1.0.4",
"version": "1.0.5",
"description": "Library of commonly used string manipulations",

@@ -42,3 +42,3 @@ "keywords": [

},
"gitHead": "2bdb69a2f20d4802e03dbc6ee7c26c1dba1c215f",
"gitHead": "97fc5ad601d88fc23be85335aa3a383809323e13",
"devDependencies": {

@@ -45,0 +45,0 @@ "jest": "^27.2.0"

@@ -14,2 +14,3 @@ <h1 align="center">Gravitywell String-manipulation</h1>

- [Usage](#usage)
- [`punctuate`](#punctuate)
- [`sentenceCase`](#sentencecase)

@@ -25,2 +26,13 @@ - [`slurlgify`](#slurlgify)

### `punctuate`
Checks if the given string has the request punctuation mark and adds it to the string if it does not.
```typescript
import { punctuate, PunctuationMark } from "@gravitywelluk/string-manipulation";
punctuate("The quick brown fox jumps over the lazy dog", PunctuationMark.FULL_STOP);
// Output: "The quick brown fox jumps over the lazy dog."
```
### `sentenceCase`

@@ -27,0 +39,0 @@

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