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

palikka

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

palikka

A tiny module/event/promise system for the browser and Node.

  • 0.4.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-88.89%
Maintainers
1
Weekly downloads
 
Created
Source

#Palikka v0.4.1

Build Status Coverage Status

Promises/A+ logo The aim of this project is to provide a robust set of tools for creating reusable modules. Palikka consists of three core components: module system, event system and promise system (Promises/A+ 1.1 compliant). All components are highly optimized leveraging each other internally. All this goodness is dependency free, well tested/documented, works in the browser (IE7+) as well as Node.js and is delivered in a compact package (6.04kB minified, 2.63kB gzipped).

##Getting started

Include palikka.js somewhere on your site (before any code that requires Palikka).

// Define module "foo" which requires module "bar"
palikka.define('foo', ['bar'], function (bar) {
  return 'foo';
});

// Define module "bar"
palikka.define('bar', function () {

  // Let's use a deferred to delay the initiation
  return palikka.defer(function (resolve, reject) {
    window.setTimeout(function () {
      resolve('bar');
    }, 1000);
  });

});

// Require modules "foo" and "bar"
palikka.require(['foo', 'bar'], function (foo, bar) {
  console.log(foo + bar); // "foobar"
});

##License

Copyright © 2015 Niklas Rämö. Licensed under the MIT license.

Keywords

FAQs

Package last updated on 04 Aug 2015

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