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

str

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

str - npm Package Compare versions

Comparing version 0.0.1 to 0.2.0

.github/workflows/node.js.yml

71

package.json
{
"author": "Leandro Boffi (lboffi@gmail.com)",
"name": "str",
"description": "Some nice functions for string manipulation on Node.js",
"version": "0.0.1",
"version": "0.2.0",
"description": "⚙️ String manipulation library",
"main": "dist/cjs/index.js",
"module": "dist/es/index.js",
"browser": "dist/str.js",
"types": "types/index.d.ts",
"scripts": {
"test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' nyc mocha './src/**/*.spec.ts' -r ts-node/register --reporter spec",
"start": "rollup -cw",
"watch:docs": "npx nodemon --watch ./scripts/docs/tmpl --watch ./scripts/docs/static/styles --watch ./scripts/docs/static/scripts --ext tmpl,css,js --exec \"npm run build:docs\"",
"build": "rollup -c",
"prebuild": "rimraf ./dist",
"build:docs": "rm -fr ./docs && jsdoc -c .jsdoc.json -R ./README.md",
"postbuild:docs": "git add . && git com -am 'Deploy' && git push && npm version patch -m 'fix individual methods import' && npm publish ./dist",
"deploy": "npm run build",
"predeploy": "npm test",
"postdeploy": "npx codecov -t 324aaa4d-c06b-49df-941b-8566b195f430 && npm run build:docs",
"browser:test": "npx serve ./",
"prebrowser:test": "npm run build",
"semantic-release": "semantic-release"
},
"repository": {
"type": "git",
"url": "git://github.com/leandrob/str.git"
"url": "https://github.com/manelet/str.git"
},
"main": "./lib/index.js"
"keywords": [
"str",
"string manipulation",
"slugify"
],
"author": "Manel Escuer",
"license": "ISC",
"bugs": {
"url": "https://github.com/manelet/str/issues"
},
"homepage": "https://github.com/manelet/str#readme",
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@rollup/plugin-commonjs": "^16.0.0",
"@rollup/plugin-node-resolve": "^10.0.0",
"@types/mocha": "^8.0.3",
"chai": "^4.2.0",
"codecov": "^3.8.1",
"eslint-utils": "^1.4.3",
"jsdoc": "^3.6.6",
"mocha": "^5.2.0",
"nyc": "^14.1.1",
"rimraf": "^2.7.1",
"rollup": "^2.3.1",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-copy": "^3.3.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.29.0",
"standard": "^12.0.1",
"ts-node": "^9.0.0",
"typescript": "^4.0.5",
"semantic-release": "^17.2.2"
},
"nyc": {
"extends": "@istanbuljs/nyc-config-typescript",
"all": false,
"check-coverage": true,
"extension": [
".ts"
],
"exclude": [
"**/*.spec.ts"
]
}
}

43

README.md

@@ -1,31 +0,20 @@

# Node Str 0.0.1
[![codecov](https://codecov.io/gh/manelgarcia/str/branch/master/graph/badge.svg)](https://codecov.io/gh/manelgarcia/str) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/manelgarcia/str/compare) [![Size](https://img.badgesize.io/manelgarcia/str/master/dist/str.min.js)](https://npmjs.com/package/str)
> Some nice functions for string manipulation.
# str
### Installation
## TODO
- [ ] Style docs
```bash
$ npm install str
```
## Proposals
- [x] startsWith
- [x] endsWith
- [ ] replace
- [x] count
- [x] capitalize
- [x] upper
- [ ] camelcase (pascalCase, etc...)
### Examples
```javascript
var str = require('str');
// 1. Format
var formated = str.format('Hello {0} {1}', firstName, lastName);
// 2. Extensions to String
var startsWith = 'Mambru went to the war'.startsWith('Mambru') //returns true;
var endsWith = 'Mambru went to the war'.endsWith('war') //returns true;
```
### License (MIT)
Copyright (c) 2012, Leandro Boffi.
### Author: [Leandro Boffi][0]
[0]: http://github.com/leandrob/
## Methods
- slugify
- trim
- lower
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