# andrewplummer/Sugar

A Javascript library for working with native objects.

Repository: https://github.com/andrewplummer/Sugar
Canonical: https://ross.abutalabs.com/products/sugar
Homepage: https://sugarjs.com/
Language: JavaScript
License: MIT
License Family: permissive
Topics: javascript, sugar, native-objects, polyfill, utility-library
Last push: 2024-06-13T16:23:08+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 5531, "days_push": 811, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4504, forks 306 (observed 2026-08-28T04:08:52.460929+00:00)

## What it is
Sugar is a JavaScript utility library for working with native objects like Array, Date, Number, and String, offering expressive methods for dates, arrays, strings, and numbers. It supports modular npm packages, custom builds, chainables, opt-in native extension, and polyfills for missing browser features.

## Use cases
- parse natural language dates like 'last week Friday' in JavaScript
- format and manipulate dates with locale support
- compute sum, average, and max over arrays of objects
- truncate long text strings
- polyfill missing ES5 features in older browsers
- chain array operations like concat and unique

## When to choose
- you need expressive date parsing and formatting with many locales
- you want a modular utility library with custom builds
- you need polyfills for older browser environments

## When to avoid
- you prefer modern ES2020+ built-in methods and libraries like date-fns or lodash
- you are wary of libraries that extend native object prototypes
- you need a library with frequent updates and active community

## Facets
- artifact type: library
- maturity: maintenance
- function: date-time, internationalization, developer-tools
- domain: developer-tools, web-development, frontend
- platform: browser, cross-platform
- tags: utility-library, native-objects, polyfill, date-parsing, chainables, javascript, nodejs

## Member repositories
- andrewplummer/Sugar (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:52.460929+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:20:23.550266+00:00, confidence not recorded.
  - readme: https://github.com/andrewplummer/Sugar (fetched 2026-08-28T04:08:52.460929+00:00, sha 6846620bb21b)
  - homepage: https://sugarjs.com/ (fetched 2026-08-29T09:06:47.389466+00:00, sha 2ef683939dfd)
  - site_page: https://sugarjs.com/quickstart (fetched 2026-08-29T09:06:47.398634+00:00, sha 1470d165c9d3)
  - site_page: https://sugarjs.com/docs (fetched 2026-08-29T09:06:47.400825+00:00, sha aac0d9a9fcea)
  - registry_npm: https://registry.npmjs.org/sugar (fetched 2026-08-29T09:06:47.406660+00:00, sha 35ec8bba2b11)
  - site_page: https://sugarjs.com/releases (fetched 2026-08-29T09:06:47.403557+00:00, sha 6d37b6072e0a)
  - site_page: https://sugarjs.com/releases/2.0.4 (fetched 2026-08-29T09:06:47.405156+00:00, sha 87161bd2f2d1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
