Project status
Use case
You need utilities for:
- Primitive types
- Arrays
- Functions
- Numbers
- Objects
- Strings
- Date and time
- Mutual exclusion
- Lock management
- Semaphore management
- Backend
- CLIs
- Filesystem
- Processes
- Frontend
- Cookies
- DOM
- Data-Transfer
- JSON-based Expressions
- Logging
- Scopes
- Testing
- Typescript
- URLs
Content
Installation
You can install via package manager, simply download the compiled version as zip file here and inject or request via cdn in HTML:
npm install clientnodeimport {createDomNodes, evaluateExpression} from 'cientnode'
// ...
<script src="https://unpkg.com/clientnode@latest/dist/bundle/index.js">
</script>
<div id="first-example-playground"></div>
const domNode = clientnode.createDomNodes('<p>some content to animate</p>')
const endless = () => {
clientnode.fadeIn(domNode)
.then(() => clientnode.fadeOut(domNode))
.then(endless)
}
endless()
document.querySelector('#first-example-playground').appendChild(domNode)
The compiled bundle supports AMD, commonjs, commonjs2 and variable injection into given context (UMD) as export format: You can use a module bundler if you want.
Usage
Execute a JSON based expression:
<div id="second-example-playground"></div>
document.querySelector('#second-example-playground').innerText =
clientnode.evaluateExpression(
{
$operator: '+',
operand1: 2,
operand2: {$select: 'some.data.in.scope'}
},
{some: {data: {in: {scope: 3}}}}
)