{"_id":"@acjlabs/apparel-attribute-utils","_rev":"4-1c81705efc1d509fc05eefbfec4f38c7","name":"@acjlabs/apparel-attribute-utils","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@acjlabs/apparel-attribute-utils","version":"0.1.0","keywords":["apparel","ecommerce","product-catalog","size","color","normalization","taxonomy"],"author":{"url":"ACJ","name":"Agentic Commerce Junction","email":"contact@acjlabs.com"},"license":"MIT","_id":"@acjlabs/apparel-attribute-utils@0.1.0","maintainers":[{"name":"acjlabsdev","email":"npm@acjlabs.com"}],"homepage":"https://github.com/acjlabs/apparel-attribute-utils#readme","bugs":{"url":"https://github.com/acjlabs/apparel-attribute-utils/issues"},"dist":{"shasum":"7e9cd75fb222fbbd1df2f3c29313348d5e481cb3","tarball":"https://registry.npmjs.org/@acjlabs/apparel-attribute-utils/-/apparel-attribute-utils-0.1.0.tgz","fileCount":9,"integrity":"sha512-ARdhqLgsSq5KvHDIzI07DpDSJalNNqPKiRKocP8BXUszQxBPaLuai8dGwZtOu4S5ZuVfGlYMX1dwRoNV3iX2VQ==","signatures":[{"sig":"MEUCIF9p3o+umFcLChtnB0b0gBwMRVAZVsx9LGp+coxvTR7qAiEAvgCigLB+4lO5aNM4twuhNoL77DKMgQsPJXlgDNBdt30=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16197},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"3e71179696db08304f5d7fcce95413480fc80127","scripts":{"test":"bun test","build":"rm -rf dist && tsc -p tsconfig.build.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"acjlabsdev","email":"npm@acjlabs.com"},"repository":{"url":"git+https://github.com/acjlabs/apparel-attribute-utils.git","type":"git"},"_npmVersion":"10.9.2","description":"Zero-dependency apparel size and color canonicalization — normalizes messy synonyms (\"Medium\", \"2XL\", \"navy blue\") to a fixed controlled vocabulary.","directories":{},"sideEffects":false,"_nodeVersion":"22.17.1","_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"7.0.2"},"_npmOperationalInternal":{"tmp":"tmp/apparel-attribute-utils_0.1.0_1784697539401_0.1909732536549229","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@acjlabs/apparel-attribute-utils","version":"0.1.1","keywords":["apparel","ecommerce","product-catalog","size","color","normalization","taxonomy"],"author":{"url":"ACJ","name":"Agentic Commerce Junction","email":"contact@acjlabs.com"},"license":"MIT","_id":"@acjlabs/apparel-attribute-utils@0.1.1","maintainers":[{"name":"acjlabsdev","email":"npm@acjlabs.com"}],"homepage":"https://github.com/acjlabs/apparel-attribute-utils#readme","bugs":{"url":"https://github.com/acjlabs/apparel-attribute-utils/issues"},"dist":{"shasum":"f6d6e9a69e589ac96c82c8551fa6fb53aa56743f","tarball":"https://registry.npmjs.org/@acjlabs/apparel-attribute-utils/-/apparel-attribute-utils-0.1.1.tgz","fileCount":9,"integrity":"sha512-D2c25l+Hg1HxwKvGZnF4HEvYLIM24B35zpnwSDYsrzS+JYUdo10YBmwXU9FGOceKwQAuhmctk1F9lIV4lxB8mg==","signatures":[{"sig":"MEUCIQCVgjfUfbW+LLuMF9OBfug4wUO00MvkiQhxe7aUqM/qrAIgYcgKVBcUZ+uZZEEKme0HrYHnqdIXmxlppNeOIf/937A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16241},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"c8f6181bc24e9d7efec73b58c75978116273026f","scripts":{"test":"bun test","build":"rm -rf dist && tsc -p tsconfig.build.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"acjlabsdev","email":"npm@acjlabs.com"},"repository":{"url":"git+https://github.com/acjlabs/apparel-attribute-utils.git","type":"git"},"_npmVersion":"10.9.2","description":"Zero-dependency apparel size and color canonicalization — normalizes messy synonyms (\"Medium\", \"2XL\", \"navy blue\") to a fixed controlled vocabulary.","directories":{},"sideEffects":false,"_nodeVersion":"22.17.1","_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"7.0.2"},"_npmOperationalInternal":{"tmp":"tmp/apparel-attribute-utils_0.1.1_1784697952854_0.6933482988429391","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@acjlabs/apparel-attribute-utils","version":"0.1.2","keywords":["apparel","ecommerce","product-catalog","size","color","normalization","taxonomy"],"author":{"url":"https://acjlabs.com","name":"ACJ Labs","email":"contact@acjlabs.com"},"license":"MIT","_id":"@acjlabs/apparel-attribute-utils@0.1.2","maintainers":[{"name":"acjlabsdev","email":"npm@acjlabs.com"}],"homepage":"https://github.com/acjlabs/apparel-attribute-utils#readme","bugs":{"url":"https://github.com/acjlabs/apparel-attribute-utils/issues"},"dist":{"shasum":"a309b796f9c25643e41e956e7b06f6792a189c82","tarball":"https://registry.npmjs.org/@acjlabs/apparel-attribute-utils/-/apparel-attribute-utils-0.1.2.tgz","fileCount":9,"integrity":"sha512-PeDbTPMrSYD/jjQg8vecY92f+3cda1/YLP1KgZU/vdoAuF5V0/HKzIOw/CGpjddl5iTOQOsluNfEfNr8BrisLw==","signatures":[{"sig":"MEUCIAPWoySjvEIGuIHAeLvNjVlnGhNxcwQvKozsKOAc4c2KAiEAtiiOP6DtQnp/jvkgF3+s46/NPW+BdXobZmu5UDUZZBk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16131},"main":"./dist/index.js","type":"module","_from":"file:acjlabs-apparel-attribute-utils-0.1.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"test":"bun test","build":"rm -rf dist && tsc -p tsconfig.build.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"acjlabsdev","email":"npm@acjlabs.com"},"_resolved":"/tmp/acjlabs-publish/acjlabs-apparel-attribute-utils-0.1.2.tgz","_integrity":"sha512-PeDbTPMrSYD/jjQg8vecY92f+3cda1/YLP1KgZU/vdoAuF5V0/HKzIOw/CGpjddl5iTOQOsluNfEfNr8BrisLw==","repository":{"url":"git+https://github.com/acjlabs/apparel-attribute-utils.git","type":"git"},"_npmVersion":"10.9.2","description":"Zero-dependency apparel size and color canonicalization — normalizes messy synonyms (\"Medium\", \"2XL\", \"navy blue\") to a fixed controlled vocabulary.","directories":{},"sideEffects":false,"_nodeVersion":"22.17.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/apparel-attribute-utils_0.1.2_1784784965872_0.4643892564420087","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@acjlabs/apparel-attribute-utils","version":"0.1.3","description":"Zero-dependency apparel size and color canonicalization — normalizes messy synonyms (\"Medium\", \"2XL\", \"navy blue\") to a fixed controlled vocabulary.","license":"MIT","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"sideEffects":false,"scripts":{"build":"rm -rf dist && tsc -p tsconfig.build.json","test":"bun test","typecheck":"tsc --noEmit"},"keywords":["apparel","ecommerce","product-catalog","size","color","normalization","taxonomy"],"repository":{"type":"git","url":"git+https://github.com/acjlabs/apparel-attribute-utils.git"},"homepage":"https://acjlabs.com/open-source","bugs":{"url":"https://github.com/acjlabs/apparel-attribute-utils/issues"},"author":{"name":"ACJ Labs","email":"contact@acjlabs.com","url":"https://acjlabs.com"},"_id":"@acjlabs/apparel-attribute-utils@0.1.3","_integrity":"sha512-tactLajsutFHD3Vb/+Ac7yaeBdO7RFiZU+23hoOmPrYO8Sxhf3Lkrc2N5cSHQEXuem2v4hcOJDbr93cNvaX0Nw==","_resolved":"/tmp/acjlabs-publish/acjlabs-apparel-attribute-utils-0.1.3.tgz","_from":"file:acjlabs-apparel-attribute-utils-0.1.3.tgz","_nodeVersion":"22.17.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-tactLajsutFHD3Vb/+Ac7yaeBdO7RFiZU+23hoOmPrYO8Sxhf3Lkrc2N5cSHQEXuem2v4hcOJDbr93cNvaX0Nw==","shasum":"9444ea258512cd69556a1d280ee44d1bdf3a991d","tarball":"https://registry.npmjs.org/@acjlabs/apparel-attribute-utils/-/apparel-attribute-utils-0.1.3.tgz","fileCount":9,"unpackedSize":16105,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCfB+0cxM7qbz1/lx/cQdhSNK7B0Gg81LfQBrV+af+/CAIgRzZBEobkZ2g11L/U3dLh/qPvACkmTykVZG1yJ6BrvnE="}]},"_npmUser":{"name":"acjlabsdev","email":"npm@acjlabs.com"},"directories":{},"maintainers":[{"name":"acjlabsdev","email":"npm@acjlabs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/apparel-attribute-utils_0.1.3_1784964911834_0.15682173072927053"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-22T05:18:59.274Z","modified":"2026-07-25T07:35:12.118Z","0.1.0":"2026-07-22T05:18:59.591Z","0.1.1":"2026-07-22T05:25:53.030Z","0.1.2":"2026-07-23T05:36:05.995Z","0.1.3":"2026-07-25T07:35:11.962Z"},"bugs":{"url":"https://github.com/acjlabs/apparel-attribute-utils/issues"},"author":{"name":"ACJ Labs","email":"contact@acjlabs.com","url":"https://acjlabs.com"},"license":"MIT","homepage":"https://acjlabs.com/open-source","keywords":["apparel","ecommerce","product-catalog","size","color","normalization","taxonomy"],"repository":{"type":"git","url":"git+https://github.com/acjlabs/apparel-attribute-utils.git"},"description":"Zero-dependency apparel size and color canonicalization — normalizes messy synonyms (\"Medium\", \"2XL\", \"navy blue\") to a fixed controlled vocabulary.","maintainers":[{"name":"acjlabsdev","email":"npm@acjlabs.com"}],"readme":"# @acjlabs/apparel-attribute-utils\n\nZero-dependency apparel size and color canonicalization. TypeScript, works in Node, Bun, Deno, and the\nbrowser — no network calls, no external services, no LLM.\n\n## Install\n\n```sh\nnpm install @acjlabs/apparel-attribute-utils\n```\n\n## What's in it\n\n### Size normalization\n\n```ts\nimport { normalizeSize } from \"@acjlabs/apparel-attribute-utils\";\n\nnormalizeSize(\"Medium\"); // \"M\"\nnormalizeSize(\"2XL\"); // \"XXL\"\nnormalizeSize(\"x-small\"); // \"XS\"\nnormalizeSize(\"32x34\"); // \"32x34\" — numeric sizes pass through unchanged\nnormalizeSize(\"this shirt runs medium-ish\"); // null — no guessing\n```\n\nCanonicalizes letter sizes and their common synonyms/abbreviations\n(`XXS`/`XS`/`S`/`M`/`L`/`XL`/`XXL`/`XXXL`) case- and whitespace-insensitively. Numeric sizes (waist,\ninseam, shoe size — `\"32\"`, `\"10.5\"`, `\"32x34\"`) pass through unchanged since they're already\nunambiguous. Anything it doesn't recognize returns `null` rather than a guess.\n\n### Color normalization\n\n```ts\nimport { normalizeColor } from \"@acjlabs/apparel-attribute-utils\";\n\nnormalizeColor(\"navy blue\"); // \"navy\"\nnormalizeColor(\"Heather Gray\"); // \"gray\"\nnormalizeColor(\"rose gold\"); // \"rose\"\nnormalizeColor(\"a lovely shade of blue-ish grey\"); // null — no guessing\n```\n\nCanonicalizes ~90 common color-name synonyms down to a controlled vocabulary of 25 apparel colors (see\n`COLORS` export) — distinguishing visually distinct families a naive \"20 basic colors\" list collapses,\nlike `off-white` vs. `white`, `charcoal` vs. `gray`, `rose`/`lavender` as their own pastel buckets, and\n`gold` as a metallic distinct from `yellow`. Unrecognized input returns `null`.\n\n## Why this exists\n\nWe build [Catalog Attribute Normalizer](https://github.com/acjlabs/catalog-normalizer), a hosted API/MCP\nserver that cleans messy merchant product data and maps it to taxonomy paths using LLM classification.\nThis package is the small, deterministic piece of that: the actual size/color canonicalization rules,\nwith no model call, no hosting, no API key — just the lookup tables and normalization logic,\nMIT-licensed, for anyone who needs that piece on its own (a catalog importer, a feed-cleanup script, a\nCSV normalizer).\n\n## Scope\n\nDeliberately conservative by design: both functions return `null` for anything outside their controlled\nvocabulary rather than guess. If you need free-text/ambiguous size or color descriptions resolved (not\njust already-recognizable synonyms canonicalized), that's a classification problem this package doesn't\nattempt — see Catalog Attribute Normalizer above for that.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}