0.0.34 • Published 3 months ago

@coli.codes/naming v0.0.34

Weekly downloads
-
License
-
Repository
-
Last release
3 months ago

Coli Naming

  • variable naming
  • route naming
  • entity naming
  • file naming
  • directory naming

Installation & Usage

yarn add @coli.codes/naming
import { nameit } from "@coli.codes/nameit";

nameit("Content Wrap"); // - [ContentWrap, contentWrap, content-wrap, content_wrap, CONTENT_WRAP, contentwrap]

// of course, you can pass the configurations.

Scope handling

with ScopedNamer you can pervent confliction of each identifiers' name

conflict prevent prefix/suffix

Exceptional realworld scenarios (supported)

nextjs' page route naming

  • [slug].js
  • _app.js

Usecases

  • const Wrapper = styled.div~;
  • interface IModel {}
  • class Model {}
  • function add () {}
  • function Component () {}
  • pages/slug.js
  • const _memberVar = calc(porps.value)
  • const API_SECRET = "alza0000"
  • function checkIfThatIsTrue() : boolean
  • const isSomethingTrue : boolean

Input scenario

/ is a seperator, it can be replaced with cases - 'a/b' -> "AB", "aB", "a_b", "_a_b", etc..

  • "+-$" - "plus/minus/dollarsign"
  • "- Dollar" - "_/dollar"
  • "Hi" - "hi"
  • "Content wrap" - "content/wrap"
  • "" - "unnamed/rand()"
  • "" - ""
  • "$" - "dollarsign" ($ is a valid name is es, but not a good pattern, you have to specify it as a sign keyword in order to use it - see it below)
  • Unique.dollarsign - "$"
0.0.34

3 months ago

0.0.30

2 years ago

0.0.31

2 years ago

0.0.32

2 years ago

0.0.29

2 years ago

0.0.28

2 years ago

0.0.27

2 years ago

0.0.26

2 years ago

0.0.25

2 years ago

0.0.24

2 years ago

0.0.23

2 years ago

0.0.21

2 years ago

0.0.20

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.14

2 years ago