{"_id":"sam","_rev":"16-bb509cde0e3479013917455edaa92092","name":"sam","description":"Lightweight framework for the SAM pattern","dist-tags":{"latest":"0.0.7"},"versions":{"0.0.1":{"name":"sam","version":"0.0.1","description":"simple asset manager","author":{"name":"weepy"},"licenses":[{"type":"MIT","url":"http://github.com/weepy/sam/raw/master/LICENSE"}],"directories":{"lib":"./lib"},"repository":{"type":"git","url":"git://github.com/weepy/sam.git"},"engines":{"node":">= 0.4.0"},"main":"./lib/index","_id":"sam@0.0.1","_engineSupported":true,"_npmVersion":"0.3.15","_nodeVersion":"v0.4.2","files":[""],"_defaultsLoaded":true,"dist":{"shasum":"ab5f07686ae7f7878e07f652b3e8eb0bbbd97189","tarball":"https://registry.npmjs.org/sam/-/sam-0.0.1.tgz","integrity":"sha512-Cs+jxk38DbLGKq8Sjhf6wZ9LvOdVFwMixuZGXsgUby9CX5Tq3qKqvvDhA4LGhgVq+/i/HMpOhmhuDzoYEoXZOg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfCQOjY7kWt17CVV0BZuMWbYzL3wbMMnqsxzWwFr9NUwIgKjzfw1TEGmX54Lpis2Is4uUtHnifiA/6S+IuX9MzdgI="}]}},"0.0.2":{"name":"sam","version":"0.0.2","description":"simple asset manager","author":{"name":"weepy"},"licenses":[{"type":"MIT","url":"http://github.com/weepy/sam/raw/master/LICENSE"}],"directories":{"lib":"./lib"},"repository":{"type":"git","url":"git://github.com/weepy/sam.git"},"engines":{"node":">= 0.4.0"},"main":"./lib/index","_id":"sam@0.0.2","_engineSupported":true,"_npmVersion":"0.3.15","_nodeVersion":"v0.4.2","files":[""],"_defaultsLoaded":true,"dist":{"shasum":"d8f28ec22eb4ae89a22ac6ad60924fb1f59bbae9","tarball":"https://registry.npmjs.org/sam/-/sam-0.0.2.tgz","integrity":"sha512-gDS1sxArz1KnVaeeZm8HT7YNmmb87onRsC6n9U/pLYy/A4UOaS1PukrZfBVUIUDqdXNMfPW++1SwwjeHtMqQvg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnnMXgmST/ZNFyuNPPCk6wr9maqEQA8DEIIcxHIT6bJgIgdzx45Y57Hzh18guWLtjCS3INEmfqeOPfUWtRBkmQmf4="}]}},"0.0.4":{"name":"sam","version":"0.0.4","description":"Lightweight framework for the SAM pattern","main":"./lib/index.js","scripts":{"build":"npm run clean && ./node_modules/.bin/babel src/ --out-dir lib/","watch":"npm run build -- --watch","clean":"mkdir -p lib && rm -f lib/*","test":"echo \"Error: no test specified\" && exit 1","prepublish":"npm run build"},"author":{"name":"Gunar C. Gessner","email":"gunar@gunargessner.com"},"license":"MIT","devDependencies":{"babel-cli":"^6.6.0","babel-core":"^6.5.2","babel-loader":"^6.2.3","babel-preset-es2015":"^6.3.13","babel-preset-es2015-loose":"^7.0.0","babel-preset-react":"6.3.13","babel-preset-stage-0":"^6.3.13"},"gitHead":"8d20450b619deb7466eb8c22577f217369565f0d","_id":"sam@0.0.4","_shasum":"ae67991cfe035f3b294cbf9c4c4a95c011a0a52d","_from":".","_npmVersion":"3.7.5","_nodeVersion":"5.7.0","_npmUser":{"name":"gunar","email":"gunar@gunargessner.com"},"dist":{"shasum":"ae67991cfe035f3b294cbf9c4c4a95c011a0a52d","tarball":"https://registry.npmjs.org/sam/-/sam-0.0.4.tgz","integrity":"sha512-P2BUcXFggCT/m2JMxlvo9aNLKehoORVEvmDWQ1JThlCczdbaSxT5Gt2umMyRGyoVCepHh8OlKi76yHE9LWDGzw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIACATYdFVDCrGl3HfoVkLd/MBI+8wtwGWn3Ajk545ZQfAiB/oX8JNGChTtnCaQyI5DlRTwb7oqoRNljF+uLS6W7biw=="}]},"maintainers":[{"name":"gunar","email":"gunar@gunargessner.com"},{"name":"weepy","email":"jonahfox@gmail.com"}],"_npmOperationalInternal":{"host":"packages-13-west.internal.npmjs.com","tmp":"tmp/sam-0.0.4.tgz_1457005756986_0.8450091013219208"}},"0.0.5":{"name":"sam","version":"0.0.5","description":"Lightweight framework for the SAM pattern","main":"./lib/index.js","scripts":{"build":"npm run clean && ./node_modules/.bin/babel src/ --out-dir lib/","watch":"npm run build -- --watch","clean":"mkdir -p lib && rm -f lib/*","test":"echo \"Error: no test specified\" && exit 1","prepublish":"npm run build"},"author":{"name":"Gunar C. Gessner","email":"gunar@gunargessner.com"},"license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/sam-js/sam.git"},"keywords":["sam"],"devDependencies":{"babel-cli":"^6.6.0","babel-core":"^6.5.2","babel-loader":"^6.2.3","babel-preset-es2015":"^6.3.13","babel-preset-es2015-loose":"^7.0.0","babel-preset-react":"6.3.13","babel-preset-stage-0":"^6.3.13"},"gitHead":"6fdb2657a89d4ef58cebc60bd35021910edaed67","bugs":{"url":"https://github.com/sam-js/sam/issues"},"homepage":"https://github.com/sam-js/sam#readme","_id":"sam@0.0.5","_shasum":"b39dc933a791fcb8b0bdcb711c7e1f87113c6836","_from":".","_npmVersion":"3.7.5","_nodeVersion":"5.7.0","_npmUser":{"name":"gunar","email":"gunar@gunargessner.com"},"dist":{"shasum":"b39dc933a791fcb8b0bdcb711c7e1f87113c6836","tarball":"https://registry.npmjs.org/sam/-/sam-0.0.5.tgz","integrity":"sha512-3BxkwLeg6hpu2duRFYXgQbmirHKutnKWxKgAYzMzj7tJRxg/JegDc3flPBQX33s3T6wmDAvL5C6FEVBeJjnmCA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSY/YGN1/l1xxoMO/HtGQaoefiuCMvKF6qjIPxj1ByZgIgI3YhLgEUamoi+67tAwjENOfhUdo6O6eGVdWiQjNrF10="}]},"maintainers":[{"name":"gunar","email":"gunar@gunargessner.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/sam-0.0.5.tgz_1457009011755_0.8644853769801557"}},"0.0.6":{"name":"sam","version":"0.0.6","description":"Lightweight framework for the SAM pattern","main":"./lib/index.js","scripts":{"build":"npm run clean && ./node_modules/.bin/babel src/ --out-dir lib/","watch":"npm run build -- --watch","clean":"mkdir -p lib && rm -f lib/*","test":"echo \"Error: no test specified\" && exit 1","prepublish":"npm run build"},"author":{"name":"Gunar C. Gessner","email":"gunar@gunargessner.com"},"license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/sam-js/sam.git"},"keywords":["sam"],"devDependencies":{"babel-cli":"^6.6.0","babel-core":"^6.5.2","babel-preset-es2015":"^6.3.13","babel-preset-es2015-loose":"^7.0.0","babel-preset-react":"6.3.13","babel-preset-stage-0":"^6.3.13"},"gitHead":"73d866743f78a283dd698abae5fae773d6641c1d","bugs":{"url":"https://github.com/sam-js/sam/issues"},"homepage":"https://github.com/sam-js/sam#readme","_id":"sam@0.0.6","_shasum":"ab48cc1221c16b072a6101bcec53a231918495cf","_from":".","_npmVersion":"3.7.5","_nodeVersion":"5.7.0","_npmUser":{"name":"gunar","email":"gunar@gunargessner.com"},"dist":{"shasum":"ab48cc1221c16b072a6101bcec53a231918495cf","tarball":"https://registry.npmjs.org/sam/-/sam-0.0.6.tgz","integrity":"sha512-0h9q4D721H/VpCLd2dPR05E5w1lbQShdevAtnlkIt42zJS2hhKaI+T4jtI2kcDIFuSLLo2lYjQmpK3aWK4yXmg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCjKl1NAwbo9SgC6E09d3KRi2qa0t/52+JchjoPuJhCvwIhANB7CKZ7vVBFpN9GQS0Pu4zYoaJjOD+uARCRNXyBJTgZ"}]},"maintainers":[{"name":"gunar","email":"gunar@gunargessner.com"}],"_npmOperationalInternal":{"host":"packages-13-west.internal.npmjs.com","tmp":"tmp/sam-0.0.6.tgz_1457035599857_0.36311383987776935"}},"0.0.7":{"name":"sam","version":"0.0.7","description":"Lightweight framework for the SAM pattern","main":"./lib/index.js","scripts":{"build":"npm run clean && ./node_modules/.bin/babel src/ --out-dir lib/","watch":"npm run build -- --watch","clean":"mkdir -p lib && rm -f lib/*","test":"echo \"Error: no test specified\" && exit 1","prepublish":"npm run build"},"author":{"name":"Gunar C. Gessner","email":"gunar@gunargessner.com"},"license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/sam-js/sam.git"},"keywords":["sam"],"devDependencies":{"babel-cli":"^6.6.0","babel-core":"^6.5.2","babel-preset-es2015":"^6.3.13","babel-preset-es2015-loose":"^7.0.0","babel-preset-react":"6.3.13","babel-preset-stage-0":"^6.3.13"},"gitHead":"ab3fe8ea566f0ec79f81d79a17ad87570aea1c79","bugs":{"url":"https://github.com/sam-js/sam/issues"},"homepage":"https://github.com/sam-js/sam#readme","_id":"sam@0.0.7","_shasum":"3b325ae362aaf687a880af887255eee10fcc00f2","_from":".","_npmVersion":"3.8.0","_nodeVersion":"5.9.0","_npmUser":{"name":"gunar","email":"gunar@gunargessner.com"},"dist":{"shasum":"3b325ae362aaf687a880af887255eee10fcc00f2","tarball":"https://registry.npmjs.org/sam/-/sam-0.0.7.tgz","integrity":"sha512-W2Z0guj82Y1ifbWEN73dCjWoJYIpxbadYrjPY8HW6Oen5QGrUn/kelKqlx9c8lVnkh7ElYkq5ITU7boakZN4bQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH8r4wPc++isKCK3P1p9qbdo2qcs8A0BlZDR5ababacBAiB9hLtwjjXWD/zJM7kwHM0HfFvnzvDXNCQCegiPxZdftg=="}]},"maintainers":[{"name":"gunar","email":"gunar@gunargessner.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/sam-0.0.7.tgz_1459036709108_0.7313017039559782"}}},"maintainers":[{"name":"gunar","email":"gunar@gunargessner.com"}],"time":{"modified":"2022-06-26T15:43:16.415Z","created":"2011-03-11T18:20:27.178Z","0.0.1":"2011-03-11T18:20:27.512Z","0.0.2":"2011-03-11T18:21:42.051Z","0.0.3":"2011-04-01T14:29:41.974Z","0.0.4":"2016-03-03T11:49:19.744Z","0.0.5":"2016-03-03T12:43:34.326Z","0.0.6":"2016-03-03T20:06:42.976Z","0.0.7":"2016-03-26T23:58:31.298Z"},"author":{"name":"Gunar C. Gessner","email":"gunar@gunargessner.com"},"readme":"# SAM-JS\n\n> **Note**: Although this is working, this project is still under development and you should not use it for production because the API may still change.\n\n## What is SAM-JS\n\nSAM-JS is a lightweight library for building applications in the SAM architecture.\n\nIt intends to extend the discussion about SAM happening in [Gitter](https://gitter.im/jdubray/sam-architecture).\n\n## What is SAM\n\nSAM is a new reactive/functional pattern that simplifies Front-End architectures by clearly separating the business logic from the view and, in particular, strictly decoupling back-end APIs from the Front-End. SAM is technology independent and as such can be used to build Web Apps or Native Apps. It is also protocol independent and can be implemented over HTTP, WebSockets...\n\nSAM is unapologetically driven by simplicity and challenges the complexity of frameworks like Google's Angular or Facebook's React+JSX+Flux/Redux+Saga+Thunk+GraphQL+Relay. \n\n[more](http://jdubray.github.io/sam/)\n\n## Developer tools\n\n[sam-devtools](https://github.com/sam-js/sam-devtools)\n\n## Example\n\nCheck the [working example with devtools](https://github.com/sam-js/sam-devtools/tree/master/examples/counter).\n\n## The gist\n\nIncreases the counter by clicking **INC**. Launches when counter reaches 10.\n\n```js\nimport { createModel } from 'sam'\n\n// Input: Current store, dataset presented\n// Output: New store\nconst container = (store = {}, dataset = {}) => {\n  if (dataset.increaseBy !== undefined) {\n    store.counter += dataset.increaseBy\n  }\n  if (dataset.launch) {\n    store.launched = true\n  }\n  return store\n}\n\n// Input: Store (from Model)\n// Output: State (to View and nap)\nconst state = store => {\n  return {\n    counter: store.counter,\n    launchImminent: (store.counter == 9),\n    hasLaunched: (store.launched ? true : false),\n  }\n}\n\n// Input: State\n// Output: NAP, i.e. a function which accepts a function (present) and may or may not call it\nconst nap = state => {\n  return present => {\n    if (state.counter == 10 && state.hasLaunched != true) {\n      present({ launch: true })\n    }\n  }\n}\n\nconst initialStore = {\n  counter: 0\n}\n\n// Input: Model\n// Output: Dispatch, i.e. a function which accepts an action and presents values to the model\nconst createDispatch = present => action => {\n  switch (action.type) {\n    case 'INC':\n      present({ increaseBy: 1 })\n      break\n  }\n}\n\nconst model = createModel(container, state, nap, initialStore)\nconst dispatch = createDispatch(model.present)\n\n// You may render the View however you wish\n// e.g. with React\nimport React from 'react'\nimport { render } from 'react-dom'\nmodel.subscribe(state => {\n  render(\n    <App state={state} dispatch={dispatch} />,\n      document.getElementById('root')\n  )\n})\n```\n\n## Thanks\n\n- [JJ Dubray](https://github.com/jdubray) for the SAM architecture and starting the discussion around it.\n- [Redux](https://github.com/reactjs/redux) for promoting many awesome ideas happening in the community.\n- [Jonah Fox](https://github.com/weepy) for handing over the `sam` NPM package name.\n","readmeFilename":"README.md","license":"MIT","homepage":"https://github.com/sam-js/sam#readme","keywords":["sam"],"repository":{"type":"git","url":"git+ssh://git@github.com/sam-js/sam.git"},"bugs":{"url":"https://github.com/sam-js/sam/issues"}}