Skip to content

Commit

Permalink
Update Dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkGriffiths committed Jul 17, 2020
1 parent 168a121 commit 686074d
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 20 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ language: node_js
node_js:
- stable
- 12
- 11
- 10
env:
global:
Expand Down
24 changes: 12 additions & 12 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ <h3 class='left m0 panel-title' id='constructor'>
</h3>


<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/00cfc1e06c816edf38220b2d33572745a8ae653c/src/index.js#L13-L15'>
<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/168a121c832b08593d0ca401d00d3d7e078e3d29/src/index.js#L13-L15'>
<span>src/index.js</span>
</a>

Expand Down Expand Up @@ -338,7 +338,7 @@ <h3 class='left m0 panel-title' id='pad'>
</h3>


<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/00cfc1e06c816edf38220b2d33572745a8ae653c/src/index.js#L51-L55'>
<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/168a121c832b08593d0ca401d00d3d7e078e3d29/src/index.js#L51-L55'>
<span>src/index.js</span>
</a>

Expand Down Expand Up @@ -425,7 +425,7 @@ <h3 class='left m0 panel-title' id='tosub'>
</h3>


<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/00cfc1e06c816edf38220b2d33572745a8ae653c/src/index.js#L61-L63'>
<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/168a121c832b08593d0ca401d00d3d7e078e3d29/src/index.js#L61-L63'>
<span>src/index.js</span>
</a>

Expand Down Expand Up @@ -487,7 +487,7 @@ <h3 class='left m0 panel-title' id='tosuper'>
</h3>


<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/00cfc1e06c816edf38220b2d33572745a8ae653c/src/index.js#L69-L71'>
<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/168a121c832b08593d0ca401d00d3d7e078e3d29/src/index.js#L69-L71'>
<span>src/index.js</span>
</a>

Expand Down Expand Up @@ -549,7 +549,7 @@ <h3 class='left m0 panel-title' id='asemoji'>
</h3>


<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/00cfc1e06c816edf38220b2d33572745a8ae653c/src/index.js#L79-L82'>
<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/168a121c832b08593d0ca401d00d3d7e078e3d29/src/index.js#L79-L82'>
<span>src/index.js</span>
</a>

Expand Down Expand Up @@ -612,7 +612,7 @@ <h3 class='left m0 panel-title' id='inbox'>
</h3>


<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/00cfc1e06c816edf38220b2d33572745a8ae653c/src/index.js#L89-L106'>
<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/168a121c832b08593d0ca401d00d3d7e078e3d29/src/index.js#L89-L106'>
<span>src/index.js</span>
</a>

Expand Down Expand Up @@ -689,7 +689,7 @@ <h3 class='left m0 panel-title' id='bespokestring'>
</h3>


<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/00cfc1e06c816edf38220b2d33572745a8ae653c/src/index.js#L122-L124'>
<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/168a121c832b08593d0ca401d00d3d7e078e3d29/src/index.js#L122-L124'>
<span>src/index.js</span>
</a>

Expand Down Expand Up @@ -765,7 +765,7 @@ <h3 class='left m0 panel-title' id='pad'>
</h3>


<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/00cfc1e06c816edf38220b2d33572745a8ae653c/src/index.js#L133-L135'>
<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/168a121c832b08593d0ca401d00d3d7e078e3d29/src/index.js#L133-L135'>
<span>src/index.js</span>
</a>

Expand Down Expand Up @@ -859,7 +859,7 @@ <h3 class='left m0 panel-title' id='box'>
</h3>


<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/00cfc1e06c816edf38220b2d33572745a8ae653c/src/index.js#L143-L145'>
<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/168a121c832b08593d0ca401d00d3d7e078e3d29/src/index.js#L143-L145'>
<span>src/index.js</span>
</a>

Expand Down Expand Up @@ -944,7 +944,7 @@ <h3 class='left m0 panel-title' id='tosubscript'>
</h3>


<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/00cfc1e06c816edf38220b2d33572745a8ae653c/src/index.js#L152-L154'>
<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/168a121c832b08593d0ca401d00d3d7e078e3d29/src/index.js#L152-L154'>
<span>src/index.js</span>
</a>

Expand Down Expand Up @@ -1020,7 +1020,7 @@ <h3 class='left m0 panel-title' id='tosuperscript'>
</h3>


<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/00cfc1e06c816edf38220b2d33572745a8ae653c/src/index.js#L161-L163'>
<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/168a121c832b08593d0ca401d00d3d7e078e3d29/src/index.js#L161-L163'>
<span>src/index.js</span>
</a>

Expand Down Expand Up @@ -1096,7 +1096,7 @@ <h3 class='left m0 panel-title' id='emoji'>
</h3>


