Registry / devops / regularjs

regularjs

JSON →
library0.6.2jsnpmunverified

A living template engine for creating data-driven components based on dirty-checking data binding, similar to AngularJS but with a string-based template approach. Current stable version is 0.6.2 (released 2018, no recent updates). It provides self-contained components, directives, filters, events, and animations out of the box. Differentiated by its string-based templates that support conditional directives (like if/else) within attributes, enabling flexible composable components.

npm install regularjs
INSTALL
IMPORT
SIG · REGULARJS
R
regularjs
devopsjavascriptv0.6.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Regular
import Regular from 'regularjs'
const Regular = require('regularjs').default
Default export with ESM; CommonJS using require('regularjs') works directly.
Regular
const Regular = require('regularjs')
import { Regular } from 'regularjs'
CommonJS require gives the main class directly, no destructuring needed.
Regular.extend
Regular.extend({ name: 'my-comp', template: '...' })
new Regular({ template: '...' })
Components are defined via Regular.extend(), not instantiated directly with a config.

Creates a simple Regular component with two-way data binding via r-model and renders it to the page.

const Regular = require('regularjs'); const NoteApp = Regular.extend({ name: 'note-app', template: '<input r-model={text}> <p>{text}</p>' }); const app = new NoteApp({ data: { text: 'Hello' } }); app.$inject('body');
Debug
Known issues
gotchaRegularjs uses dirty-checking for data-binding; avoid large data sets as performance may degrade.
fix
Use immutable data or consider alternative frameworks for heavy reactivity.
affects: >=0.0.0
deprecatedThe npm package 'regularjs' has not been updated since 2018 and may not be compatible with modern Node/browser environments.
fix
Consider using an actively maintained alternative like Vue.js or Svelte.
affects: *
gotchaString-based templates require careful escaping; single quotes and line breaks in template strings can cause errors.
fix
Use backticks or concatenation for multi-line templates.
affects: >=0.0.0
gotchaWhen using r-model on select elements, the initial value must be set in data, otherwise the binding may not work correctly.
fix
Ensure data contains the property with a value matching an option.
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: Regular is not a constructor
Incorrect import: import { Regular } from 'regularjs' returns undefined.
fix
Use import Regular from 'regularjs' or const Regular = require('regularjs').
Uncaught TypeError: Cannot read property 'parentNode' of null
Attempting to $inject before the target element exists in the DOM.
fix
Ensure $inject is called after the DOM is ready, e.g., in a script at end of body or DOMContentLoaded.
Module not found: Can't resolve 'regularjs'
Package not installed or missing from node_modules.
fix
Run npm install regularjs in the project directory.
Upgrade
Version history
0.6.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
regularjs — npm install regularjs · libregistry