PHPackages                             data-values/javascript - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. data-values/javascript

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

data-values/javascript
======================

DataValues implementation in JavaScript

0.9.0(8y ago)476.6k1[13 PRs](https://github.com/wmde/DataValuesJavaScript/pulls)3GPL-2.0+JavaScriptPHP &gt;=5.5.9

Since Dec 23Pushed 1y ago23 watchersCompare

[ Source](https://github.com/wmde/DataValuesJavaScript)[ Packagist](https://packagist.org/packages/data-values/javascript)[ RSS](/packages/data-values-javascript/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (1)Versions (24)Used By (3)

DataValues JavaScript
=====================

[](#datavalues-javascript)

This library contains JavaScript implementations of all basic DataValue classes used in the [Wikibase software](http://wikiba.se/), along with associated parsers and formatters. This library mirrors most of the PHP implementations of DataValue classes as specified in the [DataValues set of libraries](https://github.com/DataValues) (most notably the [basic](https://github.com/DataValues/DataValues), [Geo](https://github.com/DataValues/Geo), [Number](https://github.com/DataValues/Number), and [Time](https://github.com/DataValues/Time) libraries).

[![Build Status](https://github.com/wmde/DataValuesJavaScript/actions/workflows/ci.yaml/badge.svg?branch=master)](https://github.com/wmde/DataValuesJavaScript/actions/workflows/ci.yaml)

Release notes
-------------

[](#release-notes)

### 0.11.0 (dev)

[](#0110-dev)

- Removed `globeCoordinate.GlobeCoordinate.getDecimal`
- Removed `getLowerBound`, `getUpperBound`, `getAmount` from QuantityValue
- Removed support for Node.js versions older than v10

### 0.10.0 (2017-10-06)

[](#0100-2017-10-06)

- The library is now a pure JavaScript library.
- Removed MediaWiki ResourceLoader module definitions.
- Removed `globeCoordinate.Formatter`.
- Removed the `globeCoordinate` utility class.

### 0.9.0 (2017-09-06)

[](#090-2017-09-06)

- Removed `valueFormatters.ValueFormatterStore`.
- Removed the `options` constructor parameter as well as the `getOptions` method from `valueFormatters.ValueFormatter`.
- Removed `dataValues.DataValue.getSortKey` from the interface and all implementations.
- Removed `dataValues.TimeValue.getYear`, `getMonth`, `getDay`, `getHour`, `getMinute`, and `getSecond`.
- Removed `globeCoordinate.GlobeCoordinate.iso6709`.
- Declared `globeCoordinate.GlobeCoordinate.getDecimal` private.

### 0.8.4 (2017-07-18)

[](#084-2017-07-18)

- Updated JSDoc tags mistakenly requiring objects.
- Removed an unused dependency on `composer/installers`.
- Raised required PHP version from 5.3 to 5.5.9.

### 0.8.3 (2016-11-07)

[](#083-2016-11-07)

- `QuantityValue` now supports unknown upper and lower bounds, required for compatibility with DataValues Number 0.8.0.

### 0.8.2 (2016-04-12)

[](#082-2016-04-12)

- Added 1/10000 of an arcsecond as a known precision to `globeCoordinate.Formatter`.
- Fixed `globeCoordinate.Formatter.PRECISIONTEXT` not properly supporting precisions lower than 1/1000 of an arcsecond.

### 0.8.1 (2016-04-08)

[](#081-2016-04-08)

- Added support for undefined `precision` to `globeCoordinate.GlobeCoordinate`.
- Added `globe` support to `globeCoordinate.GlobeCoordinate`.

### 0.8.0 (2016-01-07)

[](#080-2016-01-07)

#### Breaking changes

[](#breaking-changes)

- `valueParsers.StringParser.parse` now resolves empty strings to `null`.
- Renamed string `id`s for the 0 to 6 `dataValues.TimeValue.PRECISIONS` to be identical to the PHP constants in DataValues Time.

### 0.7.0 (2015-06-03)

[](#070-2015-06-03)

#### Breaking changes

[](#breaking-changes-1)

- Renamed `dataValues.UnUnserializableValue` to `dataValues.UnDeserializableValue`.
- Changed constructor parameter order of `dataValues.UnDeserializableValue` (formerly `dataValues.UnUnserializableValue`).
- Removed `time.js` legacy code, including `time.Time` and `time.Parser`. Every "vital" functionality has been ported to `dataValues.TimeValue` which now may be interacted with directly instead of having to retrieve the encapsulated `time.Time` object first.
- Removed obsolete `valueParsers.TimeParser`. Back-end parser is to be used via API.
- Removed obsolete `mw.ext.dataValues` module as it was just overwriting the obsolete `time.js`settings. Dependencies should be updated to point directly to the `dataValues.values` module.

#### Enhancements

[](#enhancements)

- Implemented `toJSON` and `newFromJSON` in `dataValues.UnDeserializableValue`.
- Consolidated code structure, updated and added code documentation to allow generating a proper documentation using JSDuck.

### 0.6.3 (2015-04-01)

[](#063-2015-04-01)

- Remove explicit resource loader dependency on jquery.qunit.

### 0.6.1 (2014-11-07)

[](#061-2014-11-07)

#### Enhancements

[](#enhancements-1)

- `Time` object's month and day attributes default to 0 instead of 1 now.
- Fixed `Time.newFromIso8601()`.
- Improved PhantomJS Testrunner, outputs failed assertions on the console now.
- Improved `globeCoordinate.GlobeCoordinate.equals()`

### 0.6.0 (2014-09-01)

[](#060-2014-09-01)

#### Breaking changes

[](#breaking-changes-2)

- \#40 Removed the arbitrary list of precisions for globe coordinates

#### Enhancements

[](#enhancements-2)

- \#44 Fixed comparing time values
- \#42 Removed 'to a degree' label, now shown as '±1°'
- \#45 Removed constructor naming debugging feature

#### Bugfixes

[](#bugfixes)

- Remove ResourceLoader dependencies on jquery and mediawiki (bug 69468)

### 0.5.1 (2014-06-04)

[](#051-2014-06-04)

#### Bugfixes

[](#bugfixes-1)

- Don't limit precisions of globe coordinates in the UI (allows display of values with a non predefined precision)

### 0.5.0 (2014-03-28)

[](#050-2014-03-28)

#### Breaking changes

[](#breaking-changes-3)

- Renamed ValueFormatterFactory to ValueFormatterStore.
- Renamed ValueParserFactory to ValueParserStore.
- Removed mw.ext.valueFormatters and mw.ext.valueParsers.

#### Enhancements

[](#enhancements-3)

- Defined parameters of the promises returned by ValueFormatter's and ValueParser's format/parse functions.

### 0.4.0 (2014-03-24)

[](#040-2014-03-24)

#### Breaking changes

[](#breaking-changes-4)

- mw.ext.valueParsers does not register valueParsers.TimeParser anymore
- mw.ext.valueFormatters does not register valueFormatters.StringFormatter anymore
- Renamed ValueFormatterFactory to ValueFormatterStore.
- Renamed ValueParserFactory to ValueParserStore.

#### Bugfixes

[](#bugfixes-2)

- Fixed definitions of ResourceLoader test modules.
- Accept timestamp strings with zeroes as months and days
- Always return a string in time.writeYear and time.writeDay

### 0.3.1 (2014-02-03)

[](#031-2014-02-03)

#### Bugfixes

[](#bugfixes-3)

- Fixed valueParsers ResourceLoader module definition template.

### 0.3.0 (2014-01-30)

[](#030-2014-01-30)

#### Breaking changes

[](#breaking-changes-5)

- Renamed "valueFormatters.factory" Resource Loader module to "valueFormatters.ValueFormatterFactory".
- Renamed "valueParsers.factory" Resource Loader module to "valueParsers.ValueParserFactory".
- Removed ValueView dependency from "mw.ext.valueFormatters" module and "mw.ext.valueParsers" module.

### 0.2.0 (2014-01-24)

[](#020-2014-01-24)

#### Breaking changes

[](#breaking-changes-6)

- \#8 Removed dataValues.util.Notifier
- \#10 Renamed dataValues.util.inherit to util.inherit
- \#13 Removed vp.GlobeCoordinateParser and vp.QuantityParser
- \#15 Removed the ParseValue API module

#### Enhancements

[](#enhancements-4)

- \#14 Decoupled the QUnit tests from the MediaWiki resource loader
- \#16 Have the tests run on TravisCI using PhantomJS
- \#18 Provided QUnit test runner using requireJS

### 0.1.0 (2013-12-23)

[](#010-2013-12-23)

Initial release.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community33

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor3

3 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~67 days

Recently: every ~129 days

Total

21

Last Release

3173d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/451bd4039d530fed8f9c3da91bfa519233a397d2182cdfdcad700f6cfea19b7f?d=identicon)[Jeroen De Dauw](/maintainers/Jeroen%20De%20Dauw)

![](https://www.gravatar.com/avatar/054adb441e7ee248ec924bc45fa793835c284710eb31627587fa5de21bab9e96?d=identicon)[wmde](/maintainers/wmde)

![](https://www.gravatar.com/avatar/5406ed1d40d50ffc61d67e9f5149914dbfe0b8a52bdf297299f5ccfab0a73d91?d=identicon)[thiemowmde](/maintainers/thiemowmde)

![](https://www.gravatar.com/avatar/fe4220e5a109212ea1a84969fbcb0795ceaf975145c1f0577bd758d0500e6428?d=identicon)[manicki](/maintainers/manicki)

![](https://www.gravatar.com/avatar/0c1ddc1309ce2f268d42afc35c3065421f8a6d21e4ca25eb338db3a297cdef1b?d=identicon)[DataValues](/maintainers/DataValues)

---

Top Contributors

[![JeroenDeDauw](https://avatars.githubusercontent.com/u/146040?v=4)](https://github.com/JeroenDeDauw "JeroenDeDauw (147 commits)")[![thiemowmde](https://avatars.githubusercontent.com/u/6576639?v=4)](https://github.com/thiemowmde "thiemowmde (87 commits)")[![snaterlicious](https://avatars.githubusercontent.com/u/5755120?v=4)](https://github.com/snaterlicious "snaterlicious (77 commits)")[![DanweDE](https://avatars.githubusercontent.com/u/101926?v=4)](https://github.com/DanweDE "DanweDE (74 commits)")[![translatewiki](https://avatars.githubusercontent.com/u/24829418?v=4)](https://github.com/translatewiki "translatewiki (48 commits)")[![tobijat](https://avatars.githubusercontent.com/u/2997252?v=4)](https://github.com/tobijat "tobijat (42 commits)")[![manicki](https://avatars.githubusercontent.com/u/3524114?v=4)](https://github.com/manicki "manicki (25 commits)")[![adrianheine](https://avatars.githubusercontent.com/u/139208?v=4)](https://github.com/adrianheine "adrianheine (23 commits)")[![Ladsgroup](https://avatars.githubusercontent.com/u/5351225?v=4)](https://github.com/Ladsgroup "Ladsgroup (23 commits)")[![mariushoch](https://avatars.githubusercontent.com/u/2446964?v=4)](https://github.com/mariushoch "mariushoch (18 commits)")[![addshore](https://avatars.githubusercontent.com/u/3308769?v=4)](https://github.com/addshore "addshore (16 commits)")[![JonasKress](https://avatars.githubusercontent.com/u/13198391?v=4)](https://github.com/JonasKress "JonasKress (5 commits)")[![lucaswerkmeister](https://avatars.githubusercontent.com/u/2346599?v=4)](https://github.com/lucaswerkmeister "lucaswerkmeister (4 commits)")[![micgro42](https://avatars.githubusercontent.com/u/7372507?v=4)](https://github.com/micgro42 "micgro42 (3 commits)")[![johl](https://avatars.githubusercontent.com/u/35403?v=4)](https://github.com/johl "johl (3 commits)")[![MuhammadJaziraly](https://avatars.githubusercontent.com/u/119682884?v=4)](https://github.com/MuhammadJaziraly "MuhammadJaziraly (2 commits)")[![filbertkm](https://avatars.githubusercontent.com/u/135401?v=4)](https://github.com/filbertkm "filbertkm (2 commits)")[![ricordisamoa](https://avatars.githubusercontent.com/u/4588496?v=4)](https://github.com/ricordisamoa "ricordisamoa (2 commits)")[![bekh6ex](https://avatars.githubusercontent.com/u/4264331?v=4)](https://github.com/bekh6ex "bekh6ex (1 commits)")[![Silvan-WMDE](https://avatars.githubusercontent.com/u/59574251?v=4)](https://github.com/Silvan-WMDE "Silvan-WMDE (1 commits)")

---

Tags

wikidatadatavalues

### Embed Badge

![Health badge](/badges/data-values-javascript/health.svg)

```
[![Health](https://phpackages.com/badges/data-values-javascript/health.svg)](https://phpackages.com/packages/data-values-javascript)
```

###  Alternatives

[data-values/data-values

Defines the DataValue interface and some trivial implementations

171.0M22](/packages/data-values-data-values)[data-values/geo

Geographical value objects, parsers and formatters

20631.0k18](/packages/data-values-geo)[data-values/number

Numerical value objects, parsers and formatters

18303.0k14](/packages/data-values-number)[data-values/time

Time value objects, parsers and formatters

10318.6k14](/packages/data-values-time)[data-values/common

Contains common implementations of the interfaces defined by DataValuesInterfaces

11934.5k13](/packages/data-values-common)[aneeshikmat/yii2-time-down-counter

Widget for yii2, to start count down timer with a lot of options, This widget build dependence of timeDownCounter JS library

1546.0k](/packages/aneeshikmat-yii2-time-down-counter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
