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

nyks

Package Overview
Dependencies
Maintainers
1
Versions
250
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nyks - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

2

package.json
{
"name": "nyks",
"version": "0.1.7",
"version": "0.1.8",
"description": "nodejs exupery style",

@@ -5,0 +5,0 @@ "keywords": [

@@ -50,2 +50,9 @@ nyks provide a set of "missing" stuffs in nodejs basic api.

* String.prototype.replaces(dict)
Replace key => value in current string
* String.prototype.rreplaces(dict)
Recursive (iterative) replaces
* String.prototype.stripEnd(str)

@@ -52,0 +59,0 @@ Return trimmed string of "str" if present (else, leave untouched)

@@ -26,2 +26,20 @@ Buffer.implement({

String.implement({
replaces : function(hash){
var self = this;
Object.each(hash, function(v, k){
self = self.replace(k, v);
});
return self;
},
//recursive version of replaces
rreplaces : function(hash){
var tmp = "", i = this;
do {
tmp = i;
i = i.replaces(hash);
} while(tmp != i);
return tmp;
},
startsWith: function(str){

@@ -28,0 +46,0 @@ return (this.indexOf(str) === 0);

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