{"_id":"form.js","_rev":"24-bd73f9dd5869d66b3783642b82bcc2a8","name":"form.js","dist-tags":{"latest":"0.3.0"},"versions":{"0.0.0":{"name":"form.js","version":"0.0.0","license":"MIT","_id":"form.js@0.0.0","maintainers":[{"name":"kael","email":"i@kael.me"}],"dist":{"shasum":"458849f70e03495c512e64274970a04110002d17","tarball":"https://registry.npmjs.org/form.js/-/form.js-0.0.0.tgz","integrity":"sha512-h5O2e9jJHNdyxrBinxrYBKFMR4gdtw1bvU9U2QDwxQ6NFJdK6o7LxYgBcmg8Q15aV73/kZG8mhtfev2kCbocMg==","signatures":[{"sig":"MEUCIAhK8sxWvelQAU375L6/FtqVOUT5BYF49uyxLUWoeA/iAiEA8QNQlX/eN82SHqgG41NksrEMCfczFA/hKtBIhVBvsIY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"458849f70e03495c512e64274970a04110002d17","scripts":{},"_npmUser":{"name":"kael","email":"i@kael.me"},"_npmVersion":"2.5.1","description":"","directories":{},"_nodeVersion":"0.12.1"},"0.0.1":{"name":"form.js","version":"0.0.1","keywords":["form.js"],"author":{"name":"kaelzhang"},"license":"MIT","_id":"form.js@0.0.1","maintainers":[{"name":"kael","email":"i@kael.me"}],"homepage":"https://github.com/kaelzhang/form.js#readme","bugs":{"url":"https://github.com/kaelzhang/form.js/issues"},"dist":{"shasum":"bc3f817723dbbaf16495b68cef6e440255a44fda","tarball":"https://registry.npmjs.org/form.js/-/form.js-0.0.1.tgz","integrity":"sha512-l5Rh5jmNkOB7Us0n+Qot3BF9sZn9syhw1Ty5iLUw0T8snTly2mGEa3hy8TIyN4j2w8s/oGRKwRNadBu3KE6Nyw==","signatures":[{"sig":"MEUCIQCdIH23gl8gzYn98ePc18RpYHiljk+Ll9AiWbgQfId6PgIgZKJ1XBj2AlE4r1FsGW0bGDI91BE2q2m0SGtOIPlkYlg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"bc3f817723dbbaf16495b68cef6e440255a44fda","engines":{"node":">=0.10.0"},"gitHead":"9d55dcc1e901f856c316f2381387530f4c461496","scripts":{"test":"mocha --reporter spec ./test/*.js"},"_npmUser":{"name":"kael","email":"i@kael.me"},"repository":{"url":"git://github.com/kaelzhang/form.js.git","type":"git"},"_npmVersion":"3.3.9","description":"form.js","directories":{},"_nodeVersion":"0.12.1","devDependencies":{"chai":"*","mocha":"*"}},"0.2.0":{"name":"form.js","version":"0.2.0","keywords":["form","forms","contact","email","signup","submissions","hanzo"],"author":{"name":"Hanzo, Inc","email":"hi@hanzo.io"},"license":"MIT","_id":"form.js@0.2.0","maintainers":[{"name":"kael","email":"i@kael.me"},{"name":"zeekay","email":"z@zeekay.io"}],"homepage":"https://github.com/hanzo-io/form.js#readme","bugs":{"url":"https://github.com/hanzo-io/form.js/issues"},"dist":{"shasum":"865595d1eab04e936e0cedfee25e173cc7e16bdc","tarball":"https://registry.npmjs.org/form.js/-/form.js-0.2.0.tgz","integrity":"sha512-G4oVjFrPeNQJ70S2jvn7/N/ukhRreLtV8UFHGnAUovAU0/tns+1QqRSw1lOrFsrTCZd2xodueWq57WboLvj6Tw==","signatures":[{"sig":"MEUCIEa/BkkvfTJAY/0ksGKdX+Xf9n0ywyp2hRNW9XNYL7j/AiEAvxRMpNhJZRTzsNQEvx4lSdnTagKshllRrg4hdJDbAU8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/form.cjs.js","_from":".","files":["lib/","src/"],"module":"lib/form.es.js","_shasum":"865595d1eab04e936e0cedfee25e173cc7e16bdc","gitHead":"5d0624db8665ac5e462ac132beb3d70a0a0d6fcb","scripts":{"test":"cake test","prepublishOnly":"cake build"},"_npmUser":{"name":"zeekay","email":"z@zeekay.io"},"repository":{"url":"git+https://github.com/hanzo-io/form.js.git","type":"git"},"_npmVersion":"4.4.4","description":"Automagic form validation and submission library.","directories":{},"jsnext:main":"lib/form.es.js","_nodeVersion":"7.7.4","dependencies":{"little-emitter":"^0.1.3"},"devDependencies":{"chai":"^3.1.0","mocha":"^3.2.0","connect":"^3.4.0","phantomjs":"^2.1.7","requisite":"^1.9.16","shortcake":"1.2.5","uglify-js":"^2.4.23","cake-bundle":"^0.2.16","webdriverio":"^4.6.2","cake-publish":"0.1.10","cake-version":"0.1.11","serve-static":"^1.10.0","cake-outdated":"^0.1.16","coffee-script":"^1.9.3","selenium-standalone":"^6.1.0"},"_npmOperationalInternal":{"tmp":"tmp/form.js-0.2.0.tgz_1490878416538_0.6054213605821133","host":"packages-12-west.internal.npmjs.com"}},"0.3.0":{"name":"form.js","version":"0.3.0","description":"Automagic form validation and submission library.","main":"lib/form.cjs.js","module":"lib/form.es.js","jsnext:main":"lib/form.es.js","repository":{"type":"git","url":"git+https://github.com/hanzo-io/form.js.git"},"keywords":["form","forms","contact","email","signup","submissions","hanzo"],"author":{"name":"Hanzo, Inc","email":"hi@hanzo.io"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/hanzo-io/form.js/issues"},"homepage":"https://github.com/hanzo-io/form.js#readme","dependencies":{"little-emitter":"^0.3.5"},"devDependencies":{"cake-bundle":"^0.2.21","cake-outdated":"^0.1.18","cake-publish":"^0.1.10","cake-version":"^0.1.15","chai":"^4.5.0","coffee-script":"^1.12.7","connect":"^3.7.0","mocha":"^3.5.3","phantomjs":"^2.1.7","requisite":"^1.19.17","selenium-standalone":"^6.24.0","serve-static":"^1.16.3","shortcake":"^1.2.8","uglify-js":"^2.8.29","webdriverio":"^4.14.4"},"scripts":{"prepublishOnly":"cake build","test":"cake test"},"gitHead":"3e76449b8abe155c1c8dc739bc13e48919fff523","_id":"form.js@0.3.0","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-f52ws7fJ17zLkP0K+3wvlLyIQv+9xYl7az2l+0iltDbNHH+YVfKTARaRRMSt7uuwGaeDwqoxAClFl1WimztKBw==","shasum":"41b82ffb79f32b5c8c8734dc38b422a10fd4574d","tarball":"https://registry.npmjs.org/form.js/-/form.js-0.3.0.tgz","fileCount":9,"unpackedSize":45335,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAeOB3E4Mm4oCLEiPnV5ojFdGmuD7evyyc9OqHfU35zVAiEA/QK21JrzoRLXcJ8jeK3pPsB6aSCi34/cL+qSlcTZXDU="}]},"_npmUser":{"name":"zeekay","email":"z@zeekay.ai"},"directories":{},"maintainers":[{"name":"hanzo-io","email":"hi@hanzo.ai"},{"name":"zeekay","email":"z@zeekay.ai"},{"name":"artemis-prime","email":"artemisprimedev@gmail.com"},{"name":"zooqueen","email":"a@zoo.ngo"},{"name":"jason_stu","email":"jason4271735@gmail.com"},{"name":"wbeanpro","email":"wbin90620@gmail.com"},{"name":"musordmt","email":"musordmt@proton.me"},{"name":"aputy","email":"aputy.xenn@gmail.com"},{"name":"venuswhispers","email":"venuswhisperer412@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/form.js_0.3.0_1784877065497_0.19631136975979424"},"_hasShrinkwrap":false}},"time":{"created":"2015-08-04T03:51:35.816Z","modified":"2026-07-24T07:11:06.123Z","0.0.0":"2015-08-04T03:51:35.816Z","0.0.1":"2015-11-05T07:39:07.815Z","0.2.0":"2017-03-30T12:53:38.301Z","0.3.0":"2026-07-24T07:11:05.755Z"},"bugs":{"url":"https://github.com/hanzo-io/form.js/issues"},"author":{"name":"Hanzo, Inc","email":"hi@hanzo.io"},"license":"BSD-3-Clause","homepage":"https://github.com/hanzo-io/form.js#readme","keywords":["form","forms","contact","email","signup","submissions","hanzo"],"repository":{"type":"git","url":"git+https://github.com/hanzo-io/form.js.git"},"description":"Automagic form validation and submission library.","maintainers":[{"name":"hanzo-io","email":"hi@hanzo.ai"},{"name":"zeekay","email":"z@zeekay.ai"},{"name":"artemis-prime","email":"artemisprimedev@gmail.com"},{"name":"zooqueen","email":"a@zoo.ngo"},{"name":"jason_stu","email":"jason4271735@gmail.com"},{"name":"wbeanpro","email":"wbin90620@gmail.com"},{"name":"musordmt","email":"musordmt@proton.me"},{"name":"aputy","email":"aputy.xenn@gmail.com"},{"name":"venuswhispers","email":"venuswhisperer412@gmail.com"}],"readme":"# Form.js\n\n[![npm][npm-img]][npm-url]\n[![build][build-img]][build-url]\n[![dependencies][dependencies-img]][dependencies-url]\n[![downloads][downloads-img]][downloads-url]\n[![license][license-img]][license-url]\n[![chat][chat-img]][chat-url]\n\n> Automagic form validation and submission.\n\n## Install\n\n    npm install form.js\n\nOr drop it inside a `<form>` and let it wire itself to the surrounding fields:\n\n    <form>\n      <script src=\"https://unpkg.com/form.js\" data-key=\"pk_live_…\"></script>\n      <input name=\"email\">\n      <button type=\"submit\">Sign up</button>\n    </form>\n\n## Submission\n\nWithout a key, form.js is a thin controller around the surrounding form: it\nemits lifecycle events and hands control back to your page. Set a Hanzo\npublishable key on the script tag and it POSTs the serialized form to the Hanzo\nforms ingest instead:\n\n    POST https://api.hanzo.ai/v1/forms\n    Authorization: Bearer pk_live_…\n    Content-Type: application/json\n\n    { \"email\": \"ada@example.com\", \"metadata\": { \"name\": \"Ada\" } }\n\nScript-tag options (all `data-*`):\n\n| attribute       | purpose                                                |\n| --------------- | ------------------------------------------------------ |\n| `data-key`      | publishable key (`pk_live_…` / `pk_test_…`)            |\n| `data-token`    | `@hanzo/iam` access token (takes precedence over key)  |\n| `data-endpoint` | override the full submission URL                       |\n| `data-host`     | override the API host (default `https://api.hanzo.ai`) |\n\n## Events\n\n`window.Inform` is an event emitter — listen with `Inform.on` / `Inform.once`:\n\n| event                 | `Inform.Events` | arguments                                               |\n| --------------------- | --------------- | ------------------------------------------------------- |\n| `init-inform-script`  | `InitScript`    | the `<script>` element                                  |\n| `init-inform-form`    | `InitForm`      | the `<form>` element                                    |\n| `init-inform-inputs`  | `InitInputs`    | array of input/select nodes                             |\n| `init-inform-submits` | `InitSubmits`   | array of submit buttons                                 |\n| `inform-submit`       | `OnSubmit`      | unmanaged: `(done, event)`; managed: `(payload, event)` |\n| `inform-done`         | `OnDone`        | the submit event, or the API response (managed)         |\n| `inform-error`        | `OnError`       | submission error (managed)                              |\n\nIn unmanaged mode, call `done()` from your `OnSubmit` listener to let the native\nform submit proceed.\n\n## License\n[BSD][license-url]\n\n[examples]:       https://github.com/hanzo-io/form.js/blob/master/test/test.coffee\n\n[build-img]:        https://img.shields.io/travis/hanzo-io/form.js.svg\n[build-url]:        https://travis-ci.org/hanzo-io/form.js\n[chat-img]:         https://badges.gitter.im/join-chat.svg\n[chat-url]:         https://gitter.im/hanzo-io/chat\n[coverage-img]:     https://coveralls.io/repos/hanzo-io/form.js/badge.svg?branch=master&service=github\n[coverage-url]:     https://coveralls.io/github/hanzo-io/form.js?branch=master\n[dependencies-img]: https://david-dm.org/hanzo-io/form.js.svg\n[dependencies-url]: https://david-dm.org/hanzo-io/form.js\n[downloads-img]:    https://img.shields.io/npm/dm/form.js.svg\n[downloads-url]:    http://badge.fury.io/js/form.js\n[license-img]:      https://img.shields.io/npm/l/form.js.svg\n[license-url]:      https://github.com/hanzo-io/form.js/blob/master/LICENSE\n[npm-img]:          https://img.shields.io/npm/v/form.js.svg\n[npm-url]:          https://www.npmjs.com/package/form.js\n","readmeFilename":"README.md"}