New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

modapp-resource

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

modapp-resource

Utility classes implementing modapp's resource interfaces for Models and Collections.

latest
Source
npmnpm
Version
1.8.4
Version published
Weekly downloads
10
-23.08%
Maintainers
1
Weekly downloads
 
Created
Source

view on npm

ModApp Resource

Utility classes implementing modapp's resource interfaces for Models and Collections.

Installation

With npm:

npm install modapp-resource

With yarn:

yarn add modapp-resource

Usage

import { Model } from 'modapp-resource';

// Creating generic model
let model = new Model({
	data: {
		id: 12,
		foo: "bar"
	}
});

let onChange = changed => alert("Foo is now ", model.foo);

// Adding a model listener
model.on('change', onChange);

// Setting the property foo, triggering a change event
model.set({foo: "baz"});

// Removing model listener
model.off('change', onChange);

FAQs

Package last updated on 26 Nov 2023

Did you know?

Socket

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.

Install

Related posts