<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/00cfc1e06c816edf38220b2d33572745a8ae653c/src/index.js#L170-L172'>
<a class='pl3 pr1 right rounded github' href='https://MarkGriffiths@github.com/thebespokepixel/string/blob/168a121c832b08593d0ca401d00d3d7e078e3d29/src/index.js#L170-L172'>
<span>src/index.js</span>
</a>

Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,7 @@
],
"Development Status": [
[
"greenkeeper",
"travis-com-dev"
],
[
"travis-com-dev",
"david-dev",
"david-devdeps-dev"
],
Expand Down
63 changes: 63 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# @thebespokepixel/string

> A collection of enhanced formats and utilities for strings.
##### Publishing Status

[![npm](https://img.shields.io/npm/v/@thebespokepixel/string?logo=npm)](https://www.npmjs.com/package/@thebespokepixel/string "npm") [![David](https://david-dm.org/thebespokepixel/string/master/status.svg)](https://david-dm.org/thebespokepixel/string/master "David")
[![Travis](https://img.shields.io/travis/com/thebespokepixel/string/master?logo=travis)](https://travis-ci.com/thebespokepixel/string "Travis") [![Rollup](https://img.shields.io/badge/es6-module%3Amjs_%E2%9C%94-64CA39?&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNCIgaGVpZ2h0PSIxNCIgdmlld0JveD0iMCAwIDE0IDE0Ij4KICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgPHBhdGggZmlsbD0iI0ZGMzMzMyIgZD0iTTEwLjkwNDI4MjQsMy4wMDkxMDY4MyBDMTEuMjM4NzA1NSwzLjU4MjgzNzEzIDExLjQyODU3MTQsNC4yNDQ4MzM2MyAxMS40Mjg1NzE0LDQuOTUwOTYzMjIgQzExLjQyODU3MTQsNi40MTc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/string/develop?logo=travis)](https://travis-ci.com/thebespokepixel/string "Travis") [![David](https://david-dm.org/thebespokepixel/string/develop/status.svg)](https://david-dm.org/thebespokepixel/string/develop "David") [![David-developer](https://david-dm.org/thebespokepixel/string/develop/dev-status.svg)](https://david-dm.org/thebespokepixel/string/develop?type=dev "David-developer")
[![Snyk](https://snyk.io/test/github/thebespokepixel/string/badge.svg)](https://snyk.io/test/github/thebespokepixel/string "Snyk") [![Code-climate](https://api.codeclimate.com/v1/badges/57bf94c1bc96b928b8cd/maintainability)](https://codeclimate.com/github/thebespokepixel/string/maintainability "Code-climate") [![Coverage](https://api.codeclimate.com/v1/badges/57bf94c1bc96b928b8cd/test_coverage)](https://codeclimate.com/github/thebespokepixel/string/test_coverage "Coverage")

##### Documentation/Help

[![Inch](https://inch-ci.org/github/thebespokepixel/string.svg?branch=master&style=shields)](https://inch-ci.org/github/thebespokepixel/string "Inch") [![Twitter](https://img.shields.io/twitter/follow/thebespokepixel?style=social)](https://twitter.com/thebespokepixel "Twitter")


## Usage

#### Installation

```shell
npm install --save @thebespokepixel/string
```

#### Example

```js
const bString = require('@thebespokepixel/string')

console.log(bString.subScript('String to print'))
```

#### .pad(string, char, length)

Pads `string`, using `char` to `length` characters. If length is negative, pads the right rather than the left of `string`. If length is less than `string.length`, it will crop `string` to fit.

#### .toSuperscript(string) | .toSubscript(string)

Prints the string using the alternative super/sub characters available in Unicode (Such as in DejaVu Sans Mono or Source Code Pro). Superscript support is much more complete that Subscript. Unavaiable subscript characters will be printed as ``. The character `Q` has to be approximated.

TODO: Use compound Unicode overlay characters to better approximate missing chars.

Unless the environment has `TERM_FONT=full` set (see [Term-NG][termNG]) and you have a Unicode terminal font that supports sub/super-script characters, then it will fall back to printing normal characters.

##### Character set (Github display is incomplete)

| Class | Numerals | Symbols | Lower case | Upper case | |
| ----------- | ------------ | ------------ | ---------------------------- | ---------------------------- | ---------------------------- |
| Basic | `0123456789` | \`+-=:()/ | . \` | `abcdefghijklmnopqrstuvwxyz` | `ABCDEFGHIJKLMNOPQRSTUVWXYZ` |
| Superscript | `⁰¹²³⁴⁵⁶⁷⁸⁹` | `⁺⁻⁼⁼⁽⁾╵╵⋅ ` | `ᵃᵇᶜᵈᵉᶠᵍʰⁱʲᵏˡᵐⁿᵒᵖᵍʳˢᵗᵘᵛʷˣʸᶻ` | `ᴬᴮᶜᴰᴱᶠᴳᴴᴵᴶᴷᴸᴹᴺᴼᴾᴼᴿˢᵀᵁⱽᵂˣʸᶻ` | |
| Subscript | `₀₁₂₃₄₅₆₇₈₉` | `₊₋₌₌₍₎╷╷. ` | `ₐₓₓₓₑₓₓₕᵢⱼₖₗₘₙₒₚₓᵣₛₜᵤᵥₓₓₓₓ` | `ᴀʙcᴅᴇꜰɢʜɪᴊᴋʟᴍɴᴏᴘǫʀꜱᴛᴜᴠᴡxʏᴢ` | |

[termNG]: https://www.npmjs.com/package/term-ng


## Documentation

Full documentation can be found at [https://thebespokepixel.github.io/string/][1]

[1]: https://thebespokepixel.github.io/string/

0 comments on commit 686074d

Please sign in to comment.