Multi-platform ES5 coding patterns and base super-prototypes for write-once, run-and-test everywhere (AngularJS, RequireJS, Node.js). Version 2.0.0 targets ES5 with no transpiler dependency, supporting Node 0.10.x+, AngularJS 1.x, RequireJS/AMD, and modern browsers. It provides reusable base prototypes, module patterns, and dependency injection for server/browser logic without build steps. Differentiators: native ES5 (no transpiler), supports multiple module systems without browserify, and includes supertype constructors for prototypal inheritance. Release cadence is low (stable, not actively updated).
npm install prettytypeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage of PrettyType.extend() to create a prototype-based class with constructor, init, and methods, plus multi-platform export pattern.
Use ES5 polyfills (e.g., core-js) if running in modern environments that drop ES5 support.
For Angular 2+, wrap PrettyType in Angular services.
Always load via AMD/CommonJS or wrap in IIFE.
Update imports: use require('prettytype') instead of require('prettytype').PrettyType.Run 'npm install prettytype' and ensure node_modules is present.
Use 'const PrettyType = require('prettytype')' (no destructuring).Check if define exists before using: if (typeof define === 'function' && define.amd) { ... }No dependency data recorded yet.