
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
The lightest of libraries for good solid HTML data binding.
If you are like me and often want to spin up a quick project that uses just plain JavaScript.
Just... Data... Binding... This is for you
All you need to know to get this library working is:
Colon (:) before any attribute or text within a (${}) in a text node become Bind Handlers.
A Bind Handler is what Binds the Reactive Data and the HTML, expressions defined within Bind Handlers get re-evaluated ONLY when data changes that concern that Bind Handler happen
Data changes have direct effect on DOM updates thanks to native JavaScript Proxy API, which gets rid of the need for expensive dirty checking or setter functions.
Using the Proxy API along-side Bind Handlers, anytime a property is updated, all and ONLY the DOM elements that are related to that data are updated accordingly.
This library requires no configuration, or setup, just include the js bundle into your page and you are ready to start binding reactive data to your HTML
This library is also built thinking about how YOU might want to scale it up to your specific needs. Chances are you DO need data reactivity, but you want it to affect your DOM in your very own specific way, with this library you can create you own HTML Bind Handlers which can interact and take full advantage of the internal data reactivity implementation.
Don't be shy and take a look at the demo: https://bindrjs.vercel.app/
// Install with npm
npm install bindrjs
<!-- This will make the Bind object available globally in your scripts -->
<script src="node_modules/dist/index.js"> </script>
// Import the Bind class to your file
import { Bind } from 'bindrjs'
// New instance of Bind
let MainContent = new Bind({
// Id of the element that will benefit from the Bind context
id: 'main-content', // (Required)
// HTML template string or path to HTML file, if provided it will replace
// the content of the container found with the id (paths only work when running the app in a live server)
template: '', // (Optional)
// Reactive properties that will be provided in the template
bind: { // (Optional)
// These are accessible in the template trough the "this" keyword
text: 'Hello world!'
}
});
// This is 100% reactive!
MainContent.bind
// You can access the properties of the Bind instance
console.log(MainContent.bind.text);
// > Hello world!
// And reassign them
MainContent.bind.text = 'Changing reactive data';
// Now any part of the template that depends on "this.text" property WILL automatically be updated accordingly
You can have type safety when using TS by providing your own interface to the Bind class
interface IHomeView {
header: string
}
let HomeBind = new Bind<IHomeView>({
id: 'home',
bind: {
header: 0 // This will error out because IHomeView interface requests a string
}
});
let bind = HomeBind.bind // The reactive bind object will follow the IHomeView interface, and provide any intellisense available from your IDE
// Clone repository
git clone https://github.com/DavidMunozMartinez/bindrJS.git
// Go to directory
cd bindrjs
// Install dependencies
npm run install
npm run compile
npm run examples
This will run the examples page (https://bindrjs.vercel.app/) locally
npm run test
https://github.com/DavidMunozMartinez/files-sorter
Thanks for passing by, more things are under active development. HAPPY CODING!
FAQs
Don't mind me just re-inventing the wheel
We found that bindrjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.