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

alphabet-numbering

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

alphabet-numbering - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

17

index.js

@@ -1,8 +0,11 @@

module.exports = function alphabetNumbering(alphabet) {
module.exports = function alphabetNumbering (alphabet) {
var letterCount = alphabet.length
return function(argument) {
var offset = ( argument - 1 )
var letters = ( alphabet[offset % letterCount] )
while (( offset = Math.floor(offset / letterCount) ) > 0) {
letters = ( alphabet[--offset % letterCount] + letters ) }
return letters } }
return function (argument) {
var offset = argument - 1
var letters = alphabet[offset % letterCount]
while ((offset = Math.floor(offset / letterCount)) > 0) {
letters = alphabet[--offset % letterCount] + letters
}
return letters
}
}
{
"name": "alphabet-numbering",
"description": "number items using letters of an alphabet",
"version": "1.0.0",
"version": "1.0.1",
"author": "Kyle E. Mitchell <kyle@kemitchell.com> (https://kemitchell.com/)",
"devDependencies": {
"defence-cli": "^1.0.5",
"replace-require-self": "^1.1.0"
"replace-require-self": "^1.1.0",
"standard": "^8.0.0-beta.5"
},

@@ -18,4 +19,5 @@ "files": [

"scripts": {
"lint": "standard",
"test": "defence README.md | replace-require-self | node"
}
}

@@ -7,5 +7,6 @@ ```javascript

var englishAlphaNumbering = alpabetnumbering(
[ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' ])
var englishAlphaNumbering = alpabetnumbering([
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
])

@@ -12,0 +13,0 @@ assert.equal(englishAlphaNumbering(1), 'a')

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