New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

lanurite

Package Overview
Dependencies
Maintainers
3
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lanurite

Library for Models and Collection use in JS worlds

  • 1.0.64
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-87.76%
Maintainers
3
Weekly downloads
 
Created
Source

Lanurite

Library for Models and Collection use in JS worlds

Documentation: https://pxyup.github.io/lanurite/

NPM

For use in browser

<script src="../dist/lanurite.js"></script>

For use in TypeScript

import * as Lanurite from "lanurite"
console.log(Lanurite.version)

For use in NodeJS

var Lanurite = require("lanurite");
console.log(Lanurite.version)

Example


let model = new Lanurite.Model({name: "Robot"});
document.getElementById("test").innerHTML = model.get("name");

model.on("change", function (e) {
    document.getElementById("test").innerHTML = model.get("name")
    model.off("change", log)
});

let collection = new Lanurite.Collection();

collection.on("add", function (model) {
    document.getElementById("collection").innerHTML += model.get("name") + "<br>"
})

collection.on("clear", function () {
    document.getElementById("collection").innerHTML = "";
});

model.on("change", log);

collection.on("reset", function () {
    getCollectionDOM();
});

getCollectionDOM();

function log(event){
    console.log(event)
}

function getCollectionDOM() {
    document.getElementById("collection").innerHTML = "";
    collection.each((el) => {
        document.getElementById("collection").innerHTML += el.get("name") + "<br>"
    });
}

Keywords

FAQs

Package last updated on 08 Oct 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc