Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rudashi/stringable
Fluent Strings in Laravel style for javascript. Heavily inspired by Laravel stringable.
https://github.com/rudashi/stringable
helper js laravel str string stringable ts util
Last synced: 22 days ago
JSON representation
Fluent Strings in Laravel style for javascript. Heavily inspired by Laravel stringable.
- Host: GitHub
- URL: https://github.com/rudashi/stringable
- Owner: rudashi
- License: isc
- Created: 2022-05-03T07:35:38.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-09-25T18:57:21.000Z (4 months ago)
- Last Synced: 2024-12-19T16:09:43.183Z (about 1 month ago)
- Topics: helper, js, laravel, str, string, stringable, ts, util
- Language: JavaScript
- Homepage:
- Size: 271 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Stringable
![GitHub last commit](https://img.shields.io/github/last-commit/rudashi/stringable)
![GitHub repo size](https://img.shields.io/github/repo-size/rudashi/stringable)
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/rudashi/stringable/test-node.js.yml)
![Twitter Follow](https://img.shields.io/twitter/follow/BorysZmuda?style=social)Javascript version's of Laravel's `Illuminate\Support\Str`
Based on great [Laravel](https://laravel.com/docs/master/helpers#fluent-strings-method-list) string helper
## Installation
### NPM
```bash
npm install --save-dev stringable-laravel
```### Yarn
```bash
yarn add stringable-laravel --save
```### CDN
```html
```
## Usage
Import package:
```js
const {Str, Stringable} = require('stringable-laravel');//or
import {Str, Stringable} from 'stringable-laravel';
```Typical usage:
```js
const {Str, Stringable} = require('stringable-laravel');const message = 'hello world';
console.log(Stringable.of(message).upper().toString());
// HELLO WORLD
console.log(Str.uuid().toString());
// 3b097562-88aa-4f50-b28a-d6bce77c8329
```## Introduction
Fluent strings provide a more fluent, object-oriented interface for working with string values, allowing you to
chain multiple string operations together using a more readable syntax compared to traditional string operations.## Available Methods
List of all fluent methods you can find [here](docs/methods.md#fluent-methods).## Strings methods
List of all static methods you can find [here](docs/statics.md#static-methods).## Strings functions
List of all module functions [here](docs/functions.md#functions).## Changelog
Detailed changes for each release are documented in the [release notes](https://github.com/rudashi/stringable/releases).