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

prostore.pluralize

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prostore.pluralize - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

.eslintignore

10

package.json
{
"name": "prostore.pluralize",
"version": "0.0.1",
"version": "0.0.2",
"description": "Simple Russian Pluralizer",
"main": "src/index.js",
"devDependencies": {
"mocha": "*"
"mocha": "*",
"pre-commit": "*",
"eslint": "*"
},
"scripts": {
"pretest": "eslint .",
"test": "mocha -R spec"
},
"pre-commit": [
"test"
],
"repository": {

@@ -13,0 +19,0 @@ "type": "git",

11

src/index.js

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

"use strict";
'use strict';
module.exports = exports = function(num, s1, s2, s5) {
module.exports = exports = function (num, s1, s2, s5) {
function p(a) {

@@ -9,2 +9,3 @@ if (a % 10 == 1 && a % 100 != 11) return 0;

}
switch (p(num)) {

@@ -20,6 +21,6 @@ case 0:

exports.formatter = function(s1, s2, s5) {
return function(num) {
exports.formatter = function (s1, s2, s5) {
return function (num) {
return exports(num, s1, s2, s5);
}
};
};

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

"use strict";
'use strict';

@@ -6,17 +6,17 @@ var assert = require('assert')

describe('Pluralize', function() {
describe('Pluralize', function () {
it('should emit correct "one"', function() {
it('should emit correct "one"', function () {
assert(pluralize(1, '%s корова', '%s коровы', '%s коров'), '1 корова');
});
it('should emit correct "few"', function() {
it('should emit correct "few"', function () {
assert(pluralize(3, '%s корова', '%s коровы', '%s коров'), '3 коровы');
});
it('should emit correct "many"', function() {
it('should emit correct "many"', function () {
assert(pluralize(5, '%s корова', '%s коровы', '%s коров'), '5 коров');
});
it('should work with formatter', function() {
it('should work with formatter', function () {
var cows = pluralize.formatter('%s корова', '%s коровы', '%s коров');

@@ -23,0 +23,0 @@ assert(cows(100), '100 коров');

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