New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

intl-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

intl-polyfill - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

dist/intl-polyfill.js

@@ -1,1 +0,1 @@

!function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(4),i=n(o);if("undefined"==typeof Intl)try{window.Intl=i["default"]}catch(a){console.error(a.message)}t["default"]=i["default"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Record=t.getOption=t.getNumberOption=t.getInternalProperties=t.internals=t.defineInternal=t.dateTimeComponents=void 0;var o=r(6),i=n(o),a=r(8),u=n(a),l=r(7),c=r(5),s=n(c);t.dateTimeComponents=i["default"],t.defineInternal=a.defineInternal,t.internals=u["default"],t.getInternalProperties=a.getInternalProperties,t.getNumberOption=l.getNumberOption,t.getOption=l.getOption,t.Record=s["default"]},function(e,t,r){"use strict";function n(e){var t={},r=null;return"undefined"!=typeof e?Object.keys(e).forEach(function(n){t[n]=e[n],"all"!==r&&(m.has(n)?r=r&&"time"===r?"all":"date":b.has(n)&&(r=r&&"date"===r?"all":"time"))}):r="all","date"!==r&&"all"!==r||(t.month=t.month||"numeric",t.day=t.day||"numeric"),"time"!==r&&"all"!==r||(t.hour=t.hour||"numeric",t.minute=t.minute||"numeric"),t}function o(e){var t=[];if(e.year&&t.push("y"),e.month)switch(e.month){case"short":t.push("MMM");break;case"long":t.push("MMMM");break;default:t.push("M")}return e.weekday&&("long"===e.weekday?t.push("EEEE"):t.push("E")),e.day&&("2-digit"===e.day?t.push("dd"):t.push("d")),e.hour&&("2-digit"===e.hour?t.push("hh"):t.push("h")),e.minute&&("2-digit"===e.minute?t.push("mm"):t.push("m")),e.second&&("2-digit"===e.second?t.push("ss"):t.push("s")),t.join("")}function i(){var e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],r=Object(this),i=window.IntlLocaleData&&window.IntlLocaleData[e];if("undefined"==typeof i)throw new Error("IntlLocaleData["+e+"] is not defined");var a=(0,d.getInternalProperties)(r);(0,d.defineInternal)(r,a),a["[[initializedIntlObject]]"]=!0;var u=n(t);return a["[[locale]]"]=e,a["[[numberingSystem]]"]="arab",a["[[calendar]]"]="gregory",a["[[style]]"]="decimal",a["[[timeZone]]"]="UTC",a["[[pattern]]"]=o(u),a["[[localeData]]"]=i,r}function a(e){var t=parseInt(e,10);return t<10?"0"+t:e}function u(e,t,r){switch(e){case"a":return r.dayPeriods[t.getHours()<12?"am":"pm"];case"d":return t.getDate().toString();case"dd":return a(t.getDate());case"h":return t.getHours()%12===0?"12":(t.getHours()%12).toString();case"hh":return t.getHours()%12===0?"12":a(t.getHours()%12);case"H":return t.getHours().toString();case"HH":return a(t.getHours());case"m":return t.getMinutes().toString();case"mm":return a(t.getMinutes());case"MMM":return r.months["short"][t.getMonth()];case"MMMM":return r.months["long"][t.getMonth()];case"y":return t.getFullYear().toString();default:throw new Error("getPart: no pattern for "+e)}}function l(e,t,r){var n=r.date.formats[t];if(!n)throw new Error("no pattern defined for "+t);for(var o=[],i=0,a=0;a<n.length;++a){var l=n[a];y.indexOf(l)===-1?(a&&n[a-1]!==l&&i!==-1&&(o.push(u(n.substring(i,a),e,r)),i=-1),a&&o.push(l)):i===-1&&(i=a)}return i!==-1&&o.push(u(n.substring(i,n.length),e,r)),o.join("")}function c(){var e=null!==this&&"object"===s(this)&&(0,d.getInternalProperties)(this);if(!e||!e["[[initializedIntlObject]]"])throw new TypeError("`this` value for format() is not an initialized Intl.DateTimeFormat object.");if("undefined"==typeof e["[[boundFormat]]"]){var t=function(t){return l(new Date(t||Date.now()),e["[[pattern]]"],e["[[localeData]]"])},r=Function.prototype.bind.call(t,this);e["[[boundFormat]]"]=r}return e["[[boundFormat]]"]}Object.defineProperty(t,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t["default"]=i,t.getFormatDateTime=c;var d=r(1),f=["year","month","weekday","day"],p=["hour","minute","second"],m=new Map;f.forEach(function(e){return m.set(e,!0)});var b=new Map;p.forEach(function(e){return b.set(e,!0)});var y=["y","Y","E","M","m","a","d"]},function(e,t,r){"use strict";function n(){var e=Object(this),t=(0,a.getInternalProperties)(e);return(0,a.defineInternal)(e,t),t["[[initializedIntlObject]]"]=!0,e}function o(){var e=null!==this&&"object"===i(this)&&(0,a.getInternalProperties)(this);if(!e||!e["[[initializedIntlObject]]"])throw new TypeError("`this` value for format() is not an initialized Intl.DateTimeFormat object.");if("undefined"==typeof e["[[boundFormat]]"]){var t=function(e){return e},r=Function.prototype.bind.call(t,this);e["[[boundFormat]]"]=r}return e["[[boundFormat]]"]}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t["default"]=n,t.getFormattedNumber=o;var a=r(1)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),i=n(o),a=r(3),u=n(a),l={};Object.defineProperty(l,"DateTimeFormat",{configurable:!0,writable:!0,value:i["default"]}),Object.defineProperty(l.DateTimeFormat.prototype,"format",{configurable:!0,get:o.getFormatDateTime}),Object.defineProperty(l,"NumberFormat",{configurable:!0,writable:!0,value:u["default"]}),Object.defineProperty(l.NumberFormat.prototype,"format",{configurable:!0,get:a.getFormattedNumber}),Object.defineProperty(l.DateTimeFormat,"prototype",{writable:!1}),Object.defineProperty(l.NumberFormat,"prototype",{writable:!1}),t["default"]=l},function(e,t){"use strict";function r(e){var t=this;Object.keys(e).forEach(function(n){(e instanceof r||Object.prototype.hasOwnProperty.call(e,n))&&Object.defineProperty(t,n,{value:e[n],enumerable:!0,writable:!0,configurable:!0})})}Object.defineProperty(t,"__esModule",{value:!0}),r.prototype=Object(null),t["default"]=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={year:["2-digit","numeric"],month:["2-digit","numeric","short","long"],day:["2-digit","numeric"],hour:["2-digit","numeric"],minute:["2-digit","numeric"],second:["2-digit","numeric"],weekday:["short","long"]};t["default"]=r},function(e,t){"use strict";function r(e,t,r,n,o){var i=e[t];if("undefined"!=typeof i){if(i=Number(i),isNaN(i)||i<r||i>n)throw new RangeError("Value is not a number or outside accepted range");return Math.floor(i)}return o}function n(e,t,r,n,o){var i=e[t];if("undefined"!=typeof i){if("boolean"===r?i=Boolean(i):"string"===r&&(i=String(i)),"undefined"!=typeof n&&n.indexOf(i)===-1)throw new RangeError("'"+i+"' is not an allowed value for \""+t+'"');return i}return o}Object.defineProperty(t,"__esModule",{value:!0}),t.getNumberOption=r,t.getOption=n},function(e,t){"use strict";function r(e,t){if(t["[[initializedIntlObject]]"]===!0)throw new TypeError("`this` object has already been initialized as an Intl object");var r=function(){if((arguments.length<=0?void 0:arguments[0])===i)return t};Object.defineProperty(e,"__getInternalProperties",{value:r})}function n(e){return Object.prototype.hasOwnProperty.call(e,"__getInternalProperties")?e.__getInternalProperties(i):Object.create(null)}Object.defineProperty(t,"__esModule",{value:!0}),t.defineInternal=r,t.getInternalProperties=n;var o=Object(null),i=Math.random();t["default"]=o}]);
!function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(4),i=n(o);if("undefined"==typeof Intl)try{window.Intl=i["default"]}catch(a){console.error(a.message)}t["default"]=i["default"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Record=t.getOption=t.getNumberOption=t.getInternalProperties=t.internals=t.defineInternal=t.dateTimeComponents=void 0;var o=r(6),i=n(o),a=r(8),u=n(a),l=r(7),c=r(5),s=n(c);t.dateTimeComponents=i["default"],t.defineInternal=a.defineInternal,t.internals=u["default"],t.getInternalProperties=a.getInternalProperties,t.getNumberOption=l.getNumberOption,t.getOption=l.getOption,t.Record=s["default"]},function(e,t,r){"use strict";function n(e){var t={},r=null;return"undefined"!=typeof e?Object.keys(e).forEach(function(n){t[n]=e[n],"all"!==r&&(m.has(n)?r=r&&"time"===r?"all":"date":b.has(n)&&(r=r&&"date"===r?"all":"time"))}):r="all","date"!==r&&"all"!==r||(t.month=t.month||"numeric",t.day=t.day||"numeric"),"time"!==r&&"all"!==r||(t.hour=t.hour||"numeric",t.minute=t.minute||"numeric"),t}function o(e){var t=[];if(e.year&&t.push("y"),e.month)switch(e.month){case"short":t.push("MMM");break;case"long":t.push("MMMM");break;default:t.push("M")}return e.weekday&&("long"===e.weekday?t.push("EEEE"):t.push("E")),e.day&&("2-digit"===e.day?t.push("dd"):t.push("d")),e.hour&&("2-digit"===e.hour?t.push("hh"):t.push("h")),e.minute&&("2-digit"===e.minute?t.push("mm"):t.push("m")),e.second&&("2-digit"===e.second?t.push("ss"):t.push("s")),t.join("")}function i(){var e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],r=Object(this),i=window.IntlLocaleData&&window.IntlLocaleData[e];if("undefined"==typeof i)throw new Error("IntlLocaleData["+e+"] is not defined");var a=(0,d.getInternalProperties)(r);(0,d.defineInternal)(r,a),a["[[initializedIntlObject]]"]=!0;var u=n(t);return a["[[locale]]"]=e,a["[[numberingSystem]]"]="arab",a["[[calendar]]"]="gregory",a["[[style]]"]="decimal",a["[[timeZone]]"]="UTC",a["[[pattern]]"]=o(u),a["[[localeData]]"]=i,r}function a(e){var t=parseInt(e,10);return t<10?"0"+t:e}function u(e,t,r){switch(e){case"a":return r.dayPeriods[t.getHours()<12?"am":"pm"];case"d":return t.getDate().toString();case"dd":return a(t.getDate());case"h":return t.getHours()%12===0?"12":(t.getHours()%12).toString();case"hh":return t.getHours()%12===0?"12":a(t.getHours()%12);case"H":return t.getHours().toString();case"HH":return a(t.getHours());case"m":return t.getMinutes().toString();case"mm":return a(t.getMinutes());case"MMM":return r.months["short"][t.getMonth()];case"MMMM":return r.months["long"][t.getMonth()];case"y":return t.getFullYear().toString();default:throw new Error("getPart: no pattern for "+e)}}function l(e,t,r){var n=r.date.formats[t];if(!n)throw new Error("no pattern defined for "+t);for(var o=[],i=0,a=0;a<n.length;++a){var l=n[a];y.indexOf(l)===-1?(a&&n[a-1]!==l&&i!==-1&&(o.push(u(n.substring(i,a),e,r)),i=-1),a&&o.push(l)):i===-1&&(i=a)}return i!==-1&&o.push(u(n.substring(i,n.length),e,r)),o.join("").replace(/'/g,"")}function c(){var e=null!==this&&"object"===s(this)&&(0,d.getInternalProperties)(this);if(!e||!e["[[initializedIntlObject]]"])throw new TypeError("`this` value for format() is not an initialized Intl.DateTimeFormat object.");if("undefined"==typeof e["[[boundFormat]]"]){var t=function(t){return l(new Date(t||Date.now()),e["[[pattern]]"],e["[[localeData]]"])},r=Function.prototype.bind.call(t,this);e["[[boundFormat]]"]=r}return e["[[boundFormat]]"]}Object.defineProperty(t,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t["default"]=i,t.getFormatDateTime=c;var d=r(1),f=["year","month","weekday","day"],p=["hour","minute","second"],m=new Map;f.forEach(function(e){return m.set(e,!0)});var b=new Map;p.forEach(function(e){return b.set(e,!0)});var y=["y","Y","E","M","m","a","d"]},function(e,t,r){"use strict";function n(){var e=Object(this),t=(0,a.getInternalProperties)(e);return(0,a.defineInternal)(e,t),t["[[initializedIntlObject]]"]=!0,e}function o(){var e=null!==this&&"object"===i(this)&&(0,a.getInternalProperties)(this);if(!e||!e["[[initializedIntlObject]]"])throw new TypeError("`this` value for format() is not an initialized Intl.DateTimeFormat object.");if("undefined"==typeof e["[[boundFormat]]"]){var t=function(e){return e},r=Function.prototype.bind.call(t,this);e["[[boundFormat]]"]=r}return e["[[boundFormat]]"]}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t["default"]=n,t.getFormattedNumber=o;var a=r(1)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),i=n(o),a=r(3),u=n(a),l={};Object.defineProperty(l,"DateTimeFormat",{configurable:!0,writable:!0,value:i["default"]}),Object.defineProperty(l.DateTimeFormat.prototype,"format",{configurable:!0,get:o.getFormatDateTime}),Object.defineProperty(l,"NumberFormat",{configurable:!0,writable:!0,value:u["default"]}),Object.defineProperty(l.NumberFormat.prototype,"format",{configurable:!0,get:a.getFormattedNumber}),Object.defineProperty(l.DateTimeFormat,"prototype",{writable:!1}),Object.defineProperty(l.NumberFormat,"prototype",{writable:!1}),t["default"]=l},function(e,t){"use strict";function r(e){var t=this;Object.keys(e).forEach(function(n){(e instanceof r||Object.prototype.hasOwnProperty.call(e,n))&&Object.defineProperty(t,n,{value:e[n],enumerable:!0,writable:!0,configurable:!0})})}Object.defineProperty(t,"__esModule",{value:!0}),r.prototype=Object(null),t["default"]=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={year:["2-digit","numeric"],month:["2-digit","numeric","short","long"],day:["2-digit","numeric"],hour:["2-digit","numeric"],minute:["2-digit","numeric"],second:["2-digit","numeric"],weekday:["short","long"]};t["default"]=r},function(e,t){"use strict";function r(e,t,r,n,o){var i=e[t];if("undefined"!=typeof i){if(i=Number(i),isNaN(i)||i<r||i>n)throw new RangeError("Value is not a number or outside accepted range");return Math.floor(i)}return o}function n(e,t,r,n,o){var i=e[t];if("undefined"!=typeof i){if("boolean"===r?i=Boolean(i):"string"===r&&(i=String(i)),"undefined"!=typeof n&&n.indexOf(i)===-1)throw new RangeError("'"+i+"' is not an allowed value for \""+t+'"');return i}return o}Object.defineProperty(t,"__esModule",{value:!0}),t.getNumberOption=r,t.getOption=n},function(e,t){"use strict";function r(e,t){if(t["[[initializedIntlObject]]"]===!0)throw new TypeError("`this` object has already been initialized as an Intl object");var r=function(){if((arguments.length<=0?void 0:arguments[0])===i)return t};Object.defineProperty(e,"__getInternalProperties",{value:r})}function n(e){return Object.prototype.hasOwnProperty.call(e,"__getInternalProperties")?e.__getInternalProperties(i):Object.create(null)}Object.defineProperty(t,"__esModule",{value:!0}),t.defineInternal=r,t.getInternalProperties=n;var o=Object(null),i=Math.random();t["default"]=o}]);
{
"name": "intl-polyfill",
"version": "0.0.1",
"version": "0.0.2",
"description": "intl-polyfill for safari and older browsers",

@@ -5,0 +5,0 @@ "main": "dist/intl-polyfill.js",

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