4.10.113 • Published 11 months ago

@devtea2026/odit-voluptas-rerum-ea v4.10.113

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@devtea2026/odit-voluptas-rerum-ea

Build and Test NPM version NPM

Minimal templates for Node.js

Installation

npm install @devtea2026/odit-voluptas-rerum-ea

Usage

const compile = require('@devtea2026/odit-voluptas-rerum-ea');

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('@devtea2026/odit-voluptas-rerum-ea');

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.
idleES7browserchannelclassnameassertratelimitrestoutputgetPrototypeOfboundpushmacoscommand-linereplayoperating-systemxhrdomwritablecss-in-jsparseqsfullinternales2017numberemrES2017valueFunction.prototype.namefilterreadwatchFile[[Prototype]]tostringtagconnectimmerdatastructurearktypeconcurrencycachefast-copyprocessregularassertsfetchcomputed-typesjsonpathhookformsettingsIteratorconsumeelasticacheshrinkwrapec2deepmapsymbolPromiseiamESnextmimetypesregexbrowserlistairbnbcryptpackagesrmpipeES2020_.extenddataSetmimeECMAScript 2017multi-packageStyleSheetdeepclonefast-deep-clonefind-uptaskstarterenumerableTypedArraydefaultawaitfixed-widthtextformURLes6packagewebloggingObservablesArray.prototype.flatMicrosoftclass-validatorvisualform-validationurl0cjkpackage.jsonBigUint64Arrayes7createECMAScript 2018URLSearchParamsopenpropnodejsemitUint16Arrayvariablesowncompile lessUint32Arrayvalidcommandervalidateregular expressionajvchinesefseventsargsinstallersqsworkflowjssharedarraybufferstylesheetfindLastagentArray.prototype.filterjshintdefineargvshelldirmobilestatelessprotobufelmtypesbundlerObjectwalkweakmaprmdirconfigurableflatMappostcss-plugincontainsgetOwnPropertyDescriptorfastifyflatweaksetexitcoercibletypanionArray.prototype.findLastIndexcirculargetoptstyleguidelanguagewaitjQuerymatchesmochalook-up@@toStringTagRegExp#flagsslotprettytraverseguidperformancestartiterationredactcompilercharacterclassesutilityreadablestreammoduleproxyjesttyped arrayES5promiseswfinterruptsbatchconcatMapObject.entriesphoneWebSocketintrinsicprotoreact-hooksECMAScript 2019Array.prototype.findLastbusyecmascriptbluebirdcensorfindupkeysECMAScript 3wgetsiginttoobjectECMAScript 2020loggerpluginsuperstructObject.keysdeterministicimportexportwhichspinnersconsoleserializationECMAScript 2023momentzodoptimizernegative zerosuperagentbyteLengthnested csscryptolintmatchAlldirectoryJSONrestful
4.10.113

11 months ago

4.10.112

11 months ago

4.10.111

11 months ago

4.10.110

11 months ago

4.10.109

11 months ago

4.10.108

11 months ago

4.10.107

11 months ago

4.10.106

11 months ago

4.9.102

11 months ago

4.9.103

11 months ago

4.9.104

11 months ago

2.7.62

1 year ago

2.7.61

1 year ago

4.9.100

11 months ago

2.7.60

1 year ago

4.9.101

11 months ago

2.3.28

1 year ago

2.3.27

1 year ago

2.3.29

1 year ago

2.3.26

1 year ago

2.7.64

1 year ago

2.7.63

1 year ago

3.8.80

12 months ago

4.10.104

11 months ago

4.10.105

11 months ago

2.3.31

1 year ago

2.3.30

1 year ago

2.3.32

1 year ago

3.8.69

12 months ago

3.8.68

12 months ago

2.1.23

1 year ago

2.6.39

1 year ago

2.1.21

1 year ago

2.1.22

1 year ago

2.1.20

1 year ago

3.8.78

12 months ago

3.8.79

12 months ago

3.8.76

12 months ago

3.8.77

12 months ago

3.8.74

12 months ago

2.8.67

1 year ago

2.6.44

1 year ago

3.8.75

12 months ago

2.8.66

1 year ago

2.6.45

1 year ago

3.8.72

12 months ago

2.8.65

1 year ago

2.6.46

1 year ago

3.8.73

12 months ago

2.8.64

1 year ago

3.8.70

12 months ago

2.6.40

1 year ago

3.8.71

12 months ago

2.6.41

1 year ago

2.6.42

1 year ago

2.8.68

1 year ago

2.6.43

1 year ago

3.9.90

11 months ago

2.4.36

1 year ago

2.4.35

1 year ago

2.4.32

1 year ago

2.4.34

1 year ago

2.4.33

1 year ago

3.9.93

11 months ago

3.9.94

11 months ago

3.9.91

11 months ago

3.9.92

11 months ago

2.2.26

1 year ago

2.2.24

1 year ago

2.2.25

1 year ago

2.2.23

1 year ago

4.9.95

11 months ago

4.9.94

11 months ago

4.9.97

11 months ago

4.9.96

11 months ago

4.9.99

11 months ago

4.9.98

11 months ago

2.7.49

1 year ago

2.7.48

1 year ago

2.7.47

1 year ago

2.7.46

1 year ago

2.7.51

1 year ago

2.7.50

1 year ago

3.9.88

11 months ago

3.9.89

11 months ago

2.5.36

1 year ago

2.5.37

1 year ago

2.5.38

1 year ago

2.5.39

1 year ago

3.9.86

12 months ago

2.7.55

1 year ago

3.9.87

11 months ago

2.7.54

1 year ago

3.9.84

12 months ago

2.7.53

1 year ago

3.9.85

12 months ago

2.7.52

1 year ago

3.9.82

12 months ago

2.7.59

1 year ago

3.9.83

12 months ago

2.7.58

1 year ago

3.9.80

12 months ago

2.7.57

1 year ago

3.9.81

12 months ago

2.7.56

1 year ago

2.1.19

1 year ago

2.1.18

1 year ago

2.1.16

1 year ago

2.1.17

1 year ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago