Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bobril-g11n

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bobril-g11n - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

6

CHANGELOG.md
CHANGELOG
===
2.3.0
--
Upgraded numeral version to 2.0.4
-
2.2.0

@@ -5,0 +11,0 @@ --

6

package.json
{
"name": "bobril-g11n",
"version": "2.2.0",
"version": "2.3.0",
"description": "Bobril globalization",

@@ -12,3 +12,3 @@ "main": "index.js",

"moment": "^2.10.6",
"numeral": "^1.5.3"
"numeral": "^2.0.4"
},

@@ -23,2 +23,2 @@ "devDependencies": {

"license": "MIT"
}
}

@@ -14,12 +14,12 @@ import { RuntimeFunctionGenerator } from './RuntimeFunctionGenerator';

if (style === 'custom' && 'format' in options) {
return (val, opt) => { numeral.language(language); return numeral(val).format((<any>opt).format); };
return (val, opt) => { numeral.locale(language); return numeral(val).format((<any>opt).format); };
}
if (style === 'default') {
return (val, _opt) => { numeral.language(language); return numeral(val).format('0,0.[0000]') };
return (val, _opt) => { numeral.locale(language); return numeral(val).format('0,0.[0000]') };
}
if (style === 'percent') {
return (val, _opt) => { numeral.language(language); return numeral(val).format('0%') };
return (val, _opt) => { numeral.locale(language); return numeral(val).format('0%') };
}
if (style === 'bytes') {
return (val, _opt) => { numeral.language(language); return numeral(val).format('0b') };
return (val, _opt) => { numeral.locale(language); return numeral(val).format('0b') };
}

@@ -26,0 +26,0 @@ break;

@@ -154,3 +154,3 @@ /// <reference path="../typings/moment/moment-node.d.ts" />

export function unformatNumber(str: string): number {
return numeral().unformat(str);
return numeral(str).value();
}

@@ -157,0 +157,0 @@

Sorry, the diff of this file is not supported yet

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