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

humanize

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

humanize - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

18

humanize.js

@@ -15,4 +15,4 @@

if (exports !== undefined) {
if (module !== undefined && module.exports) {
if (typeof exports !== 'undefined') {
if (typeof module !== 'undefined' && module.exports) {
exports = module.exports = humanize;

@@ -22,3 +22,3 @@ }

} else {
if (define === 'function' && define.amd) {
if (typeof define === 'function' && define.amd) {
define('humanize', function() {

@@ -43,3 +43,3 @@ return humanize;

}
type = (type === undefined) ? 'left' : 'right'
type = (type === undefined) ? 'left' : 'right';

@@ -62,3 +62,3 @@ if (type === 'right') {

return new Date().getTime() / 1000;
}
};

@@ -253,5 +253,5 @@ /**

var sign = number < 0 ? '-' : '';
number = Math.abs(+number || 0)
number = Math.abs(+number || 0);
var intPart = parseInt(number.toFixed(decimals)) + '';
var intPart = parseInt(number.toFixed(decimals), 10) + '';
var j = intPart.length > 3 ? intPart.length % 3 : 0;

@@ -339,3 +339,3 @@

if (seconds <= 10) {
relativeTime = 'now'
relativeTime = 'now';
}

@@ -356,3 +356,3 @@ } else {

if (seconds <= 0) {
relativeTime = 'just now'
relativeTime = 'just now';
}

@@ -359,0 +359,0 @@ } else {

@@ -19,7 +19,8 @@ {

"main": "humanize.js",
"version": "0.0.3",
"version": "0.0.4",
"dependencies": {},
"devDependencies": {
"mocha": "1.0.3",
"should": "0.6.3"
"should": "0.6.3",
"jshint": "0.7.1"
},

@@ -31,4 +32,4 @@ "optionalDependencies": {},

"scripts": {
"test": "find specs -type f -a -name *.spec.js -exec ./node_modules/mocha/bin/mocha --globals requirejsVars -R list --require should {} \\;"
"test": "./node_modules/jshint/bin/hint humanize.js; find specs -type f -a -name *.spec.js -exec ./node_modules/mocha/bin/mocha --globals requirejsVars -R list --require should {} \\;"
}
}

@@ -22,2 +22,5 @@ # humanize #

####humanize.noConflict()####
Give control of the "humanize" variable back to its previous owner. Returns a reference to the humanize object.
####humanize.time()####

@@ -24,0 +27,0 @@ Retrieves the current time in seconds

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