{"_id":"@codewithkyle/state-manager","_rev":"2-5a7424b20d5c13b734dfcad0aac9bbfa","name":"@codewithkyle/state-manager","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.2":{"name":"@codewithkyle/state-manager","version":"1.0.2","description":"Manages custom pushState, replaceState, and popstates.","keywords":["pushstate","navigation","popstate"],"main":"manager.js","types":"./src/global.d.ts","husky":{"hooks":{"pre-commit":"npm run precommit"}},"scripts":{"precommit":"tslint -c .tslintrc.js -p tsconfig.json -t verbose","compile":"tsc","bundle":"webpack","demo":"http-server ./docs -o","test":"npm run compile && npm run bundle && npm run demo"},"repository":{"type":"git","url":"git+https://github.com/codewithkyle/state-manager.git"},"author":{"name":"Kyle Andrews","email":"andrewskyle28@gmail.com","url":"http://codewithkyle.com/"},"license":"MIT","bugs":{"url":"https://github.com/codewithkyle/state-manager/issues"},"devDependencies":{"http-server":"^0.11.1","husky":"^1.3.1","tslint":"^5.12.1","tslint-config-airbnb":"^5.11.1","tslint-config-prettier":"^1.18.0","typescript":"^3.3.3333","webpack":"^4.29.6","webpack-cli":"^3.3.0"},"gitHead":"79257bf939a4d45d832ee423fac4e4d84352b6e2","homepage":"https://github.com/codewithkyle/state-manager#readme","_id":"@codewithkyle/state-manager@1.0.2","_nodeVersion":"11.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-OIltvL5DnOA+5Za+HCUTP8H4d/GoS6vfA0INMf7CvmBU1wmdrFI4mXcm5dAVb7SMFU/a/b1t3UdrfzqtrB7DtA==","shasum":"e4dce1f8401640972b6f8dbfe1ac77ca6d65d79b","tarball":"https://registry.npmjs.org/@codewithkyle/state-manager/-/state-manager-1.0.2.tgz","fileCount":11,"unpackedSize":14168,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmhPuCRA9TVsSAnZWagAAd6kQAJrNgC4cChDqwLO6IeR3\nJ0czwMRPZJNE3Iu52xWMNpJ246fCLUQDZFSs/7gNRXRvZ/jma0zoLExTphz1\n//5Wtq4rolXMEYbq1VDaFmff2v/++vF1arREdbQMSyj+Q3MW1R+/tBEM8Jqs\nhcXtbQOdL+7j7lGtjm/94QfCqQ1sbizWCFFsK4VuaOlfg8RssaNqHEPy0ek1\nIWaaMCtopN6GpT2u/i/ddKp38whTvr+5XgtJCpQb8ksPPQY7Znwt7HL3scus\n36LnpqZEJP5cn5OWXlenhVyHMGuyIZHQSR0u1F4DRDTKQDD5sYD8yT8us/jA\nbFyXczBuZQ9Y8eQuIDZfk9mjX6h7o9i2tZ5vvhdvSv1juL8UGFU/7iSTgyUt\nM5aM9LnRr4sm751j7J1jUDDj0zevmNm07f3zZMaFeQHkdPTn47pKPJdjgrur\nrV7HsryGCFRkVE59dy9Tb6EhHSWCMU/f7SAq3bPemXmdUFgRA4leZGIfnS8k\nMWpw87Gk3Jqt0dWOJ3q2stH9hWtp4rMRDHa0V5PgQOT9ssnHHeJoZ9IILUb1\nZ1xjYCMYiqMT0JlS5z0HfuMAJWJTxWd++lY9pgXAM5fjvrkFGz9FftVD3WGh\nGUppdRP9h8eJoowUa4jHcl/lxc0TU74285UoNQqlbaKjpCrf0QHfjGb0v7x3\n3qPL\r\n=iQCX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIALsNF3CsUEFLrnuAYgc5p6Na8O7PGytyUKBb5cUk0O2AiEAyNxq3hTdkBWeVSyVUZ0iEQNsdlfObH9G8o/awHiq5gc="}]},"maintainers":[{"name":"codewithkyle","email":"andrewskyle28@gmail.com"}],"_npmUser":{"name":"codewithkyle","email":"andrewskyle28@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/state-manager_1.0.2_1553601517384_0.19496681864976706"},"_hasShrinkwrap":false,"deprecated":"This package has been deprecated, consider using @pageworks/state-manager instead"}},"time":{"created":"2019-03-26T11:58:37.203Z","1.0.2":"2019-03-26T11:58:37.505Z","modified":"2022-04-05T00:07:56.994Z"},"maintainers":[{"name":"codewithkyle","email":"andrewskyle28@gmail.com"}],"description":"Manages custom pushState, replaceState, and popstates.","homepage":"https://github.com/codewithkyle/state-manager#readme","keywords":["pushstate","navigation","popstate"],"repository":{"type":"git","url":"git+https://github.com/codewithkyle/state-manager.git"},"author":{"name":"Kyle Andrews","email":"andrewskyle28@gmail.com","url":"http://codewithkyle.com/"},"bugs":{"url":"https://github.com/codewithkyle/state-manager/issues"},"license":"MIT","readme":"# State Manager\nA TypeScript module for building custom pushStates, replaceStates, and popstates.\n\n### Installation\nAdd State Manager to any project using the NPM packages `npm i --save fuel-state-manager`. Then import the `StateManager` class into your main application using `import StateManager from 'fuel-state-manager'`.\n\n### Using The State Manager\nStart by instantiating a new `StateManager` class with `new StateManager();`. The State Manager class take two optional parameters. First is a boolean for enabling debug mode, by default this value is `false`. The second value is a boolean telling State Manager if an initial `window.replaceState` needs to happen, by default this value is `false`.\n\nThe State Manager offers two static functions that can be called to handle the windows push states and replace states.\n\n| Function            | Role                                                                          |\n| ------------------- |:----------------------------------------------------------------------------- |\n| `doPush`            | Creates a custom state object before calling the `window.pushState` method    |\n| `doReplace`         | Creates a custom state object before calling the `window.replaceState` method |\n\n","readmeFilename":"README.md"}