{"id":17037446,"url":"https://github.com/robflaherty/firstimpression.js","last_synced_at":"2025-04-12T13:22:34.063Z","repository":{"id":2826820,"uuid":"3829107","full_name":"robflaherty/firstImpression.js","owner":"robflaherty","description":"Micro-library for detecting new users","archived":false,"fork":false,"pushed_at":"2013-05-17T14:50:19.000Z","size":112,"stargazers_count":104,"open_issues_count":0,"forks_count":14,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-26T08:07:01.534Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robflaherty.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-26T02:34:52.000Z","updated_at":"2024-01-12T13:06:04.000Z","dependencies_parsed_at":"2022-07-19T00:02:01.154Z","dependency_job_id":null,"html_url":"https://github.com/robflaherty/firstImpression.js","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robflaherty%2FfirstImpression.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robflaherty%2FfirstImpression.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robflaherty%2FfirstImpression.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robflaherty%2FfirstImpression.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robflaherty","download_url":"https://codeload.github.com/robflaherty/firstImpression.js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248571994,"owners_count":21126559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T08:53:57.380Z","updated_at":"2025-04-12T13:22:34.020Z","avatar_url":"https://github.com/robflaherty.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# firstImpression.js\nfirstImpression is a JavaScript micro-library that answers the question, \"Has this visitor been here before?\" It's mostly a wrapper for a **plain JS** port of [jquery.cookie](https://github.com/carhartl/jquery-cookie). No other libraries required.\n\n`firstImpression()` returns `true` for a new user, `false` for a returning user. Calling `firstImpression()` also sets a cookie if one does not already exist. The default cookie name is `_firstImpression` and the default expiration is 2 years (730 days).\n\n## Usage\n```javascript\n// Basic usage\nif ( firstImpression() ) {\n  console.log('New user');\n}\n\n// Specify cookie name\nif ( firstImpression('foo') ) {\n  console.log('New user');\n}\n\n// Specify cookie name and expiration in days\nif ( firstImpression('foo', 365) ) {\n  console.log('New user');\n}\n```\n\n## Removing cookies\n```javascript\n// Remove default cookie\nfirstImpression(null);\n\n// Remove custom named cookie\nfirstImpression('foo', null);\n```\n## Browser Support\nThis should work in any browser that supports cookies. Tested in Chrome, Firefox, Opera, IE6-10, iOS, Android, and Opera Mobile.\n\n## Contact\n[@robflaherty](https://twitter.com/#!/robflaherty)\n\n## License\nLicensed under the MIT and GPL licenses.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobflaherty%2Ffirstimpression.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobflaherty%2Ffirstimpression.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobflaherty%2Ffirstimpression.js/lists"}