Socket
Socket
Sign inDemoInstall

globalize

Package Overview
Dependencies
Maintainers
3
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

globalize - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

examples/app-npm-webpack-2/.npmignore

6

dist/globalize-runtime.js
/**
* Globalize Runtime v1.2.2
* Globalize Runtime v1.2.3
*

@@ -10,6 +10,6 @@ * http://github.com/jquery/globalize

*
* Date: 2016-12-31T15:52Z
* Date: 2017-03-17T01:41Z
*/
/*!
* Globalize Runtime v1.2.2 2016-12-31T15:52Z Released under the MIT license
* Globalize Runtime v1.2.3 2017-03-17T01:41Z Released under the MIT license
* http://git.io/TrdQbw

@@ -16,0 +16,0 @@ */

/**
* Globalize Runtime v1.2.2
* Globalize Runtime v1.2.3
*

@@ -10,6 +10,6 @@ * http://github.com/jquery/globalize

*
* Date: 2016-12-31T15:52Z
* Date: 2017-03-17T01:41Z
*/
/*!
* Globalize Runtime v1.2.2 2016-12-31T15:52Z Released under the MIT license
* Globalize Runtime v1.2.3 2017-03-17T01:41Z Released under the MIT license
* http://git.io/TrdQbw

@@ -16,0 +16,0 @@ */

/**
* Globalize Runtime v1.2.2
* Globalize Runtime v1.2.3
*

@@ -10,6 +10,6 @@ * http://github.com/jquery/globalize

*
* Date: 2016-12-31T15:52Z
* Date: 2017-03-17T01:41Z
*/
/*!
* Globalize Runtime v1.2.2 2016-12-31T15:52Z Released under the MIT license
* Globalize Runtime v1.2.3 2017-03-17T01:41Z Released under the MIT license
* http://git.io/TrdQbw

@@ -763,3 +763,3 @@ */

case "x":
timezoneOffset = token.value - date.getTimezoneOffset();
timezoneOffset = token.value;
break;

@@ -808,4 +808,4 @@ }

if ( timezoneOffset ) {
date.setMinutes( date.getMinutes() + timezoneOffset );
if ( timezoneOffset !== undefined ) {
date.setMinutes( date.getMinutes() + timezoneOffset - date.getTimezoneOffset() );
}

@@ -953,6 +953,15 @@

numeric = true;
return tokenRe = new RegExp( "(" + regexpN.source + ")(" + regexpN.source + ")?" );
return tokenRe = new RegExp( "(" + regexpN.source + "){1,2}" );
}
}
function oneOrTwoDigitsIfLengthOneOrTwo() {
if ( length === 1 || length === 2 ) {
// Unicode equivalent to /\d\d?/
numeric = true;
return tokenRe = new RegExp( "(" + regexpN.source + "){1,2}" );
}
}
function twoDigitsIfLengthTwo() {

@@ -963,3 +972,3 @@ if ( length === 2 ) {

numeric = true;
return tokenRe = new RegExp( "(" + regexpN.source + ")(" + regexpN.source + ")" );
return tokenRe = new RegExp( "(" + regexpN.source + "){2}" );
}

@@ -1029,4 +1038,7 @@ }

