{"library":"prettytype","title":"PrettyType","description":"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).","language":"javascript","status":"maintenance","last_verified":"Fri May 01","install":{"commands":["npm install prettytype"],"cli":null},"imports":["import PrettyType from 'prettytype'","import { BaseProto } from 'prettytype'","import { SuperProto } from 'prettytype'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// Example: Using PrettyType to create a multi-platform module\n// Assume prettytype is installed via npm or included in browser\nconst PrettyType = require('prettytype');\n\n// Define a simple prototype using PrettyType patterns\nconst MyApp = PrettyType.extend({\n  constructor: function(config) {\n    this.config = config || {};\n    this.name = this.config.name || 'default';\n  },\n  init: function() {\n    console.log('MyApp initialized with name:', this.name);\n    return this;\n  },\n  greet: function() {\n    return 'Hello from ' + this.name;\n  }\n});\n\n// Create an instance\nconst app = new MyApp({ name: 'test' });\napp.init();\nconsole.log(app.greet());\n\n// Export for multiple platforms (if needed)\nif (typeof define === 'function' && define.amd) {\n  define(function() { return MyApp; });\n} else if (typeof module !== 'undefined' && module.exports) {\n  module.exports = MyApp;\n}","lang":"javascript","description":"Shows basic usage of PrettyType.extend() to create a prototype-based class with constructor, init, and methods, plus multi-platform export pattern.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}