GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - NeaByteLab/Textshift: Transform text into any case format and sort JSON keys recursively with this zero-dependency library for Deno, Node.js, and browsers.

BranchesTags
Open more actions menu

Latest commit

 

History

15 Commits
15 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
docs
docs
 
 
src
src
 
 
tests
tests
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.config.ts
build.config.ts
 
 
deno.json
deno.json
 
 
package.json
package.json
 
 

Repository files navigation

Textshift

Zero-dependency text transformation and JSON formatting for any runtime

Node Deno Bun CDN

Module type: Deno/ESM npm version JSR License

Features

  • Text transforms - Case conversions, normalization, reversal, and sentence formatting.
  • JSON formatting - Minify, beautify, and recursive key/value sorting.
  • Runtime agnostic - Works in Deno, Node.js, Bun, and browsers.

Installation

Note

Prerequisites: For Deno (install from deno.com). For npm use Node.js (e.g. nodejs.org).

Deno (JSR):

deno add jsr:@neabyte/textshift

npm:

npm install @neabyte/textshift

CDN (jsDelivr/unpkg/esm.sh):

<script type="module">
  import {
    TextTransform,
    JsonFormatter
  } from 'https://cdn.jsdelivr.net/npm/@neabyte/textshift/dist/index.mjs'
</script>

Or via esm.sh:

<script type="module">
  import {
    TextTransform,
    JsonFormatter
  } from 'https://esm.sh/@neabyte/textshift'
</script>

Or via importmap:

<script type="importmap">
  {
    "imports": {
      "@neabyte/textshift": "https://cdn.jsdelivr.net/npm/@neabyte/textshift/dist/index.mjs"
    }
  }
</script>
<script type="module">
  import { TextTransform, JsonFormatter } from '@neabyte/textshift'
</script>

Read docs/README.md for full documentation.

Quick Start

import { TextTransform, JsonFormatter } from '@neabyte/textshift'

const result = TextTransform.capitalizedCase('hello world')
console.log(result.data) // 'Hello World'

const json = JsonFormatter.beautify('{"b":2,"a":1}')
console.log(json.data)
// {
//   "b": 2,
//   "a": 1
// }

Build

npm build (bundles to dist/):

npm run build

Testing

Type check - format, lint, and type-check:

deno task check

Unit tests - format/lint tests and run all tests:

deno task test
  • Tests live under tests/ (text transform and JSON formatter tests).
  • The test task uses --allow-read, --allow-write, and --allow-env.

License

This project is licensed under the MIT license. See the LICENSE file for details.

About

Transform text into any case format and sort JSON keys recursively with this zero-dependency library for Deno, Node.js, and browsers.

Topics

case-conversioncase-converterdenoecmascriptgraphemeintl-segmenterjson-beautifierjson-formatterjson-minifierjson-sortingjsrruntime-agnosticsentence-casestring-manipulationtext-normalizationtext-processingtext-transformationtypescriptunicodezero-dependencies

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.