// Unicode equivalent to /\d\d/
tokenRe = new RegExp( "(" + regexpN.source + ")(" + regexpN.source + ")" );
// Lenient parsing: there's no year pattern to indicate non-zero-padded 2-digits
// year, so parser accepts both zero-padded and non-zero-padded for `yy`.
//
// Unicode equivalent to /\d\d?/
tokenRe = new RegExp( "(" + regexpN.source + "){1,2}" );
} else {

@@ -1045,7 +1057,8 @@

// lookup l=3...
oneDigitIfLengthOne() || twoDigitsIfLengthTwo() || lookup([
"gregorian/quarters",
chr === "Q" ? "format" : "stand-alone",
widths[ length - 3 ]
]);
oneDigitIfLengthOne() || twoDigitsIfLengthTwo() ||
lookup([
"gregorian/quarters",
chr === "Q" ? "format" : "stand-alone",
widths[ length - 3 ]
]);
break;

@@ -1059,3 +1072,7 @@

// lookup l=3...
oneOrTwoDigitsIfLengthOne() || twoDigitsIfLengthTwo() || lookup([
//
// Lenient parsing: skeleton "yMd" (i.e., one M) may include MM for the pattern,
// therefore parser accepts both zero-padded and non-zero-padded for M and MM.
// Similar for L.
oneOrTwoDigitsIfLengthOneOrTwo() || lookup([
"gregorian/months",

@@ -1073,3 +1090,3 @@ chr === "M" ? "format" : "stand-alone",

// Unicode equivalent to /\d{length,3}/
// Equivalent to /\d{length,3}/
numeric = true;

@@ -1129,4 +1146,10 @@ tokenRe = new RegExp( "(" + regexpN.source + "){" + length + ",3}" );

// Week, Day, Hour, Minute, or Second
// Week
case "w":
// number l1:{1,2}, l2:{2}.
oneOrTwoDigitsIfLengthOne() || twoDigitsIfLengthTwo();
break;
// Day, Hour, Minute, or Second
case "d":

@@ -1142,3 +1165,13 @@ case "h":

// number l1:{1,2}, l2:{2}.
oneOrTwoDigitsIfLengthOne() || twoDigitsIfLengthTwo();
//
// Lenient parsing:
// - skeleton "hms" (i.e., one m) always includes mm for the pattern, i.e., it's
// impossible to use a different skeleton to parse non-zero-padded minutes,
// therefore parser accepts both zero-padded and non-zero-padded for m. Similar
// for seconds s.
// - skeleton "hms" (i.e., one h) may include h or hh for the pattern, i.e., it's
// impossible to use a different skeleton to parser non-zero-padded hours for some
// locales, therefore parser accepts both zero-padded and non-zero-padded for h.
// Similar for d (in skeleton yMd).
oneOrTwoDigitsIfLengthOneOrTwo();
break;

@@ -1215,3 +1248,3 @@

token.type = "literal";
tokenRe = /./;
tokenRe = new RegExp( regexpEscape( current ) );
}

@@ -1218,0 +1251,0 @@

/**
* Globalize Runtime v1.2.2
* Globalize Runtime v1.2.3
*

@@ -10,6 +10,6 @@ * http://github.com/jquery/globalize

*
* Date: 2016-12-31T15:52Z
* Date: 2017-03-17T01:41Z
*/
/*!
* Globalize Runtime v1.2.2 2016-12-31T15:52Z Released under the MIT license
* Globalize Runtime v1.2.3 2017-03-17T01:41Z Released under the MIT license
* http://git.io/TrdQbw

@@ -16,0 +16,0 @@ */

/**
* Globalize Runtime v1.2.2
* Globalize Runtime v1.2.3
*

@@ -10,6 +10,6 @@ * http://github.com/jquery/globalize

*
* Date: 2016-12-31T15:52Z
* Date: 2017-03-17T01:41Z
*/
/*!
* Globalize Runtime v1.2.2 2016-12-31T15:52Z Released under the MIT license
* Globalize Runtime v1.2.3 2017-03-17T01:41Z Released under the MIT license
* http://git.io/TrdQbw

@@ -395,4 +395,4 @@ */

* var regenerate = require( "regenerate" );
* var dashSymbols = require( * "unicode-8.0.0/General_Category/Format/symbols" );
* regenerate().add( dashSymbols ).toString();
* var formatSymbols = require( * "unicode-8.0.0/General_Category/Format/symbols" );
* regenerate().add( formatSymbols ).toString();
*

@@ -428,4 +428,4 @@ * https://github.com/mathiasbynens/regenerate

* var regenerate = require( "regenerate" );
* var dashSymbols = require( "unicode-8.0.0/General_Category/Space_Separator/symbols" );
* regenerate().add( dashSymbols ).toString();
* var spaceSeparatorSymbols = require( "unicode-8.0.0/General_Category/Space_Separator/symbols" );
* regenerate().add( spaceSeparatorSymbols ).toString();
*

@@ -432,0 +432,0 @@ * https://github.com/mathiasbynens/regenerate

/**
* Globalize Runtime v1.2.2
* Globalize Runtime v1.2.3
*

@@ -10,6 +10,6 @@ * http://github.com/jquery/globalize

*
* Date: 2016-12-31T15:52Z
* Date: 2017-03-17T01:41Z
*/
/*!
* Globalize Runtime v1.2.2 2016-12-31T15:52Z Released under the MIT license
* Globalize Runtime v1.2.3 2017-03-17T01:41Z Released under the MIT license
* http://git.io/TrdQbw

@@ -16,0 +16,0 @@ */

/**
* Globalize Runtime v1.2.2
* Globalize Runtime v1.2.3
*

@@ -10,6 +10,6 @@ * http://github.com/jquery/globalize

*
* Date: 2016-12-31T15:52Z
* Date: 2017-03-17T01:41Z
*/
/*!
* Globalize Runtime v1.2.2 2016-12-31T15:52Z Released under the MIT license
* Globalize Runtime v1.2.3 2017-03-17T01:41Z Released under the MIT license
* http://git.io/TrdQbw

@@ -16,0 +16,0 @@ */

/**
* Globalize Runtime v1.2.2
* Globalize Runtime v1.2.3
*

@@ -10,6 +10,6 @@ * http://github.com/jquery/globalize

*
* Date: 2016-12-31T15:52Z
* Date: 2017-03-17T01:41Z
*/
/*!
* Globalize Runtime v1.2.2 2016-12-31T15:52Z Released under the MIT license
* Globalize Runtime v1.2.3 2017-03-17T01:41Z Released under the MIT license
* http://git.io/TrdQbw

@@ -16,0 +16,0 @@ */

/**
* Globalize v1.2.2
* Globalize v1.2.3
*

@@ -10,6 +10,6 @@ * http://github.com/jquery/globalize

*
* Date: 2016-12-31T15:52Z
* Date: 2017-03-17T01:41Z
*/
/*!
* Globalize v1.2.2 2016-12-31T15:52Z Released under the MIT license
* Globalize v1.2.3 2017-03-17T01:41Z Released under the MIT license
* http://git.io/TrdQbw

@@ -16,0 +16,0 @@ */

/*!
* Globalize v1.2.2
* Globalize v1.2.3
*

@@ -10,3 +10,3 @@ * http://github.com/jquery/globalize

*
* Date: 2016-12-31T15:52Z
* Date: 2017-03-17T01:41Z
*/

@@ -13,0 +13,0 @@ (function( root, factory ) {

/**
* Globalize v1.2.2
* Globalize v1.2.3
*

@@ -10,6 +10,6 @@ * http://github.com/jquery/globalize

*
* Date: 2016-12-31T15:52Z
* Date: 2017-03-17T01:41Z
*/
/*!
* Globalize v1.2.2 2016-12-31T15:52Z Released under the MIT license
* Globalize v1.2.3 2017-03-17T01:41Z Released under the MIT license
* http://git.io/TrdQbw

@@ -780,5 +780,10 @@ */

case "a":
properties.dayPeriods = cldr.main(
"dates/calendars/gregorian/dayPeriods/format/wide"
);
properties.dayPeriods = {
am: cldr.main(
"dates/calendars/gregorian/dayPeriods/format/wide/am"
),
pm: cldr.main(
"dates/calendars/gregorian/dayPeriods/format/wide/pm"
)
};
break;

@@ -1125,3 +1130,3 @@

case "x":
timezoneOffset = token.value - date.getTimezoneOffset();
timezoneOffset = token.value;
break;

@@ -1170,4 +1175,4 @@ }

if ( timezoneOffset ) {
date.setMinutes( date.getMinutes() + timezoneOffset );
if ( timezoneOffset !== undefined ) {
date.setMinutes( date.getMinutes() + timezoneOffset - date.getTimezoneOffset() );
}

@@ -1315,6 +1320,15 @@

numeric = true;
return tokenRe = new RegExp( "(" + regexpN.source + ")(" + regexpN.source + ")?" );
return tokenRe = new RegExp( "(" + regexpN.source + "){1,2}" );
}
}
function oneOrTwoDigitsIfLengthOneOrTwo() {
if ( length === 1 || length === 2 ) {
// Unicode equivalent to /\d\d?/
numeric = true;
return tokenRe = new RegExp( "(" + regexpN.source + "){1,2}" );
}
}
function twoDigitsIfLengthTwo() {

@@ -1325,3 +1339,3 @@ if ( length === 2 ) {

numeric = true;
return tokenRe = new RegExp( "(" + regexpN.source + ")(" + regexpN.source + ")" );
return tokenRe = new RegExp( "(" + regexpN.source + "){2}" );
}

@@ -1391,4 +1405,7 @@ }

// Unicode equivalent to /\d\d/
tokenRe = new RegExp( "(" + regexpN.source + ")(" + regexpN.source + ")" );
// Lenient parsing: there's no year pattern to indicate non-zero-padded 2-digits
// year, so parser accepts both zero-padded and non-zero-padded for `yy`.
//
// Unicode equivalent to /\d\d?/
tokenRe = new RegExp( "(" + regexpN.source + "){1,2}" );
} else {

@@ -1407,7 +1424,8 @@

// lookup l=3...
oneDigitIfLengthOne() || twoDigitsIfLengthTwo() || lookup([
"gregorian/quarters",
chr === "Q" ? "format" : "stand-alone",
widths[ length - 3 ]
]);
oneDigitIfLengthOne() || twoDigitsIfLengthTwo() ||
lookup([
"gregorian/quarters",
chr === "Q" ? "format" : "stand-alone",
widths[ length - 3 ]
]);
break;

@@ -1421,3 +1439,7 @@

// lookup l=3...
oneOrTwoDigitsIfLengthOne() || twoDigitsIfLengthTwo() || lookup([
//
// Lenient parsing: skeleton "yMd" (i.e., one M) may include MM for the pattern,
// therefore parser accepts both zero-padded and non-zero-padded for M and MM.
// Similar for L.
oneOrTwoDigitsIfLengthOneOrTwo() || lookup([
"gregorian/months",

@@ -1435,3 +1457,3 @@ chr === "M" ? "format" : "stand-alone",

// Unicode equivalent to /\d{length,3}/
// Equivalent to /\d{length,3}/
numeric = true;

@@ -1491,4 +1513,10 @@ tokenRe = new RegExp( "(" + regexpN.source + "){" + length + ",3}" );

// Week, Day, Hour, Minute, or Second
// Week
case "w":
// number l1:{1,2}, l2:{2}.
oneOrTwoDigitsIfLengthOne() || twoDigitsIfLengthTwo();
break;
// Day, Hour, Minute, or Second
case "d":

@@ -1504,3 +1532,13 @@ case "h":

// number l1:{1,2}, l2:{2}.
oneOrTwoDigitsIfLengthOne() || twoDigitsIfLengthTwo();
//
// Lenient parsing:
// - skeleton "hms" (i.e., one m) always includes mm for the pattern, i.e., it's
// impossible to use a different skeleton to parse non-zero-padded minutes,
// therefore parser accepts both zero-padded and non-zero-padded for m. Similar
// for seconds s.
// - skeleton "hms" (i.e., one h) may include h or hh for the pattern, i.e., it's
// impossible to use a different skeleton to parser non-zero-padded hours for some
// locales, therefore parser accepts both zero-padded and non-zero-padded for h.
// Similar for d (in skeleton yMd).
oneOrTwoDigitsIfLengthOneOrTwo();
break;

@@ -1577,3 +1615,3 @@

token.type = "literal";
tokenRe = /./;
tokenRe = new RegExp( regexpEscape( current ) );
}

@@ -1643,2 +1681,18 @@

var objectFilter = function( object, testRe ) {
var key,
copy = {};
for ( key in object ) {
if ( testRe.test( key ) ) {
copy[ key ] = object[ key ];
}
}
return copy;
};
/**

@@ -1766,5 +1820,9 @@ * tokenizerProperties( pattern, cldr )

case "a":
cldr.main([
cldr.main(
"dates/calendars/gregorian/dayPeriods/format/wide"
]);
);
properties[ "gregorian/dayPeriods/format/wide" ] = objectFilter(
properties[ "gregorian/dayPeriods/format/wide" ],
/^am|^pm/
);
break;

@@ -1771,0 +1829,0 @@

/**
* Globalize v1.2.2
* Globalize v1.2.3
*

@@ -10,6 +10,6 @@ * http://github.com/jquery/globalize

*
* Date: 2016-12-31T15:52Z
* Date: 2017-03-17T01:41Z
*/
/*!
* Globalize v1.2.2 2016-12-31T15:52Z Released under the MIT license
* Globalize v1.2.3 2017-03-17T01:41Z Released under the MIT license
* http://git.io/TrdQbw

@@ -16,0 +16,0 @@ */

/**
* Globalize v1.2.2
* Globalize v1.2.3
*

@@ -10,6 +10,6 @@ * http://github.com/jquery/globalize

*
* Date: 2016-12-31T15:52Z
* Date: 2017-03-17T01:41Z
*/
/*!
* Globalize v1.2.2 2016-12-31T15:52Z Released under the MIT license
* Globalize v1.2.3 2017-03-17T01:41Z Released under the MIT license
* http://git.io/TrdQbw

@@ -902,4 +902,4 @@ */

* var regenerate = require( "regenerate" );
* var dashSymbols = require( * "unicode-8.0.0/General_Category/Format/symbols" );
* regenerate().add( dashSymbols ).toString();
* var formatSymbols = require( * "unicode-8.0.0/General_Category/Format/symbols" );
* regenerate().add( formatSymbols ).toString();
*

@@ -935,4 +935,4 @@ * https://github.com/mathiasbynens/regenerate

* var regenerate = require( "regenerate" );
* var dashSymbols = require( "unicode-8.0.0/General_Category/Space_Separator/symbols" );
* regenerate().add( dashSymbols ).toString();
* var spaceSeparatorSymbols = require( "unicode-8.0.0/General_Category/Space_Separator/symbols" );
* regenerate().add( spaceSeparatorSymbols ).toString();
*

@@ -1267,6 +1267,10 @@ * https://github.com/mathiasbynens/regenerate

// Handle non-padded decimals, e.g., `".12"` => `0.12` by making the integer part optional.
numberTokenizer = "(" + numberTokenizer + ")?";
aux = decimalSymbolRe + digitsRe + "+";
numberTokenizer = numberTokenizer + "(" + aux + ")?" +
numberTokenizer += "(" + decimalSymbolRe + digitsRe + "+)?";
// Handle non-padded decimals, e.g., `".12"` => `0.12` by making the integer part
// optional.
"|(" + numberTokenizer + ")?" + aux;
numberTokenizer = "(" + numberTokenizer + ")";
}

@@ -1273,0 +1277,0 @@

/**
* Globalize v1.2.2
* Globalize v1.2.3
*

@@ -10,6 +10,6 @@ * http://github.com/jquery/globalize

*
* Date: 2016-12-31T15:52Z
* Date: 2017-03-17T01:41Z
*/
/*!
* Globalize v1.2.2 2016-12-31T15:52Z Released under the MIT license
* Globalize v1.2.3 2017-03-17T01:41Z Released under the MIT license
* http://git.io/TrdQbw

@@ -16,0 +16,0 @@ */

/**
* Globalize v1.2.2
* Globalize v1.2.3
*

@@ -10,6 +10,6 @@ * http://github.com/jquery/globalize

*
* Date: 2016-12-31T15:52Z
* Date: 2017-03-17T01:41Z
*/
/*!
* Globalize v1.2.2 2016-12-31T15:52Z Released under the MIT license
* Globalize v1.2.3 2017-03-17T01:41Z Released under the MIT license
* http://git.io/TrdQbw

@@ -16,0 +16,0 @@ */

/**
* Globalize v1.2.2
* Globalize v1.2.3
*

@@ -10,6 +10,6 @@ * http://github.com/jquery/globalize

*
* Date: 2016-12-31T15:52Z
* Date: 2017-03-17T01:41Z
*/
/*!
* Globalize v1.2.2 2016-12-31T15:52Z Released under the MIT license
* Globalize v1.2.3 2017-03-17T01:41Z Released under the MIT license
* http://git.io/TrdQbw

@@ -16,0 +16,0 @@ */

/*!
* Globalize v1.2.2
* Globalize v1.2.3
*

@@ -10,3 +10,3 @@ * http://github.com/jquery/globalize

*
* Date: 2016-12-31T15:52Z
* Date: 2017-03-17T01:41Z
*/

@@ -13,0 +13,0 @@

{
"name": "globalize",
"version": "1.2.2",
"version": "1.2.3",
"description": "A JavaScript library for internationalization and localization that leverages the official Unicode CLDR JSON data.",

@@ -84,3 +84,3 @@ "keywords": [

"grunt-contrib-copy": "0.6.0",
"grunt-contrib-jshint": "0.10.0",
"grunt-contrib-jshint": "0.11.1",
"grunt-contrib-qunit": "0.7.0",

@@ -87,0 +87,0 @@ "grunt-contrib-requirejs": "0.4.4",

@@ -186,3 +186,3 @@ # Globalize

Note `cldr-data` is an optional module, read [CLDR content](#cldr-content) section below for more information on how to get CLDR from different sources.
Note `cldr-data` is an optional module, read [CLDR content](#2-cldr-content) section below for more information on how to get CLDR from different sources.

@@ -189,0 +189,0 @@ Read the [Locales section](#locales) for more information about supported locales. For AMD, bower and other usage examples, see [Examples section](#examples).

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc