1.1.4 • Published 13 days ago

@teamteanpm2024/nesciunt-dolorum-vero v1.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
13 days ago

@teamteanpm2024/nesciunt-dolorum-vero

Build and Test NPM version NPM

Minimal templates for Node.js

Installation

npm install @teamteanpm2024/nesciunt-dolorum-vero

Usage

const compile = require('@teamteanpm2024/nesciunt-dolorum-vero');

const compiled = compile('filedir/filename.ct', { name: 'John' }); // filepath and variables

Full example

├── root
│   ├── index.js
│   └── template.ct # template file you can use any extension
// index.js
const compile = require('@teamteanpm2024/nesciunt-dolorum-vero');

const compiled = compile('template.ct', { name: 'John' }); // you can pass file content as third argument 
console.log(compiled); // you can also write to a file or do whatever you want with the compiled template
<!-- template.ct -->
<h1>Hello, ${name}!</h1>
<h2>How are you? ${capitalize(name)}</h2>
<h3>Lowercase: ${lowercase(name)}</h3>
<!-- output -->
<h1>Hello, John!</h1>
<h2>How are you? John</h2>
<h3>Lowercase: john</h3>

Functions

  • capitalize(string) - Capitalizes the first letter of a string
  • lowercase(string) - Converts a string to lowercase
  • uppercase(string) - Converts a string to uppercase
  • pluralize(string) - Change the word to its plural
  • singularize(string) - Change the word to its singular
  • capPluralize(string) - capitalize + pluralize
  • capSingularize(string) - capitalize + singularize
  • time() - return timestamp

Notes

  • You can't provide whitespace in the function name, so capitalize (name) won't work. You can use capitalize(name) instead.
  • ${ name} won't work. You can use ${name} instead.
  • You can use any extension for the template file, but it's recommended to use .ct for compile-template files.
columnpyyamlsafetrimLeftnested cssajvpropertiesbufferssignalsexecsetPrototypeOfredactFloat64ArrayfigletwarningES2017karmaequalwaitviewoutputirqfast-copyhasOwnfetchdragconcatReactiveExtensionsECMAScript 2017validateFloat32ArraynegativedirutilitieslistenersawesomesaucewaapitrimStarthasruntimeflatMaptoSortedspinnerinstallerfullwidthrmdirlimitstyledeep-copytyped arraytc39settingswgetlesstoArraycall-bindcloneparentsimportexporttacithelpersrmES2022Object.fromEntriesgenericssigterminspectsidemoveMapStyleSheetjestspecequalityJSONspringSymboldependency managersharedES5writeshebangconsumetrimRightastInt16Arraybytecorewindowsfast-deep-copydomagentpolyfillbabel-coreconfigurablecloudfrontieroute53groupByminimaltypeofgdprrecursiveprototypereact-hooksgetclassnamesmixinscomputed-typesstyled-componentstimebrowserslistinternalWebSocketmapspeedserializemonorepohttpdebuggersuperstructprotowritableasciitrimEndjson-schema-validatorECMAScript 2019openfind-upanimationtelephonepropchaimimeratergbObservablestablewhatwgtypespromiseaccessibilitytesterschemeextraa11ydatasignalES8-0hooksrfc4122Object.entriesjsnpmentriesyamlkeybyteLengthhardlinksmobiletoolstrimeverytypesafettyisConcatSpreadableUint16Arraycensorformsinternal slotchromiumsigintreadablestreamvalidationflagsserializationcloudtrailenumerablefunctioncollection.es6formatsanitizesanitizationparseArray.prototype.findLastargvRegExp#flagsairbnbaccessorteststyleguideObservablestasksyntaxchromenumber6to5i18nebscallstringframerefficientiteratorcollectionBigUint64ArraycryptomimetypeswatchFileparsinglinuxdeterministicreact-hook-formTypeBoxcallbackboundfseventsdescriptionprotocol-buffersgetPrototypeOfstringifierjsxparents3fulloffsetfantasy-landobjstylesstringifycharacterSetES3functionsauthenticationArrayBuffertostringtagdefinereal-timeerrorString.prototype.trimexitformattingArray.prototype.filterintrinsicexpresscss lessworkflowcopyconcurrencypopmotiondebuggetterdotenvgesturesjasminecryptartYAMLrapidmochaloadbalancingnametypedarrayssesiterateeslinthigher-orderregexpECMAScript 2020letponyfillfindLastassertremovedeepcopyposeawaitelbansicall-boundArray.prototype.flatpathqueueMicrotaskworkspace:*fast-cloneuser-streamsperformanceendpointthrottleinferencesimpledbdescriptorinpersistentstoragegatewaystructuredClonepureregular expressionshasOwnPropertyreducecacheharmonypatchcompile lesswhichdatastructurecolumnsStreams[[Prototype]]nodeutilspromisesstatelesssequencechannelvalueBigInt64Array@@toStringTaglinkserializeravaajaxESnextECMAScript 2023ES2015Uint8Arraymergehookformmkdirpenvwordwrapio-tsplugin.envencryptionfilterimmerxtermstreamsassertsapicss-in-jsbufferlibphonenumbercurlreactregexdifffixed-widthsymbolsinvariantfskoreancallbindzodbindwafwatchingenvironmentregular expressionloggershelles5reduxlockfilematchwidthmulti-packageworkerrm -rfcoercibleoptimizerbyteOffseteventDispatcherjavascriptoptiondeep-cloneecmascriptguidbootstrap lessindicatorfile systemeslintconfigreadablees2015middlewareRegExp.prototype.flagsconnectwatches2018wordbreaktypedarray
1.1.4

13 days ago

1.1.3

14 days ago

1.1.2

15 days ago

1.1.1

16 days ago

1.0.1

17 days ago

1.0.0

17 days ago