{"id":24377635,"url":"https://github.com/enescang/helpful-js","last_synced_at":"2026-05-20T05:09:34.682Z","repository":{"id":57262732,"uuid":"317516633","full_name":"enescang/helpful-js","owner":"enescang","description":"Helpful javascript functions and validations","archived":false,"fork":false,"pushed_at":"2021-01-04T18:45:21.000Z","size":115,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-09T07:46:53.384Z","etag":null,"topics":["javascript","js-utils","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/helpful-js-utils","language":"TypeScript","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/enescang.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":"2020-12-01T11:14:40.000Z","updated_at":"2021-12-03T13:02:56.000Z","dependencies_parsed_at":"2022-09-01T04:31:56.845Z","dependency_job_id":null,"html_url":"https://github.com/enescang/helpful-js","commit_stats":null,"previous_names":["kodcanlisi/helpful-js"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/enescang/helpful-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enescang%2Fhelpful-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enescang%2Fhelpful-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enescang%2Fhelpful-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enescang%2Fhelpful-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enescang","download_url":"https://codeload.github.com/enescang/helpful-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enescang%2Fhelpful-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273699691,"owners_count":25152283,"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","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["javascript","js-utils","typescript"],"created_at":"2025-01-19T06:16:30.823Z","updated_at":"2026-05-20T05:09:34.653Z","avatar_url":"https://github.com/enescang.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Helpful JS\r\n## Getting Started\r\nMy aim is creating npm package with typescript using jest and eslint. In addition learning typescript interfaces, enums, types and others.\r\n\r\nInstallation\r\n----\r\n```\r\n$: npm i helpful-js-utils\r\n```\r\nUsage\r\n--\r\nCreate an instance like this:\r\n``` js \r\nimport HelpfulJs from  'helpful-js-utils';\r\n\r\nconst helper =  new  HelpfulJs();\r\n```\r\nYou can use the \u003ccode\u003eset\u003c/code\u003e method to insert your input the helper. \r\n\r\n## min \r\nIf the input is less than given number in min methods.\r\nThere are 2 overrides:\r\n* min(num: number)\r\n* min(num: number, inclusive: boolean)\r\nThe \u003ccode\u003einclusive\u003c/code\u003e variable is \u003cb\u003etrue\u003c/b\u003e as default value.\r\nCheck the below example:\r\n``` js\r\n const myInput = 32;\r\n helper.set(myInput).min(10); // true: 32 \u003e= 10\r\n helper.set(myInput).min(40); // false: 32 \u003e= 40\r\n helper.set(myInput).min(32, false); // false: 32 \u003e 32\r\n helper.set(myInput).min(32, true); // true: 32 \u003e= 32\r\n```\r\n## max\r\nIf the input is greater than given number in max methods.\r\nThere are 2 overrides:\r\n* max(num: number)\r\n* max(num: number, inclusive: boolean)\r\nThe \u003ccode\u003einclusive\u003c/code\u003e variable is \u003cb\u003etrue\u003c/b\u003e as default value.\r\n\r\n``` js\r\nconst myInput = 23;\r\nhelper.set(myInput).max(10); // false: 23 \u003c= 10\r\nhelper.set(myInput).max(40); // true: 32 \u003c= 40\r\nhelper.set(myInput).max(23, false); // false: 23 \u003c 23\r\nhelper.set(myInput).max(23, true); // true: 23 \u003c= 23\r\n```\r\n\r\n## between\r\nIf the input is between min and max number in between methods.\r\n``` js\r\nhelper.set(12).between(10, 19); // true\r\nhelper.set(7).between(0, 6); // false\r\nhelper.set(10).between(10, 10); // true\r\n```\r\n\r\n## mustInclude\r\nIf the input (object) has not the properties that given in mustInclude methods it will throw an Error.\r\n``` js\r\nconst obj = {\r\nname: 'foo',\r\nother: 'bar'\r\n};\r\nhelper.set(obj).mustInclude(['name', 'surname']); // throw new Error(...);\r\nhelper.set(obj).mustInclude(['name', 'other']); // not throwing any Error\r\n```\r\n\r\n## canBeAny\r\nIf the input value is not match any value of inside the canBeAny paramater it will throw an Error.\r\n``` js\r\nhelper.set('enes').canBeAny('can|database'); // throw new Error(...)\r\nhelper.set('kodlib').canBeAny('enes|kodlib|github'); // not throwing any Error\r\nhelper.set('github').canBeAny(['git', 'helper','db']); //throw new Error(...)\r\nhelper.set('hello').canBeAny(['git', 'hello']); // not throwing any Error\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenescang%2Fhelpful-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenescang%2Fhelpful-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenescang%2Fhelpful-js/lists"}