Giter Site home page Giter Site logo

title's Introduction

Title

This package correctly capitalizes your titles as per The Chicago Manual of Style. Furthermore, all of Vercel's product names are capitalized properly as well.

Usage

Firstly, install the package:

yarn add title

Then load it and convert any input:

const title = require('title')

title('tHe cHicaGo maNual oF StyLe')

// Will result in:
// "The Chicago Manual of Style"

You can even pass words that should be capitalized as specified:

title('FaCEbook is great', {
  special: [ 'facebook' ]
})

// Will result in:
// "facebook is great"

That's it!

Command Line

You can also convert titles in the command line, if you want. Install the package globally:

yarn global add title

Next, run it:

title "tHe cHicaGo maNual oF StyLe"

# Will result in:
# "The Chicago Manual of Style"

To see all available options, run:

title -h

Contributing

  1. Fork this repository to your own GitHub account and then clone it to your local device
  2. Uninstall title if it's already installed: yarn global remove title
  3. Link it to the global module directory: yarn link

After that, you can use the title command everywhere.

Authors

title's People

Contributors

commanderroot avatar dependabot[bot] avatar dwalkr avatar flybayer avatar ginkoid avatar guywaldman avatar jll32 avatar johnverrone avatar lachlanjc avatar leerob avatar leo avatar manovotny avatar mxstbr avatar pablopunk avatar sergiodxa avatar seriousbug avatar shuding avatar stscoundrel avatar sungthecoder avatar timneutkens avatar timothyis avatar tymick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

title's Issues

per-Part should be Per-part

Currently the tool gives this title:

Healthcare Systems Manufacturer Reduces per-Part Cost 10x by Harnessing New Open Additive Ecosystem

However, I think it should be

Healthcare Systems Manufacturer Reduces Per-part Cost 10x by Harnessing New Open Additive Ecosystem

based on https://alcts.ala.org/ccdablog/?tag=chicago-manual-of-style.

Please correct me if I am wrong. Thanks

By the way, a very useful tool!

'ñ' causes a capitalization bug

Hi,

I noticed this while using this module today:

title('diseño') // 'DiseñO'

Using 'ñ' results in the next letter being capitalized. I haven't dug to figure out what's causing this, but I just wanted to surface the problem. Thanks for all the hard work.

Update all dependencies to latest

I noticed that its dependencies are too old, so you have better update them, and it's recommended to use @^x.x.x or @>=x.x.x to assign versions instead of an exact version code.

It's important to keep the dependencies fresh, and if not, it may cause security problems.

Last word of title should always be capitalized

I don't have direct access to the relevant Chicago Manual of Style section, but indirectly, everywhere I look online from Grammar Girl to Capitalize My Title tells me that the last word of the title should always be capitalized regardless of whether or not it's a conjunction, article, or preposition.

This tool currently does not capitalize the last word of the title if it is one of the words in lower-case.js. For example,

title "what on earth is going on"
# What on Earth Is Going on [copied]

It should return What on Earth Is Going On.

Incorrect result for Vietnamese

Hi, thanks for making this package. I found the result for Vietnamese is incorrect, please see examples below.

console.log(title("đội")); // output "độI", but expect "Đội"
console.log(title("tuyển")); // output "TuyểN", but expect "Tuyển"

Allow passing additional special words

Instead of me submitting pull requests with lots of different special words (brands, acronyms, etc.), it would probably be easier if special words could be passed to the title() function / CLI command. When no words are passed, it could default to the ones in title/lib/specials.js.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.