Socket
Socket
Sign inDemoInstall

abbrev

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.3 to 1.0.4

LICENSE

25

lib/abbrev.js

@@ -7,4 +7,11 @@

function monkeyPatch () {
Array.prototype.abbrev = function () { return abbrev(this) }
Object.prototype.abbrev = function () { return abbrev(Object.keys(this)) }
Object.defineProperty(Array.prototype, 'abbrev', {
value: function () { return abbrev(this) },
enumerable: false, configurable: true, writable: true
})
Object.defineProperty(Object.prototype, 'abbrev', {
value: function () { return abbrev(Object.keys(this)) },
enumerable: false, configurable: true, writable: true
})
}

@@ -36,4 +43,3 @@

prevMatches = prevMatches && curChar === prev.charAt(j)
if (nextMatches || prevMatches) continue
else {
if (!nextMatches && !prevMatches) {
j ++

@@ -65,4 +71,3 @@ break

var assert = require("assert")
, sys
sys = require("util")
var util = require("util")

@@ -73,8 +78,8 @@ console.log("running tests")

assert.deepEqual(actual, expect,
"abbrev("+sys.inspect(list)+") === " + sys.inspect(expect) + "\n"+
"actual: "+sys.inspect(actual))
"abbrev("+util.inspect(list)+") === " + util.inspect(expect) + "\n"+
"actual: "+util.inspect(actual))
actual = abbrev.apply(exports, list)
assert.deepEqual(abbrev.apply(exports, list), expect,
"abbrev("+list.map(JSON.stringify).join(",")+") === " + sys.inspect(expect) + "\n"+
"actual: "+sys.inspect(actual))
"abbrev("+list.map(JSON.stringify).join(",")+") === " + util.inspect(expect) + "\n"+
"actual: "+util.inspect(actual))
}

@@ -81,0 +86,0 @@

21

package.json

@@ -1,8 +0,15 @@

{ "name" : "abbrev"
, "version" : "1.0.3"
, "description" : "Like ruby's abbrev module, but in js"
, "author" : "Isaac Z. Schlueter <i@izs.me>"
, "main" : "./lib/abbrev.js"
, "scripts" : { "test" : "node lib/abbrev.js" }
, "repository" : "http://github.com/isaacs/abbrev-js"
{
"name": "abbrev",
"version": "1.0.4",
"description": "Like ruby's abbrev module, but in js",
"author": "Isaac Z. Schlueter <i@izs.me>",
"main": "./lib/abbrev.js",
"scripts": {
"test": "node lib/abbrev.js"
},
"repository": "http://github.com/isaacs/abbrev-js",
"license": {
"type": "MIT",
"url": "https://github.com/isaacs/abbrev-js/raw/master/LICENSE"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc