Sqimitive.js – A Universal Primitive

Sqimitive.js is a minimalistic paradigm-agnostic building block for applications written in JavaScript (not necessary in-browser or DOM-related). It provides core infrastructure without much domain-specific logic that you can quickly develop thanks to its flexible API.

Sqimitive.js is under 20K (minified), sports documentation that is over 200 pages long (printed A4), needs no transpilers (plain pre-ES6 JavaScript, IE 11+) and depends only on a compatible utility library (NoDash no@ +16K, Underscore.js >=1.9.0 un: or LoDash) and, optionally, on jQuery jq: or Zepto (for Sqimitive\jQuery).

And it’s in public domain (

from jqex

var Task = Sqimitive.jQuery.extend({
  el: {tag: 'li'},

  _opt: {
    // Keep el appended to the parent's el.
    attachPath: '.',
    // Define the default attributes of Task:
    caption: '',
    done: false,

  events: {
    // Update the visual presentation whenever any _opt changes:
    change: 'render',

    render: function () {
        .toggleClass('done', this.get('done'))

  elEvents: {
    // Listen for double clicks on this.el to change the done state:
    dblclick: function () {
      this.set('done', !this.get('done'))

// Create a parent container for our to-do items (Task's) which
// is placed into the DOM at $('#tasks'):
var list = new Sqimitive.jQuery({el: '#tasks'})

// Create a new item, add it to list's _children:
list.nest( new Task({caption: 'Ready steady go!'}) )
// ...append to list's el and render for the first time:

// Double click on Task's element in the window to change its
// className.


npm npm install sqimitive

If you spot a typo – select the fragment and press Ctrl+Enter. Help us keep this memo free of vexatious mistakes! Powered by

Basic code conventions

Customizing dependenciesdeps

Sqimitive can be included using several methods as implemented by umh.js. Each method has its own way of overriding dependencies (which default to NoDash no@ and jQuery jq:). Alternatively, you can change the deps variable in the source code but you’ll have to redo it on upgrade.


In npm 8.3+, put this into your project’s package.json before doing npm install sqimitive (

"overrides": {
  "sqimitive": {
    "nodash": "npm:underscore",
    "jquery": "npm:zepto"


Use map and/or path options (

  map: {
    'sqimitive/main': {
      'nodash/main': 'lodash'
    'sqimitive/jquery': {
      jquery: 'zepto'
  paths: {
    nodash: ''

Plain <script>

Dependencies land in global window so simply fetch the needed script before including Sqimitive:

<script src=""></script>
<script src=""></script>

Defined in: HELP.chem, lines 81-172 (92 lines)