Skip to content
This repository was archived by the owner on Nov 26, 2024. It is now read-only.

rapsjs/string_handler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

String Handler Package - string_handler

Apology Note

  • I apologize to those who downloaded the package and could not use it, I made a mistake when uploading the version to NPM and did not contain the entire implementation of Handler.

Description

  • This package contains a simple string handler for mapping and manipulating data, object arrays, and strings. I'm implementing more methods over time, if anyone has tips send me through GitHub.

Instructions

  • Install this package

npm i string_handler

  • Object Array To String - for map and object array to a single string use this method:
const strHandler = require('string_handler/lib/string');


// Data to example
const object = [{ text: 'Text' }, { text: 'here' }, { text: 'please.' }]
const propertyName = 'text'
const separator = '| or space or , or whatever you want';

/*
  Call method 'objectArrayToString' and pass the three args
  First the Object array, and second the Property Name to
  be mapped as string and third the separator for join
*/

str.objectArrayToString(object, propertyName, separator)

// Method return: 'Text here please'

About

A simple string handler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages