• This repository has been archived on 21/Dec/2019
  • Stars
    star
    154
  • Rank 242,095 (Top 5 %)
  • Language
    JavaScript
  • Created over 12 years ago
  • Updated about 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An essential JavaScript library for node.js and browsers

prime

Package Info NPM Version Coverage Status Build Status Dependencies Status DevDependencies Status

  1. fundamental, basic, essential.
  2. make (something) ready for use or action.
  3. archetypal, prototypical, typical, classic.

Description

prime is an Object Oriented JavaScript library. It helps you with prototypal inheritance and contains generic utilities for every-day JavaScripting.

No Native JavaScript Objects were harmed in the making of this library.

Modules Overview

A short overview of the available modules. For more information, refer to the documentation.

prime

The function to create new primes.

var prime = require("prime")

var Animal = prime({
    say: function(){
        return "!!"
    }
})

var Emitter = require("prime/emitter")

var Cat = prime({
    inherits: Animal,
    mixin: Emitter,
    say: function(){
        return "meaow" + Cat.parent.say.call(this)
    }
})

prime/emitter

The event emitter.

var Emitter = require("prime/emitter")

var Dog = prime({
    inherits: Animal,
    mixin: Emitter,
    say: function(){
        var word = "wuff" + Dog.parent.say.call(this)
        this.emit("say", word)
        return word
    }
})

var barkley = new Dog

barkley.on("say", function(word){
    console.log("barkley barked", word)
})

prime/map

Map-like implementation.

var Map = require("prime/map")

var map = new Map()

map.set(domElement, "header")
map.set(domElement2, "footer")
map.get(domElement) // "header"
map.get(domElement2) // "footer"

prime/defer

Optimized timeouts / immediates / animationFrames.

var defer = require("prime/defer")

defer.frame(function() {
    console.log('on next animation frame');
});

defer.immediate(function() {
    console.log('on platform next tick.');
});

defer.timeout(function() {
    console.log('late');
}, 500);

When all else fails, read the full documentation.

More Repositories

1

art

vector drawing for buttons, icons, widgets and all that stuff
JavaScript
143
star
2

Super-DMG-01

A Recreation of the Original Game Boy, With a Few Modern Twists
122
star
3

packager

builds packages using the package.yml MooTools syntax
PHP
90
star
4

moofx

css3-enabled javascript animation library
JavaScript
80
star
5

slickspeed

Speed / Validity test for css dom queries in JavaScript web Frameworks.
PHP
72
star
6

wrapup

wraps up your node modules into web modules
JavaScript
43
star
7

elements

A minimal DOM library built on top of prime
JavaScript
43
star
8

simple-ftpd

a simple ftp server
JavaScript
34
star
9

require-relative

a node.js program to require and resolve modules relative to a path of your choice
JavaScript
23
star
10

mootools-touch

Basic drag class for MooTools 1.2. Supports mobile safari.
JavaScript
22
star
11

mootools-ui

JavaScript
19
star
12

packager-web

the first web app ever that uses packager
PHP
19
star
13

agent

client-side request module
JavaScript
18
star
14

rgb

converts all sorts of colors to rgb format
JavaScript
16
star
15

microseconds

Generate and parse microseconds
JavaScript
16
star
16

mootools-core

MooTools
JavaScript
16
star
17

mootools-color

Color class in plain JavaScript
JavaScript
13
star
18

matrix3d

decompose, interpolate, compose operations on 3d matrices.
JavaScript
12
star
19

mootools-xml

[dead] xml methods for mootools
JavaScript
12
star
20

three-commonjsify

transforms the THREE.js source code in commonJS format
JavaScript
11
star
21

finally

Sane flow control for node.js and browsers
JavaScript
11
star
22

wii-classic-bluetooth-gamepad

Bluetooth conversion of the Wii Classic gamepad
C++
9
star
23

harmonizer

es6 transpiler
JavaScript
8
star
24

transform3d

user-friendly transform operations for matrix3d
JavaScript
8
star
25

control

take control
7
star
26

nodes

document object model for ast nodes, with parent references, queries and validation
JavaScript
7
star
27

xedit-serialize

a YAML serializer for xEdit forms
Pascal
6
star
28

mootools-table

object/object data structure
JavaScript
6
star
29

pixmap

pixel manipulation library
JavaScript
5
star
30

clint

command line helper and arguments parser
JavaScript
5
star
31

emi

a stupidly tiny event emitter
JavaScript
4
star
32

transition

simple animation library
JavaScript
3
star
33

equation-designer

create easing equations in your (chrome) browser, using multiple cubic-bezier curves!
JavaScript
3
star
34

pathogen

path utilities for node.js and browsers
JavaScript
2
star
35

BluJoy

A common joystick interface for ESP32-Bluetooth-Gamepad
C++
2
star
36

neogeo-mini-bluetooth-gamepad

Bluetooth conversion of the Neogeo mini gamepad
C++
2
star
37

mode-tools

mode generator calculator converter and analyzer
JavaScript
1
star
38

Fallout4SynthesisPatchers

Synthesis Patchers for Fallout 4
C#
1
star
39

save-game-linker

generate symlinks for easy save-game syncing
JavaScript
1
star
40

ornaments

promise-centric class decorators
JavaScript
1
star
41

async-sequence

a generator runner. yield promises. be async.
JavaScript
1
star
42

uniquely

create unique identifiers
JavaScript
1
star