{"id":43857,"library":"snowstorm","title":"snowstorm","description":"A minimal JavaScript ORM for Node.js that maps plain data objects to model instances with typed properties. Version 1.0.0 provides property types (string, number, boolean, array, object, date, model) with custom property support, serialization via toJSON(), and prototype extension. It has low release activity and is suitable for simple data mapping use cases.","status":"active","version":"1.0.0","language":"javascript","source_language":"en","source_url":"git://github.com/theisensanders-wf/snowstorm","tags":["javascript","Javascript","Node","ORM"],"install":[{"cmd":"npm install snowstorm","lang":"bash","label":"npm"},{"cmd":"yarn add snowstorm","lang":"bash","label":"yarn"},{"cmd":"pnpm add snowstorm","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"snowstorm is CommonJS-only. ESM import is not supported.","wrong":"import snowstorm from 'snowstorm'","symbol":"default","correct":"const snowstorm = require('snowstorm')"},{"note":"Same as using main module; no named export.","wrong":"const Task = require('snowstorm').create('Task', ...)","symbol":"snowstorm.create","correct":"const Task = snowstorm.create('Task', { title: snowstorm.Properties.string })"},{"note":"Destructuring from CommonJS require works; ESM does not.","wrong":"import { Properties } from 'snowstorm'","symbol":"snowstorm.Properties","correct":"const { Properties } = require('snowstorm')"}],"quickstart":{"code":"const snowstorm = require('snowstorm');\n\nconst Task = snowstorm.create('Task', {\n  title: snowstorm.Properties.string,\n  completed: snowstorm.Properties.boolean,\n  createdAt: snowstorm.Properties.date('created_at')\n});\n\nTask.prototype.isCompleted = function () {\n  return this.completed;\n};\n\nconst responseData = {\n  title: 'Task out the trash',\n  completed: false,\n  created_at: '2015-08-20T10:00:00.000Z'\n};\nconst task = new Task(responseData);\n\nconsole.log(task.title);\nconsole.log(task.isCompleted());\nconsole.log(task.toJSON());","lang":"javascript","description":"Defines a Task model with typed properties, instantiates from plain data, and demonstrates access and serialization."},"warnings":[{"fix":"Use require('snowstorm') or configure bundler to handle CommonJS.","message":"snowstorm is CommonJS-only; ESM import (import snowstorm from 'snowstorm') will fail.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Write custom type declarations or consider an ORM with built-in TS support.","message":"No type definitions; TypeScript users cannot rely on IDE intellisense.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Define all prototype methods immediately after snowstorm.create() and before instantiation.","message":"Prototype methods are added after model creation; order matters.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.0.0':20 'activ':45 'array':27 'boolean':26 'case':54 'custom':32 'data':11,51 'date':29 'extens':40 'instanc':15 'javascript':4,55,56 'low':43 'map':9,52 'minim':3 'model':14,30 'node':57 'node.js':7 'number':25 'object':12,28 'orm':5,58 'plain':10 'properti':18,22,33 'prototyp':39 'provid':21 'releas':44 'serial':35 'simpl':50 'snowstorm':1 'string':24 'suitabl':48 'support':34 'tojson':37 'type':17,23 'use':53 'version':19 'via':36","created_at":"2026-06-05T17:01:48.940304+00:00","updated_at":"2026-06-05T17:01:48.940304+00:00","problems":[{"fix":"Use CommonJS require: const snowstorm = require('snowstorm');","cause":"Wrong import style (e.g., ESM import on CommonJS module).","error":"TypeError: snowstorm.create is not a function"},{"fix":"Ensure snowstorm is required via CommonJS and not as a default import.","cause":"snowstorm.Properties is undefined because module not loaded correctly.","error":"TypeError: Cannot read property 'string' of undefined"},{"fix":"Use dynamic import or switch to CommonJS project; or find an ESM-compatible ORM.","cause":"Running in ESM environment (e.g., type: 'module' in package.json).","error":"ReferenceError: require is not defined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/theisensanders-wf/snowstorm#readme","github":"git://github.com/theisensanders-wf/snowstorm","docs":null,"changelog":null,"pypi":null,"npm":"snowstorm","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}