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

hokey-cokey

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hokey-cokey - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

.github/workflows/ci.yaml

38

package.json
{
"name": "hokey-cokey",
"description": "Render values into templates OR extract values out of templates. That's what it's all about.",
"version": "2.0.1",
"version": "2.0.2",
"license": "0BSD",

@@ -19,28 +19,18 @@ "repository": {

"engines": {
"yarn": ">=1.0.0",
"node": ">=8.0.0"
},
"scripts": {
"test": "yarn lint && yarn jest",
"lint": "eslint ./",
"lint:fix": "eslint --fix ./",
"jest": "jest --no-cache",
"jest:watch": "jest --watchAll"
"fix": "eslint --fix ./",
"test": "npm run test:eslint && npm run test:jest",
"test:eslint": "eslint ./",
"test:jest": "jest --no-cache",
"test:jest:watch": "jest --watchAll"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"devDependencies": {
"@commitlint/config-conventional": "^7.1.2",
"commitlint": "^7.2.1",
"eslint": "^5.7.0",
"eslint-config-prettier": "^3.1.0",
"eslint": "^6.7.2",
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-prettier": "^3.0.0",
"husky": "^1.1.2",
"jest": "^20.0.3",
"prettier": "^1.14.3",
"semantic-release": "^15.10.5"
"jest": "^24.9.0",
"prettier": "^1.14.3"
},

@@ -80,3 +70,5 @@ "eslintConfig": {

"strict": 2,
"valid-jsdoc": 2
"valid-jsdoc": 2,
"no-prototype-builtins": 0,
"no-cond-assign": 0
}

@@ -87,5 +79,3 @@ },

"useTabs": true,
"printWidth": 120,
"parser": "flow",
"proseWrap": "never"
"printWidth": 120
},

@@ -92,0 +82,0 @@ "jest": {

# Hokey Cokey! Simple string template rendering and matching
[![Travis CI](https://travis-ci.com/dhoulb/hokey-cokey.svg?branch=master)](https://travis-ci.com/dhoulb/hokey-cokey)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat)](https://github.com/semantic-release/semantic-release)
[![Semantic Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat)](https://github.com/semantic-release/semantic-release)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
[![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![GitHub Actions](https://img.shields.io/github/workflow/status/dhoulb/hokey-cokey/CI/master)](https://github.com/dhoulb/hokey-cokey/actions)
[![npm](https://img.shields.io/npm/dm/hokey-cokey.svg)](https://www.npmjs.com/package/hokey-cokey)
[![Greenkeeper badge](https://badges.greenkeeper.io/dhoulb/hokey-cokey.svg)](https://greenkeeper.io/)
Hokey Cokey is a quick tool for matching placeholders from, and inserting placeholders into, template strings. Useful for cases where RegExps are too fussy and you want something chunky and robust without having to worry about edge cases.
**Match:** Match a target string against a template and return a list of found values
**Match:** Match a target string against a template and return a list of found values
e.g. `places/:country/{city}` + `places/france/paris` = `{ country: "france", city: "paris" }`

@@ -36,3 +37,3 @@

Matches a template string against a target string and return an object containing values corresponding to the placeholders.
Matches a template string against a target string and return an object containing values corresponding to the placeholders.

@@ -60,4 +61,4 @@ - `templates` can be...

"${dog}===${cat}",
"{name}@{domain}",
"places/:country/:city",
"{name}@{domain}",
"places/:country/:city",
];

@@ -117,1 +118,5 @@ match(templates, "places/france/paris"); // { country: "france", city: "paris" }

```
## Changelog
See [Releases](https://github.com/dhoulb/hokey-cokey/releases)